<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rtld-elf/amd64, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>rtld-elf: move powerpc-specific auxv compat code into arch hook</title>
<updated>2025-11-21T13:33:17+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-11-18T11:06:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2b3d2a962eb00005641546fbe672b95e5d0672a'/>
<id>b2b3d2a962eb00005641546fbe672b95e5d0672a</id>
<content type='text'>
Tested by:	Timothy Pearson (tpearson_raptorengineering.com)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53801
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tested by:	Timothy Pearson (tpearson_raptorengineering.com)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53801
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: assume the kernel supports RDFSBASE and RDGSBASE</title>
<updated>2025-08-08T17:15:21+00:00</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-08-08T17:15:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8d26a9da0c94f314b7e37a2784b13e2f5fb8052d'/>
<id>8d26a9da0c94f314b7e37a2784b13e2f5fb8052d</id>
<content type='text'>
There is no need to support pre-12.0 (and thus pre-ino64) kernels in a
15.x libc.

Continue to check if the CPU supports these features before using them
and fall back as required.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50732
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to support pre-12.0 (and thus pre-ino64) kernels in a
15.x libc.

Continue to check if the CPU supports these features before using them
and fall back as required.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50732
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld-elf: Pass struct tcb * around rather than struct dtv **</title>
<updated>2025-05-29T16:06:49+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2025-05-29T16:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=960f40b892cf15961f059f509990652555db7b4f'/>
<id>960f40b892cf15961f059f509990652555db7b4f</id>
<content type='text'>
When this code was first written we didn't have even a struct tcb, so to
make it MI a pointer to the DTV pointer in the TCB was passed around.
Now that we have a struct tcb we can simplify the code by instead
passing around a pointer to that, and the MI code can access the tcb_dtv
member wherever it happens to be in the layout. This reduces boilerplate
in all the various callers of tls_get_addr_common/slow and makes it
clearer that tls_get_addr_common/slow are operating on the TCB, rather
than obfuscating it slightly through the double pointer.

Whilst here, clarify the comments in aarch64's TLSDESC dynamic resolver,
which were using tp without clarifying what this was for (previously a
pointer to the DTV pointer, now a pointer to the TCB, which happen to be
the same thing for Variant I TLS, and in the case of AArch64 are what
TPIDR_EL0 point to directly, with no offset/bias).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50591
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When this code was first written we didn't have even a struct tcb, so to
make it MI a pointer to the DTV pointer in the TCB was passed around.
Now that we have a struct tcb we can simplify the code by instead
passing around a pointer to that, and the MI code can access the tcb_dtv
member wherever it happens to be in the layout. This reduces boilerplate
in all the various callers of tls_get_addr_common/slow and makes it
clearer that tls_get_addr_common/slow are operating on the TCB, rather
than obfuscating it slightly through the double pointer.

Whilst here, clarify the comments in aarch64's TLSDESC dynamic resolver,
which were using tp without clarifying what this was for (previously a
pointer to the DTV pointer, now a pointer to the TCB, which happen to be
the same thing for Variant I TLS, and in the case of AArch64 are what
TPIDR_EL0 point to directly, with no offset/bias).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50591
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: switch to amd64_set_tlsbase to set tls base</title>
<updated>2025-05-28T11:11:23+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-05-22T04:32:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=aef025fc9b6c8b06677086a93c866ee09622f6fa'/>
<id>aef025fc9b6c8b06677086a93c866ee09622f6fa</id>
<content type='text'>
Reported and tested:    Alex S &lt;iwtcex@gmail.com&gt;
Tested by:	pho
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50482
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported and tested:    Alex S &lt;iwtcex@gmail.com&gt;
Tested by:	pho
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50482
</pre>
</div>
</content>
</entry>
<entry>
<title>tls: Introduce struct dtv and struct dtv_slot</title>
<updated>2025-05-07T19:20:26+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2025-05-07T19:20:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=48cce2a2982ff3d13327c6cfbdf9441539ce42b3'/>
<id>48cce2a2982ff3d13327c6cfbdf9441539ce42b3</id>
<content type='text'>
Rather than treating the DTV as a raw array of uintptr_t, use proper
struct types and gain the benefit of having different types for
different members. In particular, the module slots now have real pointer
types so less casting is generally needed.

Note that, whilst struct dtv_slot may seem a little unnecessary, this
will help downstream in CheriBSD where we wish to be able to easily
alter the layout of a module's slot, which this helps abstract.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50231
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than treating the DTV as a raw array of uintptr_t, use proper
struct types and gain the benefit of having different types for
different members. In particular, the module slots now have real pointer
types so less casting is generally needed.

Note that, whilst struct dtv_slot may seem a little unnecessary, this
will help downstream in CheriBSD where we wish to be able to easily
alter the layout of a module's slot, which this helps abstract.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50231
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld-elf/amd64/reloc.c: apply clang-format</title>
<updated>2025-01-21T01:44:49+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-01-18T02:53:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3a85aa6a1d8916082155867ce0545a07185e8924'/>
<id>3a85aa6a1d8916082155867ce0545a07185e8924</id>
<content type='text'>
Discussed with:	emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D48509
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discussed with:	emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D48509
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld-elf/{amd64,i386}/reloc.c: remove unneeded #ifdef dbg</title>
<updated>2025-01-21T01:44:42+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-01-18T03:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e3035c52f25356299abc8e08be9221032967554d'/>
<id>e3035c52f25356299abc8e08be9221032967554d</id>
<content type='text'>
Discussed with:	emaste, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D48509
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discussed with:	emaste, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D48509
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld-elf: Pass parsed aux_info to ifunc_init</title>
<updated>2024-08-22T19:36:44+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-08-22T19:36:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=33658afd4e4d11cd71d92e52ca9da5381cdd829b'/>
<id>33658afd4e4d11cd71d92e52ca9da5381cdd829b</id>
<content type='text'>
Currently we pass the raw pointer to the on-stack auxargs. This can
legitimately have fewer than AT_COUNT entries, so the use of
__min_size(AT_COUNT), i.e. static AT_COUNT, is inaccurate, and also
needlessly forces the callee to iterate over the elements to find the
entry for a given type. Instead we can just pass aux_info like we use
for everything else.

Note that the argument has been left unused by every callee since its
introduction in 4352999e0e6c ("Pass CPUID[1] %edx (cpu_feature), %ecx
(cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx
(cpu_stdext_feature2) to the ifunc resolvers on x86.")

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46276
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we pass the raw pointer to the on-stack auxargs. This can
legitimately have fewer than AT_COUNT entries, so the use of
__min_size(AT_COUNT), i.e. static AT_COUNT, is inaccurate, and also
needlessly forces the callee to iterate over the elements to find the
entry for a given type. Instead we can just pass aux_info like we use
for everything else.

Note that the argument has been left unused by every callee since its
introduction in 4352999e0e6c ("Pass CPUID[1] %edx (cpu_feature), %ecx
(cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx
(cpu_stdext_feature2) to the ifunc resolvers on x86.")

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46276
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>rtld: Add arch_digest_dynamic</title>
<updated>2024-05-17T09:37:12+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2024-05-07T16:14:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dd4155bec744acf2ebfd037f7719c4aed9283a73'/>
<id>dd4155bec744acf2ebfd037f7719c4aed9283a73</id>
<content type='text'>
This will be used to handle the DT_AARCH64_VARIANT_PCS tag.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45117
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be used to handle the DT_AARCH64_VARIANT_PCS tag.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45117
</pre>
</div>
</content>
</entry>
</feed>
