summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-07 12:45:58 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-06-10 11:08:24 +0300
commit584fd3b31889852d0d6f3dd1e3d8e9619b660d2c (patch)
tree6343458bd05d3a2021ca0cdb3f62a13650dc01b2 /tools/perf/scripts/python/flamegraph.py
parent614124bea77e452aa6df7a8714e8bc820b489922 (diff)
downloadlinux-584fd3b31889852d0d6f3dd1e3d8e9619b660d2c.tar.xz
objtool: Fix .symtab_shndx handling for elf_create_undef_symbol()
When an ELF object uses extended symbol section indexes (IOW it has a .symtab_shndx section), these must be kept in sync with the regular symbol table (.symtab). So for every new symbol we emit, make sure to also emit a .symtab_shndx value to keep the arrays of equal size. Note: since we're writing an UNDEF symbol, most GElf_Sym fields will be 0 and we can repurpose one (st_size) to host the 0 for the xshndx value. Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()") Reported-by: Nick Desaulniers <ndesaulniers@google.com> Suggested-by: Fangrui Song <maskray@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lkml.kernel.org/r/YL3q1qFO9QIRL/BA@hirez.programming.kicks-ass.net
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions