diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-05-30 20:21:08 +0300 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-06-07 20:03:23 +0300 |
commit | 0696b6e314dbe4bd2f24d5e749469f57ea095a9f (patch) | |
tree | 8f14e562b2d87c27a829295ca14964f346316132 /tools/objtool/arch/x86/decode.c | |
parent | fcee899d2794319c9dbeb7b877b0c4ac92f5dd16 (diff) | |
download | linux-0696b6e314dbe4bd2f24d5e749469f57ea095a9f.tar.xz |
objtool: Get rid of reloc->addend
Get the addend from the embedded GElf_Rel[a] struct.
With allyesconfig + CONFIG_DEBUG_INFO:
- Before: peak heap memory consumption: 42.10G
- After: peak heap memory consumption: 40.37G
Link: https://lore.kernel.org/r/ad2354f95d9ddd86094e3f7687acfa0750657784.1685464332.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/arch/x86/decode.c')
-rw-r--r-- | tools/objtool/arch/x86/decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index ffb12e83b238..2e1caabecb18 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c @@ -623,11 +623,11 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec if (!immr || strcmp(immr->sym->name, "pv_ops")) break; - idx = (immr->addend + 8) / sizeof(void *); + idx = (reloc_addend(immr) + 8) / sizeof(void *); func = disp->sym; if (disp->sym->type == STT_SECTION) - func = find_symbol_by_offset(disp->sym->sec, disp->addend); + func = find_symbol_by_offset(disp->sym->sec, reloc_addend(disp)); if (!func) { WARN("no func for pv_ops[]"); return -1; |