aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-08-07 15:22:41 +0000
committerNick Clifton <nickc@redhat.com>2002-08-07 15:22:41 +0000
commit2004afbc1d737d2b82c706cf90eee8a980a18d4b (patch)
treed5b185582bd3064d2bab6aecfb067373316ebc42 /ld/emultempl
parent5b3316750e7b13ea464dc5d53626a6e7e08ced55 (diff)
downloadgdb-2004afbc1d737d2b82c706cf90eee8a980a18d4b.zip
gdb-2004afbc1d737d2b82c706cf90eee8a980a18d4b.tar.gz
gdb-2004afbc1d737d2b82c706cf90eee8a980a18d4b.tar.bz2
Only search for an interworking bfd if there are input bfds.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/armelf.em22
1 files changed, 12 insertions, 10 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 6f3cfc3..0e65c04 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -100,18 +100,20 @@ arm_elf_before_allocation ()
/* Call the standard elf routine. */
gld${EMULATION_NAME}_before_allocation ();
- /* The interworking bfd must be the last one in the link. */
- bfd_for_interwork = NULL;
- for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
- tem->output_has_begun = false;
-
- lang_for_each_statement (arm_elf_set_bfd_for_interworking);
- ASSERT (bfd_for_interwork != NULL);
- for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
- tem->output_has_begun = false;
+ if (link_info.input_bfds != NULL)
+ {
+ /* The interworking bfd must be the last one in the link. */
+ bfd_for_interwork = NULL;
+ for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
+ tem->output_has_begun = false;
- bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
+ lang_for_each_statement (arm_elf_set_bfd_for_interworking);
+ ASSERT (bfd_for_interwork != NULL);
+ for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
+ tem->output_has_begun = false;
+ bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
+ }
/* We should be able to set the size of the interworking stub section. */
/* Here we rummage through the found bfds to collect glue information. */