This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New failures with .debug_ranges test

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.

>From shmedia_md_end():
  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.

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]