Page MenuHomeFreeBSD

rtld: Add a proper annotations to .rtld_start on aarch64
ClosedPublic

Authored by dchagin on Jul 2 2023, 3:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 2 2024, 2:58 PM
Unknown Object (File)
May 2 2024, 2:58 PM
Unknown Object (File)
May 2 2024, 2:58 PM
Unknown Object (File)
May 2 2024, 2:08 PM
Unknown Object (File)
Mar 15 2024, 7:31 AM
Unknown Object (File)
Mar 15 2024, 7:30 AM
Unknown Object (File)
Mar 15 2024, 7:30 AM
Unknown Object (File)
Mar 11 2024, 12:30 PM
Subscribers

Details

Summary
  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.

  1. Add a proper annotations for CFA.

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jul 7 2023, 4:56 PM
This revision was automatically updated to reflect the committed changes.