Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 2026 15:21:14 +0200
From:      Paul Floyd <paulf2718@gmail.com>
To:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   debug files now have program headers
Message-ID:  <707b0fa7-b345-4802-a018-d6050f4e8f8c@gmail.com>

index | next in thread | raw e-mail

Hi

I just noticed that debug files now contain program headers.

For instance, on 14.3-RELEASE

paulf> file /usr/lib/debug/lib/libc.so.7.debug
/usr/lib/debug/lib/libc.so.7.debug: ELF 64-bit LSB shared object, 
x86-64, version 1 (FreeBSD), no program
header, for FreeBSD 14.3, with debug_info, not stripped

but on 16.0-CURRENT

paulf> file /usr/lib/debug/lib/libc.so.7.debug
/usr/lib/debug/lib/libc.so.7.debug: ELF 64-bit LSB shared object, ARM 
aarch64, version 1 (FreeBSD), dynamically linked, for FreeBSD 16.0 
(1600014), with debug_info, not stripped

(I've seen this on amd64 and arm64).

That's causing problems with Valgrind if you use double verbose output 
(-v -v). With those options Valgrind will print details of functions 
that it redirects. Now that libc.so.debug looks like a real shared 
library rather than just a split debuginfo file Valgrind will try to 
read it for extra information. That extra information stomps on the 
correct information that it read from libc.so.7. The result is that 
functions like malloc no longer get redirected.

That's not a problem for most users but it is quite a big issue for me 
trying to debug Valgrind itself.

Is this going to be a permanent change?

A+

Paul




home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?707b0fa7-b345-4802-a018-d6050f4e8f8c>