[Bug default/33876] Assertion failed: (__abg_cond__), function maybe_adjust_address_for_exec_or_dyn
emaste at freebsd dot org
sourceware-bugzilla@sourceware.org
Fri Feb 27 20:43:51 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33876
emaste at freebsd dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |emaste at freebsd dot org
--- Comment #1 from emaste at freebsd dot org ---
What FreeBSD version are you running?
ELF Tool Chain's objcopy is used in FreeBSD 14.x and earlier and it seems this
is its behaviour:
$ cc -g hello.c
$ elftc-objcopy --only-keep-debug a.out a.out.debug
$ readelf -l a.out.debug
There are no program headers in this file.
...
FreeBSD 15.0 and later switch to LLVM's binutils-like tools. My system has the
tools from LLVM 21 installed but I imagine this hasn't changed since 19.x which
is in FreeBSD 15 and -current. LLVM's objcopy leaves the program headers in
place:
$ objcopy --version
llvm-objcopy, compatible with GNU objcopy
LLVM (http://llvm.org/):
LLVM version 21.1.7
Optimized build with assertions.
$ objcopy --only-keep-debug a.out a.out.debug
$ readelf -l a.out.debug
readelf: warning: 'a.out.debug': no valid dynamic table was found
Elf file type is EXEC (Executable file)
Entry point 0x400470
There are 8 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz
Flg Align
PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x0001c0
0x0001c0 R 0x8
...
So this should not be an issue on FreeBSD 15 and later.
IMO though the parser should handle this -- debug data isn't loadable and so
program headers shouldn't be necessary. GDB and LLDB work just fine with
standalone debug data generated by ELF Tool Chain.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libabigail
mailing list