ARC port broken reloc processing

Alan Modra amodra@gmail.com
Fri Nov 27 03:39:00 GMT 2015


On Fri, Nov 27, 2015 at 01:14:12PM +1030, Alan Modra wrote:
> Why allow zero for the base address, and the variant ranges?

I had a look.  If it was for arc-elf, please don't weaken the test.
arc-elf reloc processing via howto is broken.

This..

#define ARC_RELOC_HOWTO(TYPE, VALUE, RSIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
  [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, FALSE, 0, complain_overflow_##OVERFLOW, arc_elf_reloc, #TYPE, FALSE, 0, 0, FALSE),

static struct reloc_howto_struct elf_arc_howto_table[] =
{
#include "elf/arc-reloc.def"
}

..results in all reloc howtos having 0 for dst_mask, ie. don't
actually apply the relocation.  Clearly this needs to be fixed by
modifying arc-reloc.def to add the appropriate bits to be used in
dst_mask.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list