History log of /src/libexec/rtld-elf/aarch64/rtld_start.S (Results 1 – 25 of 87)
Revision Date Author Comments
# 960f40b8 29-May-2025 Jessica Clarke <jrtc27@FreeBSD.org>

rtld-elf: Pass struct tcb * around rather than struct dtv **

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 ar

rtld-elf: Pass struct tcb * around rather than struct dtv **

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

show more ...


# 5c2bc3db 30-Jul-2024 Ed Maste <emaste@FreeBSD.org>

Remove "All Rights Reserved" from FreeBSD Foundation copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder.

Sponsored by: The FreeBSD Foundation


# 5270cc97 12-Oct-2023 Andrew Turner <andrew@FreeBSD.org>

rtld: Teach rtld about the BTI elf note

Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for rtld to have it we need
to insert it in all asm

rtld: Teach rtld about the BTI elf note

Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for rtld to have it we need
to insert it in all asm files.

Reviewed by: markj, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42228

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# ac7759f5 07-Jul-2023 Dmitry Chagin <dchagin@FreeBSD.org>

rtld: Annotate .rtld_start on aarch64

1. Add a stop indicator to rtld_start to satisfy unwinders on aarch64:
The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/D

rtld: Annotate .rtld_start on aarch64

1. Add a stop indicator to rtld_start to satisfy unwinders on aarch64:
The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/Dwarf3.pdf - page 118:
If a Return Address register is defined in the virtual unwind table,
and its rule is undefined (for example, by DW_CFA_undefined), then
there is no return address and no call address, and the virtual
unwind of stack activations is complete.

2. Add a proper annotations for CFA.

That is allows gdb and libunwind successfully stop when unwinding stack
from global constructors and destructors.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D40844

show more ...


# 5645dfb4 07-Jul-2023 Dmitry Chagin <dchagin@FreeBSD.org>

rtld: Sligtly optimizing .rtld_start on aarch64

Use the LDP (load pair registers) instruction to load entry point
arguments from the stack.

Reviewed by:
Differential Revision: https://reviews.freeb

rtld: Sligtly optimizing .rtld_start on aarch64

Use the LDP (load pair registers) instruction to load entry point
arguments from the stack.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D40843

show more ...


# 3576233c 03-Sep-2022 Gordon Bergling <gbe@FreeBSD.org>

rtld(1): Fix a typo in a source code comment

- s/interger/integer/

MFC after: 3 days


# 78599c32 05-Dec-2020 Conrad Meyer <cem@FreeBSD.org>

Add CFI start/end proc directives to arm64, i386, and ppc

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which

Add CFI start/end proc directives to arm64, i386, and ppc

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which
appear to be ARM-specific variants of the same thing. Likewise, MIPS
uses .frame directives.

Reviewed by: arichardson
Differential Revision: https://reviews.freebsd.org/D27387

show more ...


# 4849c3a5 15-Dec-2018 Michal Meloun <mmel@FreeBSD.org>

Improve R_AARCH64_TLSDESC relocation.
The original code did not support dynamically loaded libraries and used
suboptimal access to TLS variables.
New implementation removes lazy resolving of TLS relo

Improve R_AARCH64_TLSDESC relocation.
The original code did not support dynamically loaded libraries and used
suboptimal access to TLS variables.
New implementation removes lazy resolving of TLS relocation - due to flaw
in TLSDESC design is impossible to switch resolver function at runtime
without expensive locking.

Due to this, 3 specialized resolvers are implemented:
- load time resolver for TLS relocation from libraries loaded with main
executable (thus with known TLS offset).
- resolver for undefined thread weak symbols.
- slower lazy resolver for dynamically loaded libraries with fast path for
already resolved symbols.

PR: 228892, 232149, 233204, 232311
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18417

show more ...


# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


# e8c479fd 05-Dec-2018 Michal Meloun <mmel@FreeBSD.org>

Fix style(9).
Not a functional change.

MFC after: 1 week


# 960f40b8 29-May-2025 Jessica Clarke <jrtc27@FreeBSD.org>

