1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 12:25:12 +00:00
serenity/Userland/Libraries/LibELF
Daniel Bertalan e2b1f9447c LibELF: Only call IFUNC resolvers after populating the PLT
As IFUNC resolvers may call arbitrary functions though the PLT, they can
only be called after the PLT has been populated. This is true of the
`[[gnu::target_clones]]` attribute, which makes a call to
`__cpu_indicator_init`, which is defined in `libgcc_s.so`, through the
PLT.

`do_plt_relocation` and `do_direct_relocation` are given a parameter
that controls whether IFUNCs are immediately resolved. In the first
pass, relocations pointing to IFUNCs are put on a worklist, while all
other relocations are performed. Only after non-IFUNC relocations are
done and the PLT is set up do we deal with these.
2023-05-14 13:47:53 +02:00
..
Arch LibELF: Add AArch64 PLT trampoline 2023-04-23 14:30:59 +02:00
AuxiliaryVector.h Kernel+Libraries: Move defines and types from sys/auxv.h to Kernel/API 2023-01-21 10:43:59 -07:00
CMakeLists.txt LibELF+LibTest: Fix serenity_install_sources() paths 2021-03-15 09:06:10 +01:00
Core.h Kernel+Userland: Remove dependency on i386-specific registers 2022-12-28 11:53:41 +01:00
DynamicLinker.cpp Userland: Fix wrong signature of dladdr 2023-05-05 02:19:05 +02:00
DynamicLinker.h LibELF: Export static resolve_library method of the DynamicLinker code 2022-12-31 05:06:39 -07:00
DynamicLoader.cpp LibELF: Only call IFUNC resolvers after populating the PLT 2023-05-14 13:47:53 +02:00
DynamicLoader.h LibELF: Only call IFUNC resolvers after populating the PLT 2023-05-14 13:47:53 +02:00
DynamicObject.cpp LibELF: Split do_relocation into do_{direct,plt}_relocation 2023-05-14 13:47:53 +02:00
DynamicObject.h LibELF: Split do_relocation into do_{direct,plt}_relocation 2023-05-14 13:47:53 +02:00
Hashes.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Image.cpp Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
Image.h LibElf: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
Relocation.cpp LibELF+LibC: Add support for relative relocations in aarch64 binaries 2023-02-15 22:53:19 +01:00
Relocation.h Everywhere: Remove unused includes of AK/Concepts.h 2023-01-02 20:27:20 -05:00
Validation.cpp LibELF: Add EM_AARCH64 as expected architecture for ELF validation 2023-02-08 18:19:48 +00:00
Validation.h Kernel+Libraries: Don't include limits.h from LibELF/Validation.h 2023-01-21 10:43:59 -07:00