* 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 ba0fe13..3066c52 100644 (file)
@@ -1,5 +1,9 @@
 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".
 
 2008-08-21  Richard Henderson  <rth@redhat.com>
index 3020710..84f394c 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;
 }