8 Star 0 Fork 26

src-anolis-os/binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-LoongArch-Fix-wrong-line-number-in-.debug_line.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
From 3594c7862222e205d00fa9293882cb40abc17814 Mon Sep 17 00:00:00 2001
From: Xing Li <lixing@loongson.cn>
Date: Mon, 31 Oct 2022 20:32:34 +0800
Subject: [PATCH] LoongArch: Fix wrong line number in .debug_line
The dwarf2_emit_insn() can create debuginfo of line. But it is called
too late in append_fixp_and_insn. It causes extra offs when debuginfo
of line sets address.
Signed-off-by: Xing Li <lixing@loongson.cn>
---
gas/config/tc-loongarch.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index 9c4a9102..26ee3f1a 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -819,6 +819,9 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
bfd_reloc_code_real_type reloc_type;
struct reloc_info *reloc_info = ip->reloc_info;
size_t i;
+
+ dwarf2_emit_insn (0);
+
for (i = 0; i < ip->reloc_num; i++)
{
reloc_type = reloc_info[i].type;
@@ -835,7 +838,6 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
as_fatal (_("Internal error: not support relax now"));
else
append_fixed_insn (ip);
- dwarf2_emit_insn (0);
}
//ask helper for returning a malloced c_str or NULL
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/binutils.git
git@gitee.com:src-anolis-os/binutils.git
src-anolis-os
binutils
binutils
a8

搜索帮助