aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2025-02-11 19:50:10 +0800
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-03-12 15:43:38 -0700
commitab6ce22b789622ca732e91cbb3a5cb5ba370cbd0 (patch)
tree0cd4ca8729ef722721be76723230bdbc8be83752 /tools/perf/scripts/python/export-to-postgresql.py
parentobjtool: Hide unnecessary compiler error message (diff)
downloadwireguard-linux-ab6ce22b789622ca732e91cbb3a5cb5ba370cbd0.tar.xz
wireguard-linux-ab6ce22b789622ca732e91cbb3a5cb5ba370cbd0.zip
objtool: Handle various symbol types of rodata
In the relocation section ".rela.rodata" of each .o file compiled with LoongArch toolchain, there are various symbol types such as STT_NOTYPE, STT_OBJECT, STT_FUNC in addition to the usual STT_SECTION, it needs to use reloc symbol offset instead of reloc addend to find the destination instruction in find_jump_table() and add_jump_table(). For the most part, an absolute relocation type is used for rodata. In the case of STT_SECTION, reloc->sym->offset is always zero, and for the other symbol types, reloc_addend(reloc) is always zero, thus it can use a simple statement "reloc->sym->offset + reloc_addend(reloc)" to obtain the symbol offset for various symbol types. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Link: https://lore.kernel.org/r/20250211115016.26913-2-yangtiezhu@loongson.cn Acked-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions