aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-05-03 15:01:19 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-05-03 15:01:19 +0000
commita5382c42bb58229b90b373efffc3a91a8e1bd044 (patch)
tree5a1185b41efcfac70a5700df9ec4e4529bbf8fe3
parentc9606f65f6d78fae833d05032efbec6b2cf1e0f9 (diff)
downloadgdb-a5382c42bb58229b90b373efffc3a91a8e1bd044.zip
gdb-a5382c42bb58229b90b373efffc3a91a8e1bd044.tar.gz
gdb-a5382c42bb58229b90b373efffc3a91a8e1bd044.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Only call lang_for_each_statement if an ELF hash table is used.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emultempl/elf32.em12
2 files changed, 12 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5bb24f9..7175c98 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-03 Alan Modra <amodra@gmail.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+ Only call lang_for_each_statement if an ELF hash table is used.
+
2013-05-02 Nick Clifton <nickc@redhat.com>
* Makefile.am: Add emsp430X.c
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index dae8605..251c511 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1484,12 +1484,14 @@ gld${EMULATION_NAME}_before_allocation (void)
bfd *abfd;
if (is_elf_hash_table (link_info.hash))
- _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
+ {
+ _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
- /* If we are going to make any variable assignments, we need to let
- the ELF backend know about them in case the variables are
- referred to by dynamic objects. */
- lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
+ /* If we are going to make any variable assignments, we need to
+ let the ELF backend know about them in case the variables are
+ referred to by dynamic objects. */
+ lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
+ }
/* Let the ELF backend work out the sizes of any sections required
by dynamic linking. */