From 73e24c6845aa23ed023402152501009ed1dcc62f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 22 Aug 2008 06:07:45 +0000 Subject: [PATCH] * symbols.c (symbol_clone): Ensure clones are not external. --- gas/ChangeLog | 4 ++++ gas/symbols.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index ba0fe139e91..3066c52f49e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2008-08-22 Alan Modra + + * symbols.c (symbol_clone): Ensure clones are not external. + 2008-08-22 Alan Modra * config/tc-hppa.c (md_begin): Set BSF_KEEP for "dummy_symbol". diff --git a/gas/symbols.c b/gas/symbols.c index 30207109a30..84f394cd09e 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -596,13 +596,20 @@ symbol_clone (symbolS *orgsymP, int replace) symbol_lastP = newsymP; else if (orgsymP->sy_next) orgsymP->sy_next->sy_previous = newsymP; + + /* Symbols that won't be output can't be external. */ + S_CLEAR_EXTERNAL (orgsymP); orgsymP->sy_previous = orgsymP->sy_next = orgsymP; debug_verify_symchain (symbol_rootP, symbol_lastP); symbol_table_insert (newsymP); } else - newsymP->sy_previous = newsymP->sy_next = newsymP; + { + /* Symbols that won't be output can't be external. */ + S_CLEAR_EXTERNAL (newsymP); + newsymP->sy_previous = newsymP->sy_next = newsymP; + } return newsymP; } -- 2.30.2