<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rtld-elf, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>rtld: add test for dlopen("#dirfd/path")</title>
<updated>2026-04-02T02:41:56+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-03-30T00:42:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=72252591ac01037fa53501adb88f00d5d3cc09ed'/>
<id>72252591ac01037fa53501adb88f00d5d3cc09ed</id>
<content type='text'>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	 https://reviews.freebsd.org/D56152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	 https://reviews.freebsd.org/D56152
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: allow dlopen("#&lt;number&gt;/&lt;path&gt;")</title>
<updated>2026-04-02T02:41:55+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-03-29T22:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ffbf3fecdeffa17c0745e7ed342989acb620d68e'/>
<id>ffbf3fecdeffa17c0745e7ed342989acb620d68e</id>
<content type='text'>
When a specially formatted path is passed to dlopen(), of the form
  #number/path
and the number is the valid dirfd file descriptor listed in the
LD_LIBRARY_FDS, interpret it as a relative path name against dirfd
number.

This complements the result returned from dladdr() for such objects
in dli_fname.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a specially formatted path is passed to dlopen(), of the form
  #number/path
and the number is the valid dirfd file descriptor listed in the
LD_LIBRARY_FDS, interpret it as a relative path name against dirfd
number.

This complements the result returned from dladdr() for such objects
in dli_fname.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56152
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: check for overflow in parse_integer()</title>
<updated>2026-03-30T16:56:52+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-03-29T22:45:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7cfffe25da3fbc2db4bcf073ff2d240f84233973'/>
<id>7cfffe25da3fbc2db4bcf073ff2d240f84233973</id>
<content type='text'>
Reviewed by:	dim, emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56151
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	dim, emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56151
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: add a test for rtld_set_var (with LIBRARY_PATH_FDS)</title>
<updated>2026-03-26T23:41:23+00:00</updated>
<author>
<name>Alex S</name>
<email>iwtcex@gmail.com</email>
</author>
<published>2026-03-25T00:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f16078b5f8c44d5718ecc940ab0b4ed5a1877a5'/>
<id>9f16078b5f8c44d5718ecc940ab0b4ed5a1877a5</id>
<content type='text'>
PR:	294054
Reviewed by:	kib
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:	294054
Reviewed by:	kib
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: properly handle update of several vars in rtld_set_var()</title>
<updated>2026-03-26T23:41:23+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-03-24T01:43:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b9f046d941c4dbd0e4fc634827ada6e7cf6a6bcf'/>
<id>b9f046d941c4dbd0e4fc634827ada6e7cf6a6bcf</id>
<content type='text'>
Besides setting the value in the array of the values, rtld sometimes
needs to recalculate some internal control variable for the change to
take effect.  Allow the variable description to supply a method called
on the update.  Lock the function with the bind lock for safe operation.

Mark several variables as allowed for update, since the on_update method
is provided for them.  The list is LD_BIND_NOW, LD_BIND_NOT,
LD_LIBMAP_DISABLE, LD_LOADFLTR.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56055
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Besides setting the value in the array of the values, rtld sometimes
needs to recalculate some internal control variable for the change to
take effect.  Allow the variable description to supply a method called
on the update.  Lock the function with the bind lock for safe operation.

Mark several variables as allowed for update, since the on_update method
is provided for them.  The list is LD_BIND_NOW, LD_BIND_NOT,
LD_LIBMAP_DISABLE, LD_LOADFLTR.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56055
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld-elf: Remove stray _exit prototype for aarch64</title>
<updated>2026-03-13T19:25:04+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2026-03-13T19:25:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c70f382a8b3907069589954433fe091687f15373'/>
<id>c70f382a8b3907069589954433fe091687f15373</id>
<content type='text'>
It's not clear why this is here. It's existed since the very first
version of rtld-elf for aarch64 but has never been used, and anything
actually using exit or _exit should be using rtld_libc.h's #define that
aliases them to __sys_exit.

Fixes:	047c6e3ae6ab ("Add the arm64 code to the runtime linker. It's not able to be built as we still need libc_pic for a few things, but this is expected to be ready soon.")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not clear why this is here. It's existed since the very first
version of rtld-elf for aarch64 but has never been used, and anything
actually using exit or _exit should be using rtld_libc.h's #define that
aliases them to __sys_exit.

Fixes:	047c6e3ae6ab ("Add the arm64 code to the runtime linker. It's not able to be built as we still need libc_pic for a few things, but this is expected to be ready soon.")
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Additional icache paranoia: non-PLT relocations can modify the text segment."</title>
<updated>2026-02-08T16:39:44+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2026-02-08T16:35:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5beaa1ee7595ce4a09ac4827ec3e3e2aa13a9f67'/>
<id>5beaa1ee7595ce4a09ac4827ec3e3e2aa13a9f67</id>
<content type='text'>
reloc_nonplt_object, and thus reloc_non_plt, only ever handles data
relocations, so this paranoia is completely unfounded and only has the
effect of significantly slowing down program startup for binaries with
large amounts of code, like Clang.

If this breaks any systems, that would likely be due to insufficient
flushing in the pmap implementation for executable mappings, as this
existing rtld behaviour would mask any such bugs.

This reverts commit 4b51c69976fd84e93ec7695858375c8150c4fe61.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D54221
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
reloc_nonplt_object, and thus reloc_non_plt, only ever handles data
relocations, so this paranoia is completely unfounded and only has the
effect of significantly slowing down program startup for binaries with
large amounts of code, like Clang.

If this breaks any systems, that would likely be due to insufficient
flushing in the pmap implementation for executable mappings, as this
existing rtld behaviour would mask any such bugs.

This reverts commit 4b51c69976fd84e93ec7695858375c8150c4fe61.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D54221
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: Use a helper variable to simplify a few lines</title>
<updated>2026-01-15T18:23:42+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-01-15T18:23:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6d6bf4a892d6be84ec59fce5419eab616bcabb40'/>
<id>6d6bf4a892d6be84ec59fce5419eab616bcabb40</id>
<content type='text'>
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54507
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54507
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: Switch to using &lt;assert.h&gt; for assert</title>
<updated>2026-01-14T17:10:33+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-01-14T17:10:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3ea97c9de2b24c685d42be12dd57fad2f67b3f1b'/>
<id>3ea97c9de2b24c685d42be12dd57fad2f67b3f1b</id>
<content type='text'>
The stock assert() works because rtld-libc includes a custom
implementation of __assert().

Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54712
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The stock assert() works because rtld-libc includes a custom
implementation of __assert().

Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54712
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers</title>
<updated>2026-01-14T17:10:33+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-01-14T17:10:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e96ec1a1eb935aa2febcbf9629a52c85297a088e'/>
<id>e96ec1a1eb935aa2febcbf9629a52c85297a088e</id>
<content type='text'>
This is a no-op on non-CHERI architectures, but is required for CHERI
where Elf_Addr is only an address and not a complete pointer.

While here, consistently use `uintptr_t *` for arrays of init/fini
function pointers.

Reviewed by:	imp, kib
Effort:		CHERI upstreaming
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54711
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a no-op on non-CHERI architectures, but is required for CHERI
where Elf_Addr is only an address and not a complete pointer.

While here, consistently use `uintptr_t *` for arrays of init/fini
function pointers.

Reviewed by:	imp, kib
Effort:		CHERI upstreaming
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54711
</pre>
</div>
</content>
</entry>
</feed>
