summaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-05-23 14:55:36 +0000
committerNick Clifton <nickc@redhat.com>2011-05-23 14:55:36 +0000
commit82640360d954e7eaf04f5bdbf3e05098682d1c07 (patch)
tree4cb108409a384da44f9ffbb47bf6459a6fe76a24 /bfd/elf-m10300.c
parentea47fb50dca09a4a977e6e2625a6d1e8456fe4f8 (diff)
downloadbinutils-redhat-82640360d954e7eaf04f5bdbf3e05098682d1c07.tar.gz
* elf-m10300.c (mn10300_elf_mkobject): New function.
(bfd_elf32_mkobject): Define.
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r--bfd/elf-m10300.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index bdca122e40..30b5e02282 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -4882,6 +4882,22 @@ _bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
}
}
+/* Allocate space for an MN10300 extension to the bfd elf data structure. */
+
+static bfd_boolean
+mn10300_elf_mkobject (bfd *abfd)
+{
+ /* We do not actually need any extra room in the bfd elf data structure.
+ But we do need the object_id of the structure to be set to
+ MN10300_ELF_DATA so that elflink.c:elf_link_add_object_symols() will call
+ our mn10300_elf_check_relocs function which will then allocate space in
+ the .got section for any GOT based relocs. */
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_obj_tdata),
+ MN10300_ELF_DATA);
+}
+
+#define bfd_elf32_mkobject mn10300_elf_mkobject
+
#ifndef ELF_ARCH
#define TARGET_LITTLE_SYM bfd_elf32_mn10300_vec
#define TARGET_LITTLE_NAME "elf32-mn10300"