mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
objtool: Warn on zero-length functions
All callable functions should have an ELF size. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/03d429c4fa87829c61c5dc0e89652f4d9efb62f1.1563413318.git.jpoimboe@redhat.com
This commit is contained in:
parent
e10cd8fe8d
commit
61e9b75a0c
1 changed files with 6 additions and 0 deletions
|
@ -2357,6 +2357,12 @@ static int validate_functions(struct objtool_file *file)
|
||||||
if (func->type != STT_FUNC)
|
if (func->type != STT_FUNC)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!func->len) {
|
||||||
|
WARN("%s() is missing an ELF size annotation",
|
||||||
|
func->name);
|
||||||
|
warnings++;
|
||||||
|
}
|
||||||
|
|
||||||
if (func->pfunc != func || func->alias != func)
|
if (func->pfunc != func || func->alias != func)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue