5 Star 0 Fork 13

OpenCloudOS Stream/binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LoongArch-Add-elfNN_loongarch_mkobject-to-initialize.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
油屋 提交于 2024-11-07 15:00 . sync from upstream
From 5ba625b50145a8234129ab6b4a58a18e530ae9d7 Mon Sep 17 00:00:00 2001
From: Xin Wang <[email protected]>
Date: Fri, 6 Sep 2024 09:00:12 +0800
Subject: [PATCH 114/123] LoongArch: Add elfNN_loongarch_mkobject to initialize
LoongArch tdata
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata.
---
bfd/elfnn-loongarch.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 09a9513b..b6d7d1e8 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;
@@ -6158,6 +6166,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
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/binutils.git
[email protected]:opencloudos-stream/binutils.git
opencloudos-stream
binutils
binutils
master

搜索帮助