rtld-elf: Pass struct tcb * around rather than struct dtv **

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 ar

rtld-elf: Pass struct tcb * around rather than struct dtv **

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

show more ...


# 5c2bc3db 30-Jul-2024 Ed Maste <emaste@FreeBSD.org>

Remove "All Rights Reserved" from FreeBSD Foundation copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder.

Sponsored by: The FreeBSD Foundation


# 5270cc97 12-Oct-2023 Andrew Turner <andrew@FreeBSD.org>

rtld: Teach rtld about the BTI elf note

Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for rtld to have it we need
to insert it in all asm

rtld: Teach rtld about the BTI elf note

Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for rtld to have it we need
to insert it in all asm files.

Reviewed by: markj, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42228

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# ac7759f5 07-Jul-2023 Dmitry Chagin <dchagin@FreeBSD.org>

rtld: Annotate .rtld_start on aarch64

1. Add a stop indicator to rtld_start to satisfy unwinders on aarch64:
The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/D

rtld: Annotate .rtld_start on aarch64

1. Add a stop indicator to rtld_start to satisfy unwinders on aarch64:
The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/Dwarf3.pdf - page 118:
If a Return Address register is defined in the virtual unwind table,
and its rule is undefined (for example, by DW_CFA_undefined), then
there is no return address and no call address, and the virtual
unwind of stack activations is complete.

2. Add a proper annotations for CFA.

That is allows gdb and libunwind successfully stop when unwinding stack
from global constructors and destructors.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D40844

show more ...


# 5645dfb4 07-Jul-2023 Dmitry Chagin <dchagin@FreeBSD.org>

rtld: Sligtly optimizing .rtld_start on aarch64

Use the LDP (load pair registers) instruction to load entry point
arguments from the stack.

Reviewed by:
Differential Revision: https://reviews.freeb

rtld: Sligtly optimizing .rtld_start on aarch64

Use the LDP (load pair registers) instruction to load entry point
arguments from the stack.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D40843

show more ...


# 3576233c 03-Sep-2022 Gordon Bergling <gbe@FreeBSD.org>

rtld(1): Fix a typo in a source code comment

- s/interger/integer/

MFC after: 3 days


# 78599c32 05-Dec-2020 Conrad Meyer <cem@FreeBSD.org>

Add CFI start/end proc directives to arm64, i386, and ppc

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which

Add CFI start/end proc directives to arm64, i386, and ppc

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which
appear to be ARM-specific variants of the same thing. Likewise, MIPS
uses .frame directives.

Reviewed by: arichardson
Differential Revision: https://reviews.freebsd.org/D27387

show more ...


# 4849c3a5 15-Dec-2018 Michal Meloun <mmel@FreeBSD.org>

Improve R_AARCH64_TLSDESC relocation.
The original code did not support dynamically loaded libraries and used
suboptimal access to TLS variables.
New implementation removes lazy resolving of TLS relo

Improve R_AARCH64_TLSDESC relocation.
The original code did not support dynamically loaded libraries and used
suboptimal access to TLS variables.
New implementation removes lazy resolving of TLS relocation - due to flaw
in TLSDESC design is impossible to switch resolver function at runtime
without expensive locking.

Due to this, 3 specialized resolvers are implemented:
- load time resolver for TLS relocation from libraries loaded with main
executable (thus with known TLS offset).
- resolver for undefined thread weak symbols.
- slower lazy resolver for dynamically loaded libraries with fast path for
already resolved symbols.

PR: 228892, 232149, 233204, 232311
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18417

show more ...


# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


# e8c479fd 05-Dec-2018 Michal Meloun <mmel@FreeBSD.org>

Fix style(9).
Not a functional change.

MFC after: 1 week


# fad101b3 27-Feb-2018 Michal Meloun <mmel@FreeBSD.org>

Make rtld_bind_start() debugger friendly.
Save link register and annotate call frame structure so debugger can unwind
call frame created by rtld_bind_start().

MFC after: 2 weeks


# 009e81b1 22-Jan-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r294567


# a11378bd 14-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


1234