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
F132905345: D40844.id.diff
Tue, Oct 21, 1:28 AM
F132905344: D40844.id124295.diff
Tue, Oct 21, 1:28 AM
F132865999: D40844.diff
Mon, Oct 20, 3:50 PM
Unknown Object (File)
Sat, Oct 18, 1:01 AM
Unknown Object (File)
Thu, Oct 16, 6:44 AM
Unknown Object (File)
Sun, Oct 12, 2:37 AM
Unknown Object (File)
Thu, Oct 9, 6:51 PM
Unknown Object (File)
Thu, Oct 9, 4:14 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 52385
Build 49276: arc lint + arc unit