#
1cd90a2c |
| 13-May-2024 |
Andrew Turner <andrew@FreeBSD.org> |
rtld: Move powerpc specific code to powerpc files
There are two variables set by dynamic tags in the powerpc runtime linker. Now we have a way to split out architecture-specific dynamic tags use it
rtld: Move powerpc specific code to powerpc files
There are two variables set by dynamic tags in the powerpc runtime linker. Now we have a way to split out architecture-specific dynamic tags use it to handle these.
Reviewed by: kib, jhibbits Obtained from: jhibbits (earlier version) Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45182
show more ...
|
#
dd4155be |
| 07-May-2024 |
Andrew Turner <andrew@FreeBSD.org> |
rtld: Add arch_digest_dynamic
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
|
#
06db20ff |
| 07-May-2024 |
Andrew Turner <andrew@FreeBSD.org> |
rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry
Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry.
Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: htt
rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry
Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry.
Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45116
show more ...
|
Revision tags: release/13.3.0, release/14.0.0, release/13.2.0 |
|
#
d8925a5f |
| 05-Apr-2023 |
Andrew Turner <andrew@FreeBSD.org> |
Support BTI in rtld
Read the elf note to decide when to set the guard page on arm64.
Reviewed by: kib Sponsored by: Arm Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://revie
Support BTI in rtld
Read the elf note to decide when to set the guard page on arm64.
Reviewed by: kib Sponsored by: Arm Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39452
show more ...
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
#
b069d3e0 |
| 04-Jan-2023 |
John Baldwin <jhb@FreeBSD.org> |
rtld: Revert "When loading dso without PT_GNU_STACK phdr, only call"
After the removal of ia64 and sparc64, all current architectures support executable stacks at an architectural level.
This rever
rtld: Revert "When loading dso without PT_GNU_STACK phdr, only call"
After the removal of ia64 and sparc64, all current architectures support executable stacks at an architectural level.
This reverts commit 1290d38ac50b3afa7e5781d9d97346a1042c736c.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D37904
show more ...
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
8bcdb144 |
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
TLS: Use <machine/tls.h> for libc and rtld.
- Include <machine/tls.h> in MD rtld_machdep.h headers.
- Remove local definitions of TLS_* constants from rtld_machdep.h headers and libc using the va
TLS: Use <machine/tls.h> for libc and rtld.
- Include <machine/tls.h> in MD rtld_machdep.h headers.
- Remove local definitions of TLS_* constants from rtld_machdep.h headers and libc using the values from <machine/tls.h> instead.
- Use _tcb_set() instead of inlined versions in MD allocate_initial_tls() routines in rtld. The one exception is amd64 whose _tcb_set() invokes the amd64_set_fsbase ifunc. rtld cannot use ifuncs, so amd64 inlines the logic to optionally write to fsbase directly.
- Use _tcb_set() instead of _set_tp() in libc.
- Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc. This permits removing _get_tp.c from rtld.
- Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD allocate_initial_tls() routines in rtld.
Reviewed by: kib, jrtc27 (earlier version) Differential Revision: https://reviews.freebsd.org/D33353
show more ...
|
Revision tags: release/12.3.0 |
|
#
8f63fa78 |
| 14-Aug-2021 |
Fangrui Song <i@maskray.me> |
rtld: Remove calculate_tls_end
Variant I architectures use off and Variant II ones use size + off. Define TLS_VARIANT_I/TLS_VARIANT_II symbols similarly to how libc handles it.
Reviewed by: kib MFC
rtld: Remove calculate_tls_end
Variant I architectures use off and Variant II ones use size + off. Define TLS_VARIANT_I/TLS_VARIANT_II symbols similarly to how libc handles it.
Reviewed by: kib MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31539 Differential revision: https://reviews.freebsd.org/D31541
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
e5c3405c |
| 19-Apr-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Align initial-exec TLS segments to the p_vaddr % align.
This is continuation of D21163/r359634, which handled the alignment for global mode.
Non-x86 arches are not handled, maintainers are welcomed
Align initial-exec TLS segments to the p_vaddr % align.
This is continuation of D21163/r359634, which handled the alignment for global mode.
Non-x86 arches are not handled, maintainers are welcomed.
Tested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D24366
show more ...
|
#
41b4ec8a |
| 24-Dec-2019 |
Brandon Bergren <bdragon@FreeBSD.org> |
[PowerPC] powerpc64 rtld IFUNC handling code
As PowerPC is moving to clang, we can finally start taking advantage of IFUNC.
Implement the MD parts of IFUNC handling for rtld.
Currently, it is nece
[PowerPC] powerpc64 rtld IFUNC handling code
As PowerPC is moving to clang, we can finally start taking advantage of IFUNC.
Implement the MD parts of IFUNC handling for rtld.
Currently, it is necessary to look for R_PPC_IRELATIVE in the PLT in addition to RELA. This is an ABI violation, but LLD9 has some .iplt bugs that require this as a workaround.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22789
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|
#
903e0ffd |
| 29-Oct-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
rtld-elf: compile with WANRS=4 warnings other than -Wcast-align
Reviewed By: kib Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17153
|
#
3af64f03 |
| 11-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338392 through r338594.
|
#
17fb2856 |
| 06-Sep-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Rework rtld's TLS Variant I implementation to match r326794
The above commit fixed handling overaligned TLS segments in libc's TLS Variant I implementation, but rtld provides its own implementation
Rework rtld's TLS Variant I implementation to match r326794
The above commit fixed handling overaligned TLS segments in libc's TLS Variant I implementation, but rtld provides its own implementation for dynamically-linked executables which lacks these fixes. Thus, port these changes to rtld.
This was previously commited as r337978 and reverted in r338149 due to exposing a bug the ARM rtld. This bug was fixed in r338317 by mmel.
Submitted by: James Clarke Approved by: re (kib) Reviewed by: kbowling Testing by: kbowling (powerpc64), br (riscv), kevans (armv7) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16510
show more ...
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
a5207d3e |
| 21-Aug-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Revert r337978: Rework rtld's TLS Variant I implementation to match r326794
Michal Meloun reports that it breaks ctype (isspace()..) related functions on armv7 so back out while we diagnose the issu
Revert r337978: Rework rtld's TLS Variant I implementation to match r326794
Michal Meloun reports that it breaks ctype (isspace()..) related functions on armv7 so back out while we diagnose the issue.
Reported by: Michal Meloun <melounmichal@gmail.com>
show more ...
|
#
3611ec60 |
| 18-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337646 through r338014.
|
#
9b50d816 |
| 17-Aug-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Rework rtld's TLS Variant I implementation to match r326794
The above commit fixed handling overaligned TLS segments in libc's TLS Variant I implementation, but rtld provides its own implementation
Rework rtld's TLS Variant I implementation to match r326794
The above commit fixed handling overaligned TLS segments in libc's TLS Variant I implementation, but rtld provides its own implementation for dynamically-linked executables which lacks these fixes. Thus, port these changes to rtld.
Submitted by: James Clarke Reviewed by: kbowling Testing byL kbowling (powerpc64), br (riscv), kevans (armv7) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16510
show more ...
|
Revision tags: release/11.2.0 |
|
#
e6209940 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
libexec: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone -
libexec: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
No functional change intended.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
d02c951f |
| 26-May-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r318658 through r318963.
|
#
7fb37371 |
| 26-May-2017 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
rtld: fix warnings about redundant declarations
Fix warnings about redundant declarations in rtld when libthr in increased to WARNS=6.
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Diff
rtld: fix warnings about redundant declarations
Fix warnings about redundant declarations in rtld when libthr in increased to WARNS=6.
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10934
show more ...
|
#
e35ddbe4 |
| 15-Mar-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement LD_BIND_NOT knob for rtld.
From the manpage: When set to a nonempty string, prevents modifications of the PLT slots when doing bindings. As result, each call of the PLT-resolved function
Implement LD_BIND_NOT knob for rtld.
From the manpage: When set to a nonempty string, prevents modifications of the PLT slots when doing bindings. As result, each call of the PLT-resolved function is resolved. In combination with debug output, this provides complete account of all bind actions at runtime.
Same feature exists on Linux and Solaris.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
#
67bc8c8b |
| 19-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308491 through r308841.
|
#
4352999e |
| 15-Nov-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
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.
It is much more clean to use CPUID instruction
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.
It is much more clean to use CPUID instruction in usermode to retrieve this information than to pass AT_HWCAP aux vector from kernel, on x86. Still, the change does allow for use of AT_HWCAP on arches where it is needed, by passing aux array to ifunc_init() initializer which should prepare arguments for ifunc resolvers.
Current signature for resolvers on x86 is func_t iresolve(uint32_t cpu_feature, uint32_t cpu_feature2, uint32_t cpu_stdext_feature, uint32_t cpu_stdext_feature2); where arguments have identical meaning as the kernel variables of the same name. The ABIs allow to use resolvers with the void or shortened list of arguments.
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8448
show more ...
|