Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Apr 2026 10:40:07 +0300
From:      Gleb Popov <arrowd@freebsd.org>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        Paul Floyd <paulf2718@gmail.com>,  "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Ed Maste <emaste@freebsd.org>
Subject:   Re: debug files now have program headers
Message-ID:  <CALH631nbdGh-31LvLEsn5C9iRdupWkxCQRmxrEuOJ-_USgbxSw@mail.gmail.com>
In-Reply-To: <4DDACD68-1AF2-4502-AF20-4EAB15B13659@FreeBSD.org>
References:  <707b0fa7-b345-4802-a018-d6050f4e8f8c@gmail.com> <4DDACD68-1AF2-4502-AF20-4EAB15B13659@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

On Mon, Apr 6, 2026 at 5:16 PM Dimitry Andric <dim@freebsd.org> wrote:
>
> On 6 Apr 2026, at 15:21, Paul Floyd <paulf2718@gmail.com> wrote:
> >
> > 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?
>
> I guess this is due to WITH_LLVM_BINUTILS being the default now.

That's correct, the informational context is here:
https://sourceware.org/bugzilla/show_bug.cgi?id=33876#c1


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631nbdGh-31LvLEsn5C9iRdupWkxCQRmxrEuOJ-_USgbxSw>