Fixes to legacy ARC relocations.

Added support for ARC_SDA_12 reloc.
Fixed ARC_N32_ME.
Added ME (middle-endian) to ARC_SDA_12 reloc.

bfd/ChangeLog:

Cupertino Miranda  <cmiranda@synopsys.com>
	* reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12
	relocation.
	* bfd-in2.h: Regenerated from the previous changes.
	* libbfd.h: Regenerated from the previous changes.

include/ChangeLog:

Cupertino Miranda  <cmiranda@synopsys.com>
	* elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12,
	SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations.
	* opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12 relocation.
This commit is contained in:
Cupertino Miranda
2016-06-07 10:24:37 +02:00
parent 0955507f6e
commit a87aa054a6
7 changed files with 67 additions and 28 deletions

View File

@@ -264,3 +264,18 @@ replace_disp9s1 (unsigned insn, int value ATTRIBUTE_UNUSED)
}
#endif /* REPLACE_disp9s1 */
/* mask = 00000000000000000000111111222222. */
#ifndef REPLACE_disp12s
#define REPLACE_disp12s
ATTRIBUTE_UNUSED static unsigned
replace_disp12s (unsigned insn, int value ATTRIBUTE_UNUSED)
{
insn = insn & ~0xfff;
insn |= ((value >> 0) & 0x003f) << 6;
insn |= ((value >> 6) & 0x003f) << 0;
return insn;
}
#endif /* REPLACE_disp12s */