* write.c (adjust_reloc_syms): Rather than never reducing reloc
authorIan Lance Taylor <ian@airs.com>
Sat, 12 Jun 1999 22:15:51 +0000 (22:15 +0000)
committerIan Lance Taylor <ian@airs.com>
Sat, 12 Jun 1999 22:15:51 +0000 (22:15 +0000)
which refer to symbols in linkonce sections, permit reducing the
relocs if the symbol is local.

gas/ChangeLog
gas/write.c

index 865284a..8570281 100644 (file)
@@ -1,3 +1,9 @@
+1999-06-13  Ian Lance Taylor  <ian@zembu.com>
+
+       * write.c (adjust_reloc_syms): Rather than never reducing reloc
+       which refer to symbols in linkonce sections, permit reducing the
+       relocs if the symbol is local.
+
 1999-06-12  Ian Lance Taylor  <ian@zembu.com>
 
        * subsegs.c (subseg_text_p): New function.
index 3a49234..d0a9ac6 100644 (file)
@@ -780,11 +780,11 @@ adjust_reloc_syms (abfd, sec, xxx)
            goto done;
          }
 
-       /* Don't try to reduce relocs which refer to .linkonce
-           sections.  It can lead to confusion when a debugging
-           section refers to a .linkonce section.  I hope this will
-           always be correct.  */
-       if (symsec != sec)
+       /* Don't try to reduce relocs which refer to non-local symbols
+           in .linkonce sections.  It can lead to confusion when a
+           debugging section refers to a .linkonce section.  I hope
+           this will always be correct.  */
+       if (symsec != sec && ! S_IS_LOCAL (sym))
          {
            boolean linkonce;