From: Jim Wilson Date: Thu, 2 Aug 2018 23:13:49 +0000 (-0700) Subject: RISC-V: Fix TLS and --gc-sections conflict. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13755f406d6615e0750213edb04a023ec2ba7b9b;p=binutils-gdb.git RISC-V: Fix TLS and --gc-sections conflict. bfd/ * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn, add SEC_LINKER_CREATED flag. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1751cbce86b..ec4077fb41e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-08-02 Jim Wilson + + * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn, + add SEC_LINKER_CREATED flag. + 2018-08-01 Nick Clifton * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index 934704a87e7..4be3eceda88 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -353,7 +353,8 @@ riscv_elf_create_dynamic_sections (bfd *dynobj, { htab->sdyntdata = bfd_make_section_anyway_with_flags (dynobj, ".tdata.dyn", - SEC_ALLOC | SEC_THREAD_LOCAL); + (SEC_ALLOC | SEC_THREAD_LOCAL + | SEC_LINKER_CREATED)); } if (!htab->elf.splt || !htab->elf.srelplt || !htab->elf.sdynbss