* config/tc-ppc.c (ppc_frob_file_before_adjust): Do not reference
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 17 Nov 2005 13:32:27 +0000 (13:32 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 17 Nov 2005 13:32:27 +0000 (13:32 +0000)
dotname.
* write.c (write_object_file): Do not remove used weakrefd.

gas/ChangeLog
gas/config/tc-ppc.c
gas/write.c

index 63a84e10a43e996c106df8300f41d30d21bb52e5..e452f79915607caa003272883e21ab116a675779 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-17  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/tc-ppc.c (ppc_frob_file_before_adjust): Do not reference
+       dotname.
+       * write.c (write_object_file): Do not remove used weakrefd.
+
 2005-11-17  Jan Beulich  <jbeulich@novell.com>
 
        * dw2gencfi.c (dot_cfi): Put argument parsing for cases
index 35a5c2b766279bf92221b6bf8865bfabca25baf5..d5bdb9e643ea685d84afa0a900dc8c578c0b8d24 100644 (file)
@@ -1931,7 +1931,7 @@ ppc_frob_file_before_adjust ()
       dotname = xmalloc (len + 1);
       dotname[0] = '.';
       memcpy (dotname + 1, name, len);
-      dotsym = symbol_find (dotname);
+      dotsym = symbol_find_noref (dotname, 1);
       free (dotname);
       if (dotsym != NULL && (symbol_used_p (dotsym)
                             || symbol_used_in_reloc_p (dotsym)))
index f86930b45410d7282f7f48de93d91a4c8513dcf2..5c336d8bb97b59b44bc474bf984d71d55430b161 100644 (file)
@@ -1513,7 +1513,8 @@ write_object_file (void)
                 opposites.  Sometimes the former checks flags and the
                 latter examines the name...  */
              || (!S_IS_EXTERNAL (symp)
-                 && (punt || S_IS_LOCAL (symp) || S_IS_WEAKREFD (symp))
+                 && (punt || S_IS_LOCAL (symp) ||
+                     (S_IS_WEAKREFD (symp) && ! symbol_used_p (symp)))
                  && ! symbol_used_in_reloc_p (symp)))
            {
              symbol_remove (symp, &symbol_rootP, &symbol_lastP);