[PATCH] Reloc overflowing on SPARC 64-bit
Eric Botcazou
ebotcazou@libertysurf.fr
Tue Jan 4 16:28:00 GMT 2005
Hi Alan,
As part of a big patch you commited in November 2002, there was
* elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
from discarded relocs.
However, the entry is slightly misleading because it doesn't describe the
whole change, which is:
Index: elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- elf64-sparc.c 11 Nov 2002 23:42:29 -0000 1.62
+++ elf64-sparc.c 12 Nov 2002 06:21:05 -0000 1.63
@@ -2584,11 +2584,10 @@
/* 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. */
+ overflows for discarded entries. */
if (r_type == R_SPARC_32
- && (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)
As you can see, the patch also fiddled with STABS support. Of course we don't
really care since nobody uses STABS on SPARC 64-bit, but the GCC testsuite
contains many debug testcases that are compiled with various -gstabs*
options. This leads to gazillions of failures in the testsuite with GNU ld,
while it is clean with Sun ld (for the reason stated in the comment).
So I'd like to put back the code you lifted, so as to revert to the 2.14
behaviour.
2005-01-04 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
from STABS debugging sections again.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd_sparc64_stabs.diff
Type: text/x-diff
Size: 1117 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050104/3d6ba13a/attachment.bin>
More information about the Binutils
mailing list