* elf64-sparc.c (sparc64_elf_relocate_section): Disregard
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 15 Nov 2001 04:13:35 +0000 (04:13 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 15 Nov 2001 04:13:35 +0000 (04:13 +0000)
overflows in the .stab section.

bfd/ChangeLog
bfd/elf64-sparc.c

index 3c429ef6adc7b3882f5bf9bbc9a87993bb1d35d8..0c3a54c14e1714c82e79edd85634622434f02cc3 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-15  Alexandre Oliva  <aoliva@redhat.com>
+
+       * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
+       overflows in the .stab section.
+
 2001-11-14  Daniel Jacobowitz  <drow@mvista.com>
 
        * bfd-in.h (bfd_elf32_discard_info): Add prototype.
index 19750a88591ced5420868b8048d681043945c6b8..9e06d605d75e408fc27dde24d26a5547df24dac7 100644 (file)
@@ -2627,6 +2627,16 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          {
            const char *name;
 
+           /* The Solaris native linker silently disregards
+              overflows.  We don't, but this breaks stabs debugging
+              info, whose relocations are only 32-bits wide.  Ignore
+              overflows in this case.  */
+           if (r_type == R_SPARC_32
+               && (input_section->flags & SEC_DEBUGGING) != 0
+               && strcmp (bfd_section_name (input_bfd, input_section),
+                          ".stab") == 0)
+             break;
+
            if (h != NULL)
              {
                if (h->root.type == bfd_link_hash_undefweak