Page MenuHomeFreeBSD

Clean up the arm64 _rtld_bind stack creation
Needs ReviewPublic

Authored by andrew on Sep 20 2021, 10:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 22, 2:21 AM
Unknown Object (File)
Sun, May 19, 4:44 AM
Unknown Object (File)
Tue, May 14, 4:39 PM
Unknown Object (File)
Dec 20 2023, 12:24 PM
Unknown Object (File)
Dec 11 2023, 10:17 AM
Unknown Object (File)
Jan 4 2023, 2:55 AM
Unknown Object (File)
Dec 26 2022, 11:18 AM
Subscribers

Details

Reviewers
kib
Group Reviewers
arm64
Summary

We only need to adjust the stack pointer once on entry. Update to
adjust the stack pointer, then use this to find the offset for each
saved register.

While here add a missing space between two words in a comment.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41603
Build 38492: arc lint + arc unit

Event Timeline

BTW, on amd64 we opted eventually to save all GPRs on rtld bind entry, because there are weird languages that use rtld binding but custom calling conventions.

Also, we do not bother saving FPU registers, instead rtld is compiled with -mno-sse.

libexec/rtld-elf/aarch64/rtld_start.S
99

It is slightly more useful to put .cfi_offset right after the instruction which makes the .cfi statement true, since debugger would see a more correct scope for the frame. This means that mov x29, sp needs to be executed right after stp that saved x29.