aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-08-02 16:13:49 -0700
committerJim Wilson <jimw@sifive.com>2018-08-02 16:13:49 -0700
commit13755f406d6615e0750213edb04a023ec2ba7b9b (patch)
tree8144bed96f40cf373d25a77b4ce5841850735f70
parent3e1d3d8c2494c021718ba957e83395958ee08a0f (diff)
downloadgdb-13755f406d6615e0750213edb04a023ec2ba7b9b.zip
gdb-13755f406d6615e0750213edb04a023ec2ba7b9b.tar.gz
gdb-13755f406d6615e0750213edb04a023ec2ba7b9b.tar.bz2
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.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfnn-riscv.c3
2 files changed, 7 insertions, 1 deletions
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