summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorPetr Pavlu <petr.pavlu@suse.com>2026-01-26 16:13:48 +0100
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-01-27 08:20:41 -0800
commitd107b3265aa5e61a1e326b2815a767526ddb12ac (patch)
tree7b29ae5426f5106dbf6b8a326b55cc0838f0a2d3 /tools/perf/scripts/python/flamegraph.py
parentfd4eeb30b9e30ca1118a618be0755287bcbb2da9 (diff)
objtool: Replace custom macros in elf.c with shared ones
The source file tools/objtool/elf.c defines the macros ALIGN_UP(), ALIGN_UP_POW2() and MAX(). These macros unnecessarily duplicate functionality already available under tools/include/, specifically ALIGN(), roundup_pow_of_two() and max(). More importantly, the definition of ALIGN_UP_POW2() is incorrect when the input is 1, as it results in a call to __builtin_clz(0), which produces an undefined result. This issue impacts the function elf_alloc_reloc(). When adding the first relocation to a section, the function allocates an undefined number of relocations. Replace the custom macros with the shared functionality to resolve these issues. Fixes: 2c05ca026218 ("objtool: Add elf_create_reloc() and elf_init_reloc()") Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> Link: https://patch.msgid.link/20260126151356.3924887-1-petr.pavlu@suse.com Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions