Page MenuHomeFreeBSD

rtld: Add support for arm64 variant pcs
Needs ReviewPublic

Authored by andrew on Fri, Apr 19, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 6:53 AM
Unknown Object (File)
Thu, Apr 25, 1:50 PM
Unknown Object (File)
Thu, Apr 25, 1:50 PM
Unknown Object (File)
Thu, Apr 25, 1:50 PM
Unknown Object (File)
Thu, Apr 25, 7:14 AM
Unknown Object (File)
Sat, Apr 20, 7:14 PM
Subscribers

Details

Reviewers
kib
Group Reviewers
arm64
Summary

The aarch64 ELF spec has support for a variant of the normal procedure
call standard that doesn't follow the normal register convention, e.g.
using more registers as arguments, or different register state is
preserved.

Add support to rtld to handle this. As we don't know which registers
need to be preserved disable lazy binding for these functions.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57223
Build 54111: arc lint + arc unit

Event Timeline

libexec/rtld-elf/aarch64/reloc.c
252

we can't be what?

The code likely is good, but the why for some of it isn't obvious to me and needs some clarification I think.

libexec/rtld-elf/aarch64/reloc.c
252

this sentence just trails off...

264

this effectively short-circuits the PLT relocations and winding up in rtld_die() with an error message of Fatal Error. How will that be tracked down?

268

How is this related? We didn't do this before and gnu_ifunc behavior is changed (before we'd always compute where, now we skip it)

271

and why this behavior change. Before we'd bias the relocation by relocbase, but here we're computing the value based on the st_value of the symbol. Are these two things expected to be the same?

andrew retitled this revision from rtld: Add suport for arm64 variant pcs to rtld: Add support for arm64 variant pcs.Fri, Apr 19, 3:56 PM
  • Fix a comment
  • Remove debugging
libexec/rtld-elf/aarch64/reloc.c
264

This is based on the code in reloc_jmpslots which is run just after reloc_plt when bind_now (either per-object, or globally).

libexec/rtld-elf/rtld.c
1539

Same, would be nice to provide MD hook for MD dyn tags.

libexec/rtld-elf/rtld.h
187

We usually declare bools as bool bitfield, see below in the structure.

Since we are growing more MD fields in the Obj_Entry, can we provide MD define for them instead of adding more #ifdefs there?