HomeFreeBSD

csu: Add the prologue and epilogue to the _init and _fini on x86_64

Description

csu: Add the prologue and epilogue to the _init and _fini on x86_64

Normally, modern unwinders uses Dwarf information to unwind stack,
however in case when the code is not annotated by Dwarf instructions,
unwinders fallbacks to a frame-pointer based algorithm.

That is allows libunwind to unwind stack from global constructors and
destructors. Also it makes gdb happy as it printed nonexistent frame
before.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40795

Details

Provenance
dchaginAuthored on Jul 1 2023, 7:52 AM
Reviewer
kib
Differential Revision
D40795: csu: Add the prologue and epilogue to the _init and _fini on x86_64
Parents
rG3bdf68086de8: rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64
Branches
Unknown
Tags
Unknown