diff options
author | Doug Evans <dje@google.com> | 1999-07-20 22:27:31 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1999-07-20 22:27:31 +0000 |
commit | 7c83b342eeb9aac0aab09fecde572e10cee327c9 (patch) | |
tree | 70b8f63404ac1af779fd772f9c37f55a4a896c6a /ld/ldlang.c | |
parent | 8a70eff3a28e91b04c542302c83170e3139a133f (diff) | |
download | gdb-7c83b342eeb9aac0aab09fecde572e10cee327c9.zip gdb-7c83b342eeb9aac0aab09fecde572e10cee327c9.tar.gz gdb-7c83b342eeb9aac0aab09fecde572e10cee327c9.tar.bz2 |
* ldlang.c (lang_gc_sections): Only handle the start symbol
specially if there is one.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index f2c1379..eab4b5f 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); |