aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <yw987194828@gmail.com>2024-09-06 09:00:12 +0800
committerliuzhensong <liuzhensong@loongson.cn>2024-09-18 15:04:27 +0800
commit28489a70d4660d67e71d75e82286a6e1a7003b93 (patch)
tree1cfa7ff5122dac72146e4ba9719e91645fb04656
parent2963d7d80dffc9feb391ce7b5f3bc1c87e932b9d (diff)
downloadbinutils-28489a70d4660d67e71d75e82286a6e1a7003b93.zip
binutils-28489a70d4660d67e71d75e82286a6e1a7003b93.tar.gz
binutils-28489a70d4660d67e71d75e82286a6e1a7003b93.tar.bz2
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata.
-rw-r--r--bfd/elfnn-loongarch.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 5d7495c..63c6fdf 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -84,6 +84,14 @@ struct _bfd_loongarch_elf_obj_tdata
&& elf_tdata (bfd) != NULL \
&& elf_object_id (bfd) == LARCH_ELF_DATA)
+static bool
+elfNN_loongarch_object (bfd *abfd)
+{
+ return bfd_elf_allocate_object (abfd,
+ sizeof (struct _bfd_loongarch_elf_obj_tdata),
+ LARCH_ELF_DATA);
+}
+
struct relr_entry
{
asection *sec;
@@ -6159,6 +6167,8 @@ elf_loongarch64_hash_symbol (struct elf_link_hash_entry *h)
#define bfd_elfNN_bfd_reloc_name_lookup loongarch_reloc_name_lookup
#define elf_info_to_howto_rel NULL /* Fall through to elf_info_to_howto. */
#define elf_info_to_howto loongarch_info_to_howto_rela
+#define bfd_elfNN_mkobject \
+ elfNN_loongarch_object
#define bfd_elfNN_bfd_merge_private_bfd_data \
elfNN_loongarch_merge_private_bfd_data