diff options
author | Xin Wang <yw987194828@gmail.com> | 2024-09-06 09:00:12 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2024-10-24 10:49:53 +0800 |
commit | c40337b1784d81c615a5dd9fd391f6677e52c6d8 (patch) | |
tree | a2a752347df5c85ef5327c6ed62e84d7634110d5 | |
parent | 9069b0257b18e7add953ba678e9471d5d8c1f4bb (diff) | |
download | gdb-c40337b1784d81c615a5dd9fd391f6677e52c6d8.zip gdb-c40337b1784d81c615a5dd9fd391f6677e52c6d8.tar.gz gdb-c40337b1784d81c615a5dd9fd391f6677e52c6d8.tar.bz2 |
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata.
(cherry picked from commit 28489a70d4660d67e71d75e82286a6e1a7003b93)
-rw-r--r-- | bfd/elfnn-loongarch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index 731af6a..312707b 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; @@ -6147,6 +6155,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 |