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]

Re: mn10300: PCREL16 reloc question


Hi DJ,

In elf-m10300.c mn10300_elf_final_link_relocate() for the
R_MN10300_PCREL16 case at line 1221, we use a range that's twice as
big as I'd expect:

      if ((long) value > 0xffff || (long) value < -0x10000)
	return bfd_reloc_overflow;

Are there any real cases where we'd need this range, and not the usual
-0x8000..0x7fff range?

We do the same for PCREL8 just above it, too.

I expect that you could use a variant of one of the mn10300 linker tests to check this. eg changing the JMP instruction in ld/tests/ld-mn10300/i135409-4.s to umm, some 16-bit-pcrel using instruction. You would have to fix the offsets in i135409-4.t as well of course.


Cheers
  Nick


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