Skip to content
Commit 5141d3a0 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Kees Cook
Browse files

objtool: Preserve special st_shndx indexes in elf_update_symbol



elf_update_symbol fails to preserve the special st_shndx values
between [SHN_LORESERVE, SHN_HIRESERVE], which results in it
converting SHN_ABS entries into SHN_UNDEF, for example. Explicitly
check for the special indexes and ensure these symbols are not
marked undefined.

Fixes: ead165fa ("objtool: Fix symbol creation")
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220908215504.3686827-17-samitolvanen@google.com
parent 5659b598
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment