import gdb-1999-06-21 snapshot
[external/binutils.git] / gas / write.c
index a8b8046..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;
 
@@ -1372,7 +1372,8 @@ subsegs_finish ()
          any alignment is meaningless, and, moreover, will look weird
          if we are generating a listing.  */
       frag_align (had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg),
-                 NOP_OPCODE, 0);
+                 subseg_text_p (now_seg) ? NOP_OPCODE : 0,
+                 0);
 
       /* frag_align will have left a new frag.
         Use this last frag for an empty ".fill".
@@ -2671,12 +2672,14 @@ fixup_segment (fixP, this_segment_type)
 #if !(defined (TC_V850) && defined (OBJ_ELF))
 #if !(defined (TC_M68K) && defined (OBJ_ELF))
 #if !(defined (TC_ARM)  && defined (OBJ_ELF))
+#if !(defined (TC_I960) && defined (OBJ_ELF))
 #if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
                  add_number += S_GET_VALUE (add_symbolP);
 #endif
 #endif
 #endif
 #endif
+#endif
                }
            }
        }