* symbols.c (symbol_clone): Ensure clones are not external.
authorAlan Modra <amodra@gmail.com>
Fri, 22 Aug 2008 06:07:45 +0000 (06:07 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 22 Aug 2008 06:07:45 +0000 (06:07 +0000)
gas/ChangeLog
gas/symbols.c

index ba0fe139e9132b16ea6eb74b1a38707bae324bce..3066c52f49e84fb999e6c300f8d131738226e95b 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-22  Alan Modra  <amodra@bigpond.net.au>
+
+       * symbols.c (symbol_clone): Ensure clones are not external.
+
 2008-08-22  Alan Modra  <amodra@bigpond.net.au>
 
        * config/tc-hppa.c (md_begin): Set BSF_KEEP for "dummy_symbol".
index 30207109a300504ef01cbb9831558bf5e3eec7c8..84f394cd09e1f1a5998a30b2cd5a466658e313af 100644 (file)
@@ -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;
 }