1 Star 0 Fork 26

gaochang/binutils

forked from src-anolis-os/binutils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ld-Fix-the-bug-of-pr21964-4.patch 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
lixing.loongson.cn 提交于 2023-07-18 15:03 . Fixup some bugs for LoongArch
From ab3be032475cbeecb089507f1582d01e41efa04b Mon Sep 17 00:00:00 2001
From: Xing Li <lixing@loongson.cn>
Date: Tue, 18 Jul 2023 14:08:01 +0800
Subject: [PATCH 4/4] Fixup pr21964
---
bfd/elfnn-loongarch.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 5582107e..cf4d539d 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -1134,6 +1134,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (htab->elf.splt)
{
if (h->dynindx == -1 && !h->forced_local
+ && htab->elf.dynamic_sections_created
+ && h->root.type == bfd_link_hash_undefweak
&& !bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1194,6 +1196,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1 && !h->forced_local
+ && htab->elf.dynamic_sections_created
+ && h->root.type == bfd_link_hash_undefweak
&& !bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gcdota930915/binutils.git
git@gitee.com:gcdota930915/binutils.git
gcdota930915
binutils
binutils
a8

搜索帮助