HOWTO (AARCH64_R (MOVW_SABS_G0), /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
HOWTO64 (AARCH64_R (MOVW_SABS_G1), /* type */
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
HOWTO64 (AARCH64_R (MOVW_SABS_G2), /* type */
32, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_set_error (bfd_error_bad_value);
return FALSE;
-#if ARCH_SIZE == 64
- case BFD_RELOC_AARCH64_32:
-#endif
case BFD_RELOC_AARCH64_NN:
if (rel->r_addend != 0)
{
*unresolved_reloc_p = FALSE;
return bfd_reloc_ok;
-#if ARCH_SIZE == 64
- case BFD_RELOC_AARCH64_32:
-#endif
case BFD_RELOC_AARCH64_NN:
/* When generating a shared object or relocatable executable, these
}
case BFD_RELOC_AARCH64_16:
+#if ARCH_SIZE == 64
+ case BFD_RELOC_AARCH64_32:
+#endif
case BFD_RELOC_AARCH64_ADD_LO12:
case BFD_RELOC_AARCH64_BRANCH19:
case BFD_RELOC_AARCH64_LDST128_LO12:
case BFD_RELOC_AARCH64_MOVW_G1_NC:
case BFD_RELOC_AARCH64_MOVW_G2_NC:
case BFD_RELOC_AARCH64_MOVW_G3:
-#if ARCH_SIZE == 64
- case BFD_RELOC_AARCH64_32:
-#endif
case BFD_RELOC_AARCH64_NN:
if (h != NULL && bfd_link_executable (info))
{
if (h != NULL)
{
+ /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
+ This shows up in particular in an R_AARCH64_PREL64 in large model
+ when calculating the pc-relative address to .got section which is
+ used to initialize the gp register. */
+ if (h->root.root.string
+ && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ {
+ if (htab->root.dynobj == NULL)
+ htab->root.dynobj = abfd;
+
+ if (! aarch64_elf_create_got_section (htab->root.dynobj, info))
+ return FALSE;
+
+ BFD_ASSERT (h == htab->root.hgot);
+ }
+
/* Create the ifunc sections for static executables. If we
never see an indirect function symbol nor we are building
a static executable, those sections will be empty and
case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
-#if ARCH_SIZE == 64
- case BFD_RELOC_AARCH64_32:
-#endif
case BFD_RELOC_AARCH64_NN:
if (htab->root.dynobj == NULL)
htab->root.dynobj = abfd;
switch (bfd_r_type)
{
-#if ARCH_SIZE == 64
- case BFD_RELOC_AARCH64_32:
-#endif
case BFD_RELOC_AARCH64_NN:
/* We don't need to handle relocs into sections not going into