5 Star 0 Fork 13

OpenCloudOS Stream/binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Make-sure-DW_CFA_advance_loc4-is-in-the-same-frag.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
油屋 提交于 2024-11-07 15:00 . sync from upstream
From 4c35fff684c03e27b0b4a421681be4e90cd293a2 Mon Sep 17 00:00:00 2001
From: Jinyang He <[email protected]>
Date: Thu, 10 Aug 2023 10:21:40 +0800
Subject: [PATCH 008/123] Make sure DW_CFA_advance_loc4 is in the same frag
Do the same as commit b9d8f5601bcf in another place generating
DW_CFA_advance_loc4. The idea behind commit b9d8f5601bcf was that
when a DW_CFA_advance_loc4 of zero is seen in eh_frame_relax_frag and
eh_frame_convert_frag we want to remove the opcode entirely, not just
convert to a nop. If the opcode was split over two frags then a size
adjustment would need to be done to the first frag, not just the
second as is correct for other cases with split frags. This would
complicate the eh relaxation. It's easier to ensure the frag is not
split.
* ehopt.c (check_eh_frame): Don't allow DW_CFA_advance_loc4
to be placed in a different frag to the rs_cfa.
---
gas/ehopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/ehopt.c b/gas/ehopt.c
index feea61b9..9d6606ad 100644
--- a/gas/ehopt.c
+++ b/gas/ehopt.c
@@ -386,7 +386,7 @@ check_eh_frame (expressionS *exp, unsigned int *pnbytes)
{
/* This might be a DW_CFA_advance_loc4. Record the frag and the
position within the frag, so that we can change it later. */
- frag_grow (1);
+ frag_grow (1 + 4);
d->state = state_saw_loc4;
d->loc4_frag = frag_now;
d->loc4_fix = frag_now_fix ();
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/binutils.git
[email protected]:opencloudos-stream/binutils.git
opencloudos-stream
binutils
binutils
master

搜索帮助