1 Star 0 Fork 6

邓雨雨01/mingw-binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
binutils-disassembling-efi-files.patch 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
zhiyi 提交于 2020-10-08 17:29 . Initial version
diff -rupN --no-dereference binutils-2.32/bfd/coffgen.c binutils-2.32-new/bfd/coffgen.c
--- binutils-2.32/bfd/coffgen.c 2019-01-19 17:01:32.000000000 +0100
+++ binutils-2.32-new/bfd/coffgen.c 2019-11-19 20:47:07.835624150 +0100
@@ -2294,7 +2294,7 @@ coff_find_nearest_line_with_names (bfd *
information. So try again, using a bias against the address sought. */
if (coff_data (abfd)->dwarf2_find_line_info != NULL)
{
- bfd_signed_vma bias;
+ bfd_signed_vma bias = 0;
/* Create a cache of the result for the next call. */
if (sec_data == NULL && section->owner == abfd)
@@ -2306,10 +2306,11 @@ coff_find_nearest_line_with_names (bfd *
if (sec_data != NULL && sec_data->saved_bias)
bias = sec_data->saved_bias;
- else
+ else if (symbols)
{
bias = _bfd_dwarf2_find_symbol_bias (symbols,
& coff_data (abfd)->dwarf2_find_line_info);
+
if (sec_data)
{
sec_data->saved_bias = TRUE;
diff -rupN --no-dereference binutils-2.32/bfd/dwarf2.c binutils-2.32-new/bfd/dwarf2.c
--- binutils-2.32/bfd/dwarf2.c 2019-01-19 17:01:32.000000000 +0100
+++ binutils-2.32-new/bfd/dwarf2.c 2019-11-19 20:47:07.836624156 +0100
@@ -4472,7 +4472,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol **
stash = (struct dwarf2_debug *) *pinfo;
- if (stash == NULL)
+ if (stash == NULL || symbols == NULL)
return 0;
for (unit = stash->all_comp_units; unit; unit = unit->next_unit)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deng-yuyu-01/mingw-binutils.git
git@gitee.com:deng-yuyu-01/mingw-binutils.git
deng-yuyu-01
mingw-binutils
mingw-binutils
master

搜索帮助