return TRUE;
}
+/* Rename some of the generic section flags to better document how they
+ are used here. */
+#define need_convert_mov_to_lea sec_flg0
+
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
plt_got_align))
return FALSE;
}
+
+ if (r_type == R_X86_64_GOTPCREL
+ && (h == NULL || h->type != STT_GNU_IFUNC))
+ sec->need_convert_mov_to_lea = 1;
}
return TRUE;
if (!is_elf_hash_table (link_info->hash))
return FALSE;
- /* Nothing to do if there are no codes, no relocations or no output. */
+ /* Nothing to do if there is no need or no output. */
if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
- || sec->reloc_count == 0
+ || sec->need_convert_mov_to_lea == 0
|| bfd_is_abs_section (sec->output_section))
return TRUE;
#define elf_backend_got_header_size (GOT_ENTRY_SIZE*3)
#define elf_backend_rela_normal 1
#define elf_backend_plt_alignment 4
+#define elf_backend_extern_protected_data 1
#define elf_info_to_howto elf_x86_64_info_to_howto