* elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 5 Jan 2005 15:24:56 +0000 (15:24 +0000)
committerEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 5 Jan 2005 15:24:56 +0000 (15:24 +0000)
from STABS debugging sections again.

bfd/ChangeLog
bfd/elf64-sparc.c

index 3649cf8df324dd1e753a41d57a0627784399c6ec..831b9e1e5577d4bc94bf901eef22605335d9d22c 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.
+
 2005-01-05  Fred Fish  <fnf@specifixinc.com>
 
        * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
index 01b80cda4d5a6d043e5811fc7be2aa25c91a5557..6ffad929a70880b0abf779ef32ed89081405f622 100644 (file)
@@ -2633,10 +2633,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)