This is the mail archive of the
mailing list for the binutils project.
Re: New failures with .debug_ranges test
- From: Alan Modra <amodra at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: andrew dot burgess at embecosm dot com, binutils at sourceware dot org
- Date: Tue, 1 Dec 2015 22:41:54 +1030
- Subject: Re: New failures with .debug_ranges test
- Authentication-results: sourceware.org; auth=none
- References: <878u5ems2a dot fsf at redhat dot com> <20151201113759 dot GP8901 at bubble dot grove dot modra dot org>
On Tue, Dec 01, 2015 at 10:07:59PM +1030, Alan Modra wrote:
> > For sh64:
> Huh, sh64-elf looks OK. sh64-linux fails. I'm not sure why exactly,
> but the weird R_SH_DIR32 reloc howto has src_mask non-zero and the
> section contents differ between the two targets (besides being
> different endianness). My guess is that the test is exposing an
> assembler error.
Yes, it is an assembler error.
for (symp = symbol_rootP; symp != NULL; symp = symp->sy_next)
if (S_GET_OTHER (symp) & STO_SH5_ISA32)
So some symbols get their value bumped by one. Later in
adjust_reloc_syms some fixups are converted to be against a section
symbol. This involves adding the current symbol value to the fixup
fx_offset, which becomes one greater than it should be. Eventually
we emit section contents off by one.
A relatively easy fix I guess is to make the SH tc_fix_adjustable
reject symbols with STO_SH5_ISA32 set. Another possibility is to make
the STO_SH5_ISA32 adjustment later. I'm leaving this to a SH
maintainer to fix.
Australia Development Lab, IBM