Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2025 05:31:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 288334] rtld: executing "/libexec/ld-elf.so.1 /usr/bin/ld.lld" results in a crash
Message-ID:  <bug-288334-227-QYS2rqF4gt@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-288334-227@https.bugs.freebsd.org/bugzilla/>

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

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288334

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=db9ef9d5f517a14160bb3d0a599b8392e01fb400

commit db9ef9d5f517a14160bb3d0a599b8392e01fb400
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-07-21 04:09:53 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-07-21 05:29:05 +0000

    rtld: do not relocate tlsinit address twice

    The addend for PT_TLS p_vaddr value should be obj' relocbase and not
    mapbase. It does not matter for dso which is linked at the address
    zero, but for executables in direct-exec mode with non-zero link
    address mapbase is already at the link base.  Then, adding mapbase to
    phtls->p_vaddr adds twice as much relocbase offset as needed.

    PR:     288334
    Reported by:    Jordan Gordeev <jgopensource@proton.me>
    Reviewed by:    jrtc27
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D51448

 libexec/rtld-elf/map_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-288334-227-QYS2rqF4gt>