Reinstate bypass for call-to-undefweak reloc overflow on SPARC

Eric Botcazou ebotcazou@libertysurf.fr
Wed Feb 1 22:04:00 GMT 2006


Hi,

It was presumably ditched when DaveM merged the 32-bit and 64-bit code. :-)
We need it for g++.dg/warn/weak1.C, otherwise the linker complains:

weak1.o: In function `main':weak1.C:(.text+0x24): relocation truncated to fit: 
R_SPARC_WDISP30 against undefined symbol `foo()'

extern void foo (void) __attribute__ ((weak));

int
main ()
{
  if (&foo)
    foo ();

  return 0;
}

Tested on SPARC/Solaris 10 and SPARC64/Solaris 9.  GCC 4.1.0pre was also 
regtested.  Applied as semi-obvious. :-)


2006-02-01  Eric Botcazou  <ebotcazou@libertysurf.fr>

        * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
        for call-to-undefweak reloc overflow.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd_sparc_overflow-2.diff
Type: text/x-diff
Size: 881 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060201/153a4e2d/attachment.bin>


More information about the Binutils mailing list