]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 5 Jan 2005 15:26:27 +0000 (15:26 +0000)
committerEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 5 Jan 2005 15:26:27 +0000 (15:26 +0000)
from STABS debugging sections again.

bfd/ChangeLog
bfd/elf64-sparc.c

index 80e9bd1ee0ad768d5e6a14600d0964c107101269..89cf8797d6bc4f3c370c4f8ca98c0405749c3948 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
+       from STABS debugging sections again.
+
 2004-10-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elflink.c (elf_link_add_object_symbols): Also clear
index 4568a22d6430f672a3c028a6dc62c1462ca75432..b4e729663c3fe0afa85f535a09cf3c7c530cc6fa 100644 (file)
@@ -2635,10 +2635,14 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            /* 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 for discarded entries.  */
+              overflows in this case and also for discarded entries.  */
            if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32)
-               && _bfd_elf_section_offset (output_bfd, info, input_section,
-                                           rel->r_offset) == (bfd_vma) -1)
+               && (((input_section->flags & SEC_DEBUGGING) != 0
+                    && strcmp (bfd_section_name (input_bfd, input_section),
+                              ".stab") == 0)
+                   || _bfd_elf_section_offset (output_bfd, info,
+                                               input_section,
+                                               rel->r_offset) == (bfd_vma)-1))
              break;
 
            if (h != NULL)