binutils-2.15 - work around for gcc optimization problem on sparc -sun-solaris2.7
Nick Clifton
nickc@redhat.com
Tue Jul 13 12:55:00 GMT 2004
Hi Kelvin,
> Attached test.c is code extracted from elflink.c to demonstrate the problem.
> You can use attached comp.sh to compile the test program. The test program
> must be compile inside the bfd directory of the binutils-2.15 package. The
> embedded data is the data extract from the gcc-3.4 build which caused
> ld-2.15 to crash. BTW, the test program also shows a possible work around of
> the problem, i.e. instead of doing the calculation, simply comparing the
> values inside elf_sort_symbol. (You may also use the attached diff file to
> patch elflink.c.) The patch seems working fine or at least survived the gcc
> build cycle.
Thanks very much for discovering this problem and producing a
workaround. I have applied the patch you suggested, together with this
ChangeLog entry:
bfd/ChangeLog
2004-07-13 Kelvin Lee <Kelvin.Lee@lansa.com.au>
* elflink.c (elf_sort_symbol): Restructure code to avoid bug in
Solairs hosted versions of gcc.
Cheers
Nick
More information about the Gcc-bugs
mailing list