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
F108394888: D40844.diff
Fri, Jan 24, 10:54 AM
F108364417: D40844.diff
Fri, Jan 24, 4:36 AM
Unknown Object (File)
Thu, Jan 16, 5:08 AM
Unknown Object (File)
Thu, Jan 16, 5:08 AM
Unknown Object (File)
Thu, Jan 16, 5:06 AM
Unknown Object (File)
Tue, Jan 14, 6:52 AM
Unknown Object (File)
Sat, Jan 11, 12:48 AM
Unknown Object (File)
Nov 23 2024, 1:28 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