diff options
author | Guy Martin <gmsoft@tuxicoman.be> | 2014-01-20 14:16:16 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-01-20 14:21:36 +1030 |
commit | 24ef1aa73ed312282bd1a755b3ac94681c9f1544 (patch) | |
tree | d16b770019d07c69d750fe0f8252cf00db9c3157 /ld/emultempl/spuelf.em | |
parent | d7c85de1c3d15d7abf68212e4b18cd140dd3f397 (diff) | |
download | fsf-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/spuelf.em')
-rw-r--r-- | ld/emultempl/spuelf.em | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index e14fa26..8feb8bf 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -138,8 +138,9 @@ spu_place_special_section (asection *s, asection *o, const char *output_name) lang_output_section_statement_type *os; if (o != NULL) - output_name = o->name; - os = lang_output_section_find (output_name); + os = lang_output_section_get (o); + else + os = lang_output_section_find (output_name); if (os == NULL) { os = gld${EMULATION_NAME}_place_orphan (s, output_name, 0); |