[binutils-gdb] RISC-V: Fix TLS and --gc-sections conflict.
Jim Wilson
wilson@sourceware.org
Thu Aug 2 23:14:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=13755f406d6615e0750213edb04a023ec2ba7b9b
commit 13755f406d6615e0750213edb04a023ec2ba7b9b
Author: Jim Wilson <jimw@sifive.com>
Date: Thu Aug 2 16:13:49 2018 -0700
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:
---
bfd/ChangeLog | 5 +++++
bfd/elfnn-riscv.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1751cbc..ec4077f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-02 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
+ add SEC_LINKER_CREATED flag.
+
2018-08-01 Nick Clifton <nickc@redhat.com>
* coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 934704a..4be3ece 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
More information about the Binutils-cvs
mailing list