aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/elf.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-07-17 20:36:48 -0500
committerThomas Gleixner <tglx@linutronix.de>2019-07-18 21:01:07 +0200
commite10cd8fe8ddfd28a172d2be57ae0e90c7f752e6a (patch)
tree819c6225b6167c23c52a230860eb4424157146d9 /tools/objtool/elf.c
parentobjtool: Track original function across branches (diff)
downloadlinux-dev-e10cd8fe8ddfd28a172d2be57ae0e90c7f752e6a.tar.xz
linux-dev-e10cd8fe8ddfd28a172d2be57ae0e90c7f752e6a.zip
objtool: Refactor function alias logic
- Add an alias check in validate_functions(). With this change, aliases no longer need uaccess_safe set. - Add an alias check in decode_instructions(). With this change, the "if (!insn->func)" check is no longer needed. - Don't create aliases for zero-length functions, as it can have unexpected results. The next patch will spit out a warning for zero-length functions anyway. 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/26a99c31426540f19c9a58b9e10727c385a147bc.1563413318.git.jpoimboe@redhat.com
Diffstat (limited to '')
-rw-r--r--tools/objtool/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index e18698262837..9194732a673d 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -278,7 +278,7 @@ static int read_symbols(struct elf *elf)
}
if (sym->offset == s->offset) {
- if (sym->len == s->len && alias == sym)
+ if (sym->len && sym->len == s->len && alias == sym)
alias = s;
if (sym->len >= s->len) {