[PATCH] [GAS] Fix tight loop on recursively-defined symbols
Alan Modra
amodra@gmail.com
Fri May 15 04:58:08 GMT 2020
On Fri, May 15, 2020 at 10:05:22AM +0930, Alan Modra wrote:
> On Thu, May 14, 2020 at 02:28:00PM +0000, Alex Coplan wrote:
> > 2020-05-14 Alex Coplan <alex.coplan@arm.com>
> > * symbols.c (resolve_symbol_value): Fix symbol definition loop
> > detection, don't spin.
> > * testsuite/gas/all/assign-bad-recursive.d: New test.
> > * testsuite/gas/all/assign-bad-recursive.l: Error output for test.
> > * testsuite/gas/all/assign-bad-recursive.s: Assembly for test.
> > * testsuite/gas/all/gas.exp: Run it.
>
> Thanks, that looks good. I'll run a test over a wider set of targets
> then commit it for you, with any tweaks needed for the new test.
The results were worse than I expected, particularly the pcrelopt
powerpc failures. I haven't looked into the powerpc failure in
detail yet, but the assembly that fails is
pld 9,sym@got@pcrel
0:
lbz 3,0x1234(9)
.reloc 0b-8,R_PPC64_PCREL_OPT,(.-4)-(0b-8)
and the R_PPC64_PCREL_OPT weirdly appears at address zero rather than
where it should be on the pld instruction, which implies that "0b-8"
is being resolved wrongly. I'll dig into this and find another fix.
bfin-elf +FAIL: bad recursive assignments
bfin-linux-uclibc +FAIL: bad recursive assignments
hppa64-hp-hpux11.23 +FAIL: bad recursive assignments
hppa-hp-hpux10 +FAIL: bad recursive assignments
mmix +FAIL: bad recursive assignments
powerpc64-freebsd +FAIL: pcrelopt
powerpc64le-linux +FAIL: pcrelopt
powerpc64-linux +FAIL: pcrelopt
powerpc-eabisim +FAIL: pcrelopt
powerpc-eabivle +FAIL: pcrelopt
powerpcle-elf +FAIL: pcrelopt
powerpc-linux +FAIL: pcrelopt
tic4x-coff +FAIL: bad recursive assignments
tic54x-coff +FAIL: bad recursive assignments
z80-coff +FAIL: bad recursive assignments
z80-elf +FAIL: bad recursive assignments
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list