aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/hppaelf.em
diff options
context:
space:
mode:
authorGuy Martin <gmsoft@tuxicoman.be>2014-01-20 14:16:16 +1030
committerAlan Modra <amodra@gmail.com>2014-01-20 14:21:36 +1030
commit24ef1aa73ed312282bd1a755b3ac94681c9f1544 (patch)
treed16b770019d07c69d750fe0f8252cf00db9c3157 /ld/emultempl/hppaelf.em
parentd7c85de1c3d15d7abf68212e4b18cd140dd3f397 (diff)
downloadfsf-binutils-gdb-24ef1aa73ed312282bd1a755b3ac94681c9f1544.zip
fsf-binutils-gdb-24ef1aa73ed312282bd1a755b3ac94681c9f1544.tar.gz
fsf-binutils-gdb-24ef1aa73ed312282bd1a755b3ac94681c9f1544.tar.bz2
Fix duplicate output section statement lookup
Tie output section statements to their associated output section via output section userdata. This allows us to avoid hash lookups which are slower and fail when multiple output sections have the same name. * ldlang.h (lang_output_section_get): Define. * ldlang.c (lang_output_section_get): Likewise. (init_os): Set the output_section userdata to the output section statement. * emultempl/hppaelf.em: Use lang_output_section_get instead of lang_output_section_find where applicable. * emultempl/aarch64elf.em: Likewise. * emultempl/aix.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
Diffstat (limited to 'ld/emultempl/hppaelf.em')
-rw-r--r--ld/emultempl/hppaelf.em4
1 files changed, 1 insertions, 3 deletions
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index 65c1ea5..1b7e384 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -178,7 +178,6 @@ hppaelf_add_stub_section (const char *stub_sec_name, asection *input_section)
asection *stub_sec;
flagword flags;
asection *output_section;
- const char *secname;
lang_output_section_statement_type *os;
struct hook_stub_info info;
@@ -190,8 +189,7 @@ hppaelf_add_stub_section (const char *stub_sec_name, asection *input_section)
goto err_ret;
output_section = input_section->output_section;
- secname = bfd_get_section_name (output_section->owner, output_section);
- os = lang_output_section_find (secname);
+ os = lang_output_section_get (output_section);
info.input_section = input_section;
lang_list_init (&info.add);