diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-12 14:41:32 -0600 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-12 14:41:32 -0600 |
commit | cf4d5be89c0ad339108e672a2f973bf276bd5d2c (patch) | |
tree | d50ccc4fe07f2e16578d390f7f5418a010a23106 /tools | |
parent | f129b61612af0627fb208b5daf6666f7a3ad9e07 (diff) | |
parent | cad90e5381d840cf2296aaac9b3eff71a30b7c5b (diff) | |
download | linux-cf4d5be89c0ad339108e672a2f973bf276bd5d2c.tar.bz2 |
Merge tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fix from Ingo Molnar:
- Fix objtool to be more permissive with hand-written assembly that
uses non-function symbols in executable sections.
* tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool: Tolerate STT_NOTYPE symbols at end of section
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objtool/check.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 4350be739f4f..4b7c8b33069e 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -427,6 +427,15 @@ static int decode_instructions(struct objtool_file *file) if (func->type != STT_NOTYPE && func->type != STT_FUNC) continue; + if (func->offset == sec->sh.sh_size) { + /* Heuristic: likely an "end" symbol */ + if (func->type == STT_NOTYPE) + continue; + WARN("%s(): STT_FUNC at end of section", + func->name); + return -1; + } + if (func->return_thunk || func->alias != func) continue; |