gprofng: support external debug info

Use bfd_follow_gnu_debuglink() and bfd_follow_gnu_debugaltlink() to find files
with debug info.
If necessary, gprofng-archive copies these files to EXP/archives.

For each executable, gprofng creates the Elf class twice.
One of them was a memory leak.
Fixed this by adding a new argument to Stabs::Stabs().

gprofng/ChangeLog
2025-07-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR 32147
	PR 30194
	* src/Disasm.cc (get_funcname_in_plt): Use the executable file instead
	of the debug information file.
	* src/Dwarf.h: Define debug_alt_strSec.
	* src/DwarfLib.cc: Add support for DW_FORM_GNU_ref_alt,
	DW_FORM_GNU_strp_alt.
	* src/Elf.h (find_gnu_debug_files, get_dwr_section): New functions.
	* src/Elf.cc: Likewise.
	* src/Experiment.cc (copy_file): Add the const qualifier.
	* src/Experiment.h: Likewise.
	* src/LoadObject.cc (get_elf, openDebugInfo): Find files with debug info.
	* src/LoadObject.h: Remove unused variables.
	* src/Module.cc: Remove an argument in openDebugInfo().
	* src/Stabs.cc (Stabs::Stabs): Add the Elf* argument.
	* src/Stabs.h: Likewise.
	* src/gp-archive.cc: Archive files with debug info.
	* src/gp-archive.h (archive_file): New function.
15 files changed