aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2016-07-19 14:33:34 +0200
committerCupertino Miranda <cmiranda@synopsys.com>2016-08-26 12:09:17 +0200
commit65b94e90977efe3235381708f5a3e0d541026d88 (patch)
tree59d417d70ffca93def2af97eaa2247999e5fdf2d
parent8a36df4dcfa3cb89779e1a3eaca8067426e9cad6 (diff)
downloadgdb-65b94e90977efe3235381708f5a3e0d541026d88.zip
gdb-65b94e90977efe3235381708f5a3e0d541026d88.tar.gz
gdb-65b94e90977efe3235381708f5a3e0d541026d88.tar.bz2
Fixed -init, -fini linker options.
ARC was overloading this options by forcing DT_INIT AND DT_FINI to always point to _init and _fini, respectively. bfd/ChangeLog: Cupertino Miranda <cmiranda@synospsys.com> * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-arc.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1ce5ab1..169b8b5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-26 Cupertino Miranda <cmiranda@synospsys.com>
+
+ * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
+
2016-08-26 Cupertino Miranda <cmiranda@synopsys.com>
* elf-bfd.h: Added ARC_ELF_DATA to enum elf_target_id.
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 22aca81..5ba170e 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -2227,8 +2227,8 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd,
switch (internal_dyn.d_tag)
{
- GET_SYMBOL_OR_SECTION (DT_INIT, "_init", NULL)
- GET_SYMBOL_OR_SECTION (DT_FINI, "_fini", NULL)
+ GET_SYMBOL_OR_SECTION (DT_INIT, info->init_function, NULL)
+ GET_SYMBOL_OR_SECTION (DT_FINI, info->fini_function, NULL)
GET_SYMBOL_OR_SECTION (DT_PLTGOT, NULL, ".plt")
GET_SYMBOL_OR_SECTION (DT_JMPREL, NULL, ".rela.plt")
GET_SYMBOL_OR_SECTION (DT_PLTRELSZ, NULL, ".rela.plt")
@@ -2376,8 +2376,8 @@ elf_arc_size_dynamic_sections (bfd * output_bfd,
section. Checking if the .init section is present. We also
create DT_INIT and DT_FINI entries if the init_str has been
changed by the user. */
- ADD_DYNAMIC_SYMBOL ("init", DT_INIT);
- ADD_DYNAMIC_SYMBOL ("fini", DT_FINI);
+ ADD_DYNAMIC_SYMBOL (info->init_function, DT_INIT);
+ ADD_DYNAMIC_SYMBOL (info->fini_function, DT_FINI);
}
else
{