History log of /freebsd-current/lib/csu/amd64/crt1_s.S
Revision Date Author Comments
# e5c47379 19-Jul-2023 John Baldwin <jhb@FreeBSD.org>

amd64 crt1: Explicitly use a PLT entry for main in the PIC case.

This ensures GNU as generates a R_X86_64_PLT32 relocation instead of
R_X86_64_32.

Reviewed by: kib
Fixes: c969310c992a csu: Implement _start using as to satisfy unwinders on x86_64
Differential Revision: https://reviews.freebsd.org/D41101


# c969310c 29-Jun-2023 Dmitry Chagin <dchagin@FreeBSD.org>

csu: Implement _start using as to satisfy unwinders on x86_64

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.

This requires the crt code be built with unwind tables, for that remove
-fno-asynchronous-unwind-tables to enable unwind tables generation.

PR: 241562, 246322, 246537
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40780