]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Don't use INTUSE in libdwP.h str_offsets_base_off
authorMark Wielaard <mark@klomp.org>
Sat, 2 Mar 2024 23:45:34 +0000 (00:45 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 2 Mar 2024 23:45:49 +0000 (00:45 +0100)
commit7cf4586e5b429c0fa74d3ae73f49e6cda6660e93
tree4b4291e8ca74025b910b089a97f778611a1e0834
parent18a015c0b0787ba5acb39801ab7c17dac50f584d
libdw: Don't use INTUSE in libdwP.h str_offsets_base_off

readelf.c cheats and include libdwP.h, which is an internal only
header of libdw. It really shouldn't do that, but there are some
internals that readelf currently needs. The str_offsets_base_off
function used by readelf uses INTUSE when calling dwarf_get_units.
This is a micro optimization useful inside libdw so a public
function can be called directly, skipping a PLT call. This can
cause issues linking readelf since it might not be able to call
the internal function, since readelf.c isn't part of libdw itself.
Just drop the INTUSE.

* libdw/libdwP.h (str_offsets_base_off): Don't use INTUSE
when calling dwarf_get_units.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/libdwP.h