objtool: use gelf_getsymshndx to handle >64k sections
authorSami Tolvanen <samitolvanen@google.com>
Tue, 21 Apr 2020 22:08:42 +0000 (15:08 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 15 May 2020 08:35:13 +0000 (10:35 +0200)
commit28fe1d7bf89f8ed5be70b98a33932dbaf99345dd
treebd543c11212349d8d87237f35aec063390b18577
parentab3852ab5cb8fd2e2c5bfa176e5f953353836907
objtool: use gelf_getsymshndx to handle >64k sections

Currently, objtool fails to load the correct section for symbols when
the index is greater than SHN_LORESERVE. Use gelf_getsymshndx instead
of gelf_getsym to handle >64k sections.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/20200421220843.188260-2-samitolvanen@google.com
tools/objtool/elf.c