We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools/objtool/elf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index be89c741ba9a..2b0f4f52f7b5 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -380,8 +380,11 @@ static int read_symbols(struct elf *elf) symtab = find_section_by_name(elf, ".symtab"); if (!symtab) { - WARN("missing symbol table"); - return -1; + /* + * A missing symbol table is actually possible if it's an empty + * .o file. This can happen for thunk_64.o. + */ + return 0; } symtab_shndx = find_section_by_name(elf, ".symtab_shndx");
-- 2.29.2
然后在Linux源码目录下执行 patch -p1 < thunkpatch.patch所在目录/thunkpatch.patch 再次编译就可以解决问题。
该方案改变了elf.c文件中的read_symbols函数,使之忽略.o文件中缺少symbol table的情况,使得编译能顺利进行下去
转载自https://www.spinics.net/lists/kernel/msg3797871.html 详情可见该帖
The text was updated successfully, but these errors were encountered:
No branches or pull requests
实验代码环境适配Ubuntu20.04及以下版本,使用Ubuntu22.04做的时候可能会出现兼容性问题,即make -j$(nproc)编译不通过等。可以通过以下方案解决,仅供参考:
新建一个文件thunkpatch.patch 填入:
--
2.29.2
然后在Linux源码目录下执行
patch -p1 < thunkpatch.patch所在目录/thunkpatch.patch
再次编译就可以解决问题。
该方案改变了elf.c文件中的read_symbols函数,使之忽略.o文件中缺少symbol table的情况,使得编译能顺利进行下去
转载自https://www.spinics.net/lists/kernel/msg3797871.html 详情可见该帖
The text was updated successfully, but these errors were encountered: