This is the mail archive of the binutils@sourceware.org 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]

ARC port broken reloc processing


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


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