+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
+ * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
+ (or1k_final_link_relocate, or1k_elf_relocate_section,
+ or1k_elf_check_relocs): Likewise.
+ * libbfd.h (bfd_reloc_code_real_names): Likewise.
+ * reloc.c: Likewise.
+
2021-05-06 Stafford Horne <shorne@gmail.com>
PR 27624
BFD_RELOC_OR1K_TLS_TPOFF,
BFD_RELOC_OR1K_TLS_DTPOFF,
BFD_RELOC_OR1K_TLS_DTPMOD,
+ BFD_RELOC_OR1K_GOT_AHI16,
/* H8 elf Relocations. */
BFD_RELOC_H8_DIR16A8,
0, /* Source Mask. */
0x03ffffff, /* Dest Mask. */
true), /* PC relative offset? */
+
+ HOWTO (R_OR1K_GOT_AHI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_OR1K_GOT_AHI16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
};
/* Map BFD reloc types to Or1k ELF reloc types. */
{ BFD_RELOC_OR1K_TLS_IE_LO13, R_OR1K_TLS_IE_LO13 },
{ BFD_RELOC_OR1K_SLO13, R_OR1K_SLO13 },
{ BFD_RELOC_OR1K_PLTA26, R_OR1K_PLTA26 },
+ { BFD_RELOC_OR1K_GOT_AHI16, R_OR1K_GOT_AHI16 },
};
/* tls_type is a mask used to track how each symbol is accessed,
switch (howto->type)
{
case R_OR1K_AHI16:
+ case R_OR1K_GOT_AHI16:
case R_OR1K_GOTOFF_AHI16:
case R_OR1K_TLS_IE_AHI16:
case R_OR1K_TLS_LE_AHI16:
}
break;
+ case R_OR1K_GOT_AHI16:
case R_OR1K_GOT16:
case R_OR1K_GOT_PG21:
case R_OR1K_GOT_LO13:
/* The GOT_PG21 and GOT_LO13 relocs are pc-relative,
while the GOT16 reloc is GOT relative. */
relocation = got_base + off;
- if (r_type == R_OR1K_GOT16)
+ if (r_type == R_OR1K_GOT16
+ || r_type == R_OR1K_GOT_AHI16)
relocation -= got_sym_value;
/* Addend should be zero. */
}
break;
+ case R_OR1K_GOT_AHI16:
case R_OR1K_GOT16:
case R_OR1K_GOT_PG21:
case R_OR1K_GOT_LO13:
"BFD_RELOC_OR1K_TLS_TPOFF",
"BFD_RELOC_OR1K_TLS_DTPOFF",
"BFD_RELOC_OR1K_TLS_DTPMOD",
+ "BFD_RELOC_OR1K_GOT_AHI16",
"BFD_RELOC_H8_DIR16A8",
"BFD_RELOC_H8_DIR16R8",
"BFD_RELOC_H8_DIR24A8",
BFD_RELOC_OR1K_GOTPC_HI16
ENUMX
BFD_RELOC_OR1K_GOTPC_LO16
+ENUMX
+ BFD_RELOC_OR1K_GOT_AHI16
ENUMX
BFD_RELOC_OR1K_GOT16
ENUMX
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * or1k.opc (or1k_imm16_relocs, parse_reloc): Define parse logic
+ for gotha() relocation.
+
2021-03-31 Alan Modra <amodra@gmail.com>
* frv.opc: Replace bfd_boolean with bool, FALSE with false, and
BFD_RELOC_OR1K_GOT_LO13,
BFD_RELOC_UNUSED,
BFD_RELOC_UNUSED,
- BFD_RELOC_UNUSED },
+ BFD_RELOC_OR1K_GOT_AHI16 },
{ BFD_RELOC_OR1K_GOTPC_LO16,
BFD_RELOC_UNUSED,
BFD_RELOC_UNUSED,
str += 5;
cls = RCLASS_TPOFF;
}
+ else if (strncasecmp (str, "got", 3) == 0)
+ {
+ str += 3;
+ cls = RCLASS_GOT;
+ }
if (strncasecmp (str, "hi(", 3) == 0)
{
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * testsuite/gas/or1k/reloc-1.s: Add test for new relocation.
+ * testsuite/gas/or1k/reloc-1.d: Add test result for new
+ relocation.
+
2021-05-03 Christoph Muellner <cmuellner@gcc.gnu.org>
PR 27764
000000ec R_OR1K_LO13 x
000000f0 R_OR1K_GOT_LO13 x
000000f4 R_OR1K_SLO13 x
-
+000000f8 R_OR1K_GOT_AHI16 x
+000000fc R_OR1K_GOT_AHI16 x
+00000100 R_OR1K_GOT_AHI16 x
l.lbz r5,po(x)(r3)
l.lbz r5,gotpo(x)(r3)
l.sb po(x)(r3),r6
+
+ l.movhi r4,gotha(x)
+ l.ori r3,r4,gotha(x)
+ l.addi r3,r4,gotha(x)
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * elf/or1k.h (elf_or1k_reloc_type): Define R_OR1K_GOT_AHI16 number.
+
2021-05-06 Nick Alcock <nick.alcock@oracle.com>
* ctf.h (CTF_K_UNKNOWN): Document that it can be used for
RELOC_NUMBER (R_OR1K_TLS_IE_LO13, 51)
RELOC_NUMBER (R_OR1K_SLO13, 52)
RELOC_NUMBER (R_OR1K_PLTA26, 53)
+ RELOC_NUMBER (R_OR1K_GOT_AHI16, 54)
END_RELOC_NUMBERS (R_OR1K_max)
#define EF_OR1K_NODELAY (1UL << 0)
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * or1k-asm.c: Regenerate.
+
2021-05-01 Max Filippov <jcmvbkbc@gmail.com>
* xtensa-dis.c (print_insn_xtensa): Fill in info->insn_type and
BFD_RELOC_OR1K_GOT_LO13,
BFD_RELOC_UNUSED,
BFD_RELOC_UNUSED,
- BFD_RELOC_UNUSED },
+ BFD_RELOC_OR1K_GOT_AHI16 },
{ BFD_RELOC_OR1K_GOTPC_LO16,
BFD_RELOC_UNUSED,
BFD_RELOC_UNUSED,
str += 5;
cls = RCLASS_TPOFF;
}
+ else if (strncasecmp (str, "got", 3) == 0)
+ {
+ str += 3;
+ cls = RCLASS_GOT;
+ }
if (strncasecmp (str, "hi(", 3) == 0)
{