summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@sebabeach.org>1999-07-20 22:27:31 +0000
committerDoug Evans <dje@sebabeach.org>1999-07-20 22:27:31 +0000
commit50e22bff25d9144ee598801ef30b990d18bd805d (patch)
tree5c81995e4b0c159d50d64bc5e9d83f5af26f61f6
parent08860b37f3c9a22814094e2396b91be9e9842dd0 (diff)
downloadbinutils-redhat-binu_ss_19990721.tar.gz
* ldlang.c (lang_gc_sections): Only handle the start symbolbinu_ss_19990721
specially if there is one.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e762a905c4..48ffb22dd4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com>
+
+ * ldlang.c (lang_gc_sections): Only handle the start symbol
+ specially if there is one.
+
Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com>
* emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add
diff --git a/ld/ldlang.c b/ld/ldlang.c
index f2c137978e..eab4b5f639 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3786,14 +3786,17 @@ lang_gc_sections ()
/* Keep all sections containing symbols undefined on the command-line.
Handle the entry symbol at the same time. */
-
- fake_list_start.next = ldlang_undef_chain_list_head;
- if (entry_symbol == NULL)
- fake_list_start.name = "start";
+
+ if (entry_symbol != NULL)
+ {
+ fake_list_start.next = ldlang_undef_chain_list_head;
+ fake_list_start.name = (char *) entry_symbol;
+ ulist = &fake_list_start;
+ }
else
- fake_list_start.name = (char *) entry_symbol;
+ ulist = ldlang_undef_chain_list_head;
- for (ulist = &fake_list_start; ulist; ulist = ulist->next)
+ for (; ulist; ulist = ulist->next)
{
h = bfd_link_hash_lookup (link_info.hash, ulist->name,
false, false, false);