This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Regressions with "PATCH: PR ld/13177: garbage collector retains zombie references to external libraries"
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: hjl dot tools at gmail dot com
- Cc: hp at axis dot com, binutils at sourceware dot org
- Date: Fri, 16 Sep 2011 19:13:16 +0200
- Subject: Re: Regressions with "PATCH: PR ld/13177: garbage collector retains zombie references to external libraries"
> Date: Fri, 16 Sep 2011 09:07:53 -0700
> From: "H.J. Lu" <hjl.tools@gmail.com>
> On Fri, Sep 16, 2011 at 7:45 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Thu, Sep 15, 2011 at 11:21 PM, Hans-Peter Nilsson
> > <hans-peter.nilsson@axis.com> wrote:
> >> cris-elf:
> >> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris/cris.exp ...
> >> FAIL: ld-cris/pic-gc-72
> >>
> >> ld.log:
> >> Executing on host: sh -c {/tmp/hpautotest-binutils/cris-axis-elf/ld/../binutils/objdump ?-s -t -R -p -T tmpdir/dump > tmpdir/dump.out 2>ld.tmp} ?/dev/null ?(timeout = 300)
> >> exited abnormally with 0, output:BFD: tmpdir/dump(.rela.dyn): relocation 0 has invalid symbol index 16777215
> >
> > This looks an cris backend bug.
> The problem is cris backend doesn't use plt.refcount nor got.refcount.
It certainly does refcounting for PLT/GOT entries, but it's time
for me to have a look. Thanks for checking.
> diff --git a/ld/testsuite/ld-elf/pr13177.s b/ld/testsuite/ld-elf/pr13177.s
> index 25232ba..d7caad3 100644
> --- a/ld/testsuite/ld-elf/pr13177.s
> +++ b/ld/testsuite/ld-elf/pr13177.s
> @@ -3,7 +3,7 @@
> .type foo, %function
> foo:
> .byte 0
> - .section .text.opt_out,"ax",%progbits
> - .type opt_out, %function
> + .section .data.opt_out,"aw",%progbits
> + .type opt_out, %object
> opt_out:
> .dc.a bar
>
The other new test does not fail anymore (i.e. disabled / working).
JFTR, ld.log now has:
Executing on host: sh -c
{/tmp/hpautotest-binutils/cris-axis-linux-gnu/ld/../binutils/readelf -s -D --wide tmpdir/dump
> tmpdir/dump.out 2>ld.tmp} /dev/null (timeout = 300)
fail if no difference
FAIL: ld-elf/pr13177
If there's an issue with the CRIS backend and refcounting, I
guess this is a likely result. I'll check. Film at 11.
brgds, H-P