summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddesh.poyarekar@arm.com>2020-09-11 09:18:09 +0530
committerLuis Machado <luis.machado@linaro.org>2020-10-20 15:04:07 -0300
commitf938669f01a7e36c384dd34d4ad73b26bbeb41e0 (patch)
tree70207c840e131293e35041a93029b1ca1f3be7c0 /bfd/elf32-i386.c
parentd2beed31c500be36f991a0a7f5596665979b054b (diff)
downloadbinutils-gdb-f938669f01a7e36c384dd34d4ad73b26bbeb41e0.tar.gz
[Morello] Expand GOT entry sizes for C64
Expand GOT slots based on whether we are emitting C64 relocations. This patch only has infrastructure changes, i.e. it only makes got_header_size a function and adjusts across architectures. bfd/ChangeLog: 2020-10-20 Siddhesh Poyarekar <siddesh.poyarekar@arm.com> Tamar Christina <tamar.christina@arm.com> * elf-bfd.h (elf_backend_data): Make got_header_size a function. Add callbacks to all targets that use it. * elflink.c (_bfd_elf_create_got_section, bfd_elf_gc_common_finalize_got_offsets, _bfd_elf_common_section): Adjust got_header_size usage.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7ae881be0ad..db84a9a67d6 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -4330,6 +4330,14 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
return _bfd_x86_elf_link_setup_gnu_properties (info, &init_table);
}
+/* Determine the size of the header of for the GOT section. */
+
+static bfd_vma
+elf_i386_got_header_size (struct bfd_link_info* info ATTRIBUTE_UNUSED)
+{
+ return 12;
+}
+
#define TARGET_LITTLE_SYM i386_elf32_vec
#define TARGET_LITTLE_NAME "elf32-i386"
#define ELF_ARCH bfd_arch_i386
@@ -4342,7 +4350,7 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
#define elf_backend_want_got_plt 1
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
-#define elf_backend_got_header_size 12
+#define elf_backend_got_header_size elf_i386_got_header_size
#define elf_backend_plt_alignment 4
#define elf_backend_dtrel_excludes_plt 1
#define elf_backend_extern_protected_data 1