Page MenuHomeFreeBSD

Add STT_GNU_IFUNC and R_AARCH64_IRELATIVE support on arm64.
ClosedPublic

Authored by andrew on Sep 27 2018, 5:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:27 AM
Unknown Object (File)
Sep 14 2023, 9:21 AM
Unknown Object (File)
Sep 8 2023, 12:41 PM
Unknown Object (File)
Sep 2 2023, 9:13 AM
Unknown Object (File)
Aug 18 2023, 5:28 PM
Unknown Object (File)
Aug 13 2023, 6:17 AM
Unknown Object (File)
Aug 12 2023, 4:36 PM
Unknown Object (File)
Aug 2 2023, 6:09 PM
Subscribers

Details

Summary

This is based on the amd64 implementation. Support for both PLT and
non-PLT (e.g. a global variable initilised with a pointer to an ifunc)
cases are supported.

We don't pass anything to the resolver as it is expected they will read
the ID registers directly, with the number of registers with CPU info
likely to increase in the future.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19862
Build 19390: arc lint + arc unit

Event Timeline

I expect that glibc passes AT_HWCAP/HWCAP2 as the resolver arguments.

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

Follow style, move declarations to the start of the function.

321

Same there.

I'm considering passing 8 zeros to the handler so it will have a defined value that could be changed later, but where handlers can ignore them by not taking any arguments.

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

This was copied from the amd64 implementation so should probably also be fixed there.

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

Why do you stop the loop on the first relocation processed ?

334

And there ?

andrew marked 3 inline comments as done.

Remove break statements that shouldn't be there.

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

I missed them when changing a switch with a single case to an if.

This revision is now accepted and ready to land.Sep 28 2018, 12:08 PM

Pass in zeros to call_ifunc_resolver so we can change them later

This revision now requires review to proceed.Sep 28 2018, 2:22 PM
kib added inline comments.
libexec/rtld-elf/aarch64/rtld_machdep.h
67

to seE

This revision is now accepted and ready to land.Sep 28 2018, 4:23 PM
This revision was automatically updated to reflect the committed changes.