1 Star 0 Fork 25

光明顶魔教工程师/binutils

forked from src-anolis-os/binutils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
binutils-ppc64le-note-merge.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 15:59 . update to binutils-2.30-93.el8.src.rpm
--- binutils.orig/binutils/objcopy.c 2021-02-18 11:35:48.062479490 +0000
+++ binutils-2.30/binutils/objcopy.c 2021-02-18 11:36:52.207071148 +0000
@@ -2224,6 +2224,11 @@ merge_gnu_build_notes (bfd * ab
goto done;
}
+ if (start > end)
+ /* This can happen with PPC64LE binaries where empty notes are
+ encoded as start = end + 4. */
+ start = end;
+
if (is_open_note (pnote))
{
if (start)
--- binutils.orig/binutils/objcopy.c 2021-02-22 16:04:09.390542219 +0000
+++ binutils-2.30/binutils/objcopy.c 2021-02-22 16:04:32.214392597 +0000
@@ -2195,23 +2195,8 @@ merge_gnu_build_notes (bfd * ab
break;
case 8:
- if (! is_64bit (abfd))
- {
- start = bfd_get_32 (abfd, pnote->note.descdata);
- end = bfd_get_32 (abfd, pnote->note.descdata + 4);
- }
- else
- {
- start = bfd_get_64 (abfd, pnote->note.descdata);
- /* FIXME: For version 1 and 2 notes we should try to
- calculate the end address by finding a symbol whose
- value is START, and then adding in its size.
-
- For now though, since v1 and v2 was not intended to
- handle gaps, we chose an artificially large end
- address. */
- end = (bfd_vma) 0x7ffffffffffffffUL;
- }
+ start = bfd_get_32 (abfd, pnote->note.descdata);
+ end = bfd_get_32 (abfd, pnote->note.descdata + 4);
break;
case 16:
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaojun_chao/binutils.git
git@gitee.com:zhaojun_chao/binutils.git
zhaojun_chao
binutils
binutils
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385