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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

libexec/rtld-elf/aarch64/reloc.c
293 ↗(On Diff #48526)

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

320 ↗(On Diff #48526)

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
293 ↗(On Diff #48526)

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

libexec/rtld-elf/aarch64/reloc.c
301 ↗(On Diff #48545)

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

335 ↗(On Diff #48545)

And there ?

andrew marked 3 inline comments as done.

Remove break statements that shouldn't be there.

libexec/rtld-elf/aarch64/reloc.c
301 ↗(On Diff #48545)

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 ↗(On Diff #48551)

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.