This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Fix CRIS bug exposed by "MIPS/BFD: Don't make debug section relocs dynamic"
- From: Tristan Gingold <gingold at adacore dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 1 Dec 2011 09:13:45 +0100
- Subject: Re: Fix CRIS bug exposed by "MIPS/BFD: Don't make debug section relocs dynamic"
- References: <201112010252.pB12q57l005909@ignucius.se.axis.com>
On Dec 1, 2011, at 3:52 AM, Hans-Peter Nilsson wrote:
>> From: "Maciej W. Rozycki" <macro@codesourcery.com>
>> Date: Mon, 31 Oct 2011 13:21:52 +0100
>
>> 2011-10-31 Maciej W. Rozycki <macro@codesourcery.com>
>>
>> PR ld/10144
>> * lib/ld-lib.exp (run_ld_link_tests): Handle sources from other
>> directories.
>> (run_ld_link_exec_tests): Likewise.
>> (run_cc_link_tests): Likewise.
>> * ld-elf/comm-data1.sd: New test.
>> * ld-elf/comm-data1.s: Source for the new test.
>> * ld-elf/comm-data2.sd: New test.
>> * ld-elf/comm-data2.rd: Likewise.
>> * ld-elf/comm-data2.xd: Likewise.
>> * ld-elf/comm-data2.s: Source for the new tests.
>> * ld-elf/comm-data.exp: Run the new tests.
>> * ld-mips-elf/comm-data.exp: Likewise.
>
> This new test caused the following failure to appear for
> cris-axis-linux-gnu:
>
> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-elf/comm-data.exp ...
> FAIL: Common symbol override test
>
> ...but it turned out to be a target bug, so...thanks, I guess. :)
>
> I see this test fails for m68k-linux too, if someone feels pity
> (no listed maintainer).
>
> No regressions tested cris-elf cris-linux.
> Can I put this on the 2.22 branch too?
Sure.
>
> bfd:
> * elf32-cris.c (cris_elf_check_relocs) <plt accounting for
> R_CRIS_8, R_CRIS_16, and R_CRIS_32>: Move early break for
> non-SEC_ALLOC sections before GOT and PLT accounting.
>
> Index: elf32-cris.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elf32-cris.c,v
> retrieving revision 1.117
> diff -p -u -r1.117 elf32-cris.c
> --- elf32-cris.c 19 Oct 2011 07:17:13 -0000 1.117
> +++ elf32-cris.c 1 Dec 2011 02:47:49 -0000
> @@ -3583,6 +3583,12 @@ cris_elf_check_relocs (bfd *abfd,
> sec,
> cris_elf_howto_table[r_type].name);
> }
> +
> + /* We don't need to handle relocs into sections not going into
> + the "real" output. */
> + if ((sec->flags & SEC_ALLOC) == 0)
> + break;
> +
> if (h != NULL)
> {
> h->non_got_ref = 1;
> @@ -3612,11 +3618,6 @@ cris_elf_check_relocs (bfd *abfd,
> if (! info->shared)
> break;
>
> - /* We don't need to handle relocs into sections not going into
> - the "real" output. */
> - if ((sec->flags & SEC_ALLOC) == 0)
> - break;
> -
> /* We may need to create a reloc section in the dynobj and made room
> for this reloc. */
> if (sreloc == NULL)
>
> brgds, H-P