]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf-m10300.c (mn10300_elf_mkobject): New function.
authorNick Clifton <nickc@redhat.com>
Mon, 23 May 2011 14:55:39 +0000 (14:55 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 23 May 2011 14:55:39 +0000 (14:55 +0000)
(bfd_elf32_mkobject): Define.

bfd/ChangeLog
bfd/elf-m10300.c

index 02b47d4a34d7f9b4b208ed673eff1af459ab7089..901d3258dc3ec194148b167196c900155fa82cb2 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-23  Nick Clifton  <nickc@redhat.com>
+
+       * elf-m10300.c (mn10300_elf_mkobject): New function.
+       (bfd_elf32_mkobject): Define.
+
 2011-05-23  Alan Modra  <amodra@gmail.com>
 
        * elf-bfd.h: Comment typo fix.
index bdca122e40f73ad0e875d09083b1db84ea9c9a06..30b5e02282e0b82f56302d54bcb14155d178fba9 100644 (file)
@@ -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"