gprof support for split debuginfo
Use debug BFD for symbol and line information when a separated
debuginfo file is found, enabling gprof to work correctly with
binaries stripped with "strip -g". Baby steps toward possible
future debuginfod/dwz support.
gprof/ChangeLog:
2026-04-29 Frank Ch. Eigler <fche@redhat.com>
* corefile.c: Add support for separated debuginfo files.
(core_debug_bfd): New static variable to store separated debug BFD.
(open_separated_debug_file): New function to locate and open external
debug files via .gnu_debuglink, .gnu_debugaltlink, or build-id.
(core_init): Call open_separated_debug_file() after opening the main
binary to locate external debug info.
* testsuite/Makefile.am, testsuite/tst-gmon-gprof-l2.sh: Run -l
test again, but against stripped version of test binary.
* testsuite/Makefile.in: Regenerated.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
4 files changed