1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

LibELF: Re-organize ELFDynamicObject::load and add PLT trampoline

ELFDynamicObject::load looks a lot better with all the steps
re-organized into helpers.

Add plt_trampoline.S to handle PLT fixups for lazy loading.
Add the needed trampoline-trampolines in ELFDynamicObject to get to
the proper relocations and to return the symbol back to the assembly
method to call into from the PLT once we return back to user code.
This commit is contained in:
Andrew Kaster 2020-01-01 16:48:12 -05:00 committed by Andreas Kling
parent 5fa0291a05
commit 331f37d1a8
4 changed files with 228 additions and 164 deletions

View file

@ -62,7 +62,11 @@ ELF_OBJS = \
OBJS = $(AK_OBJS) $(LIBC_OBJS) $(ELF_OBJS)
EXTRA_OBJS = setjmp.ao crti.ao crtn.ao
EXTRA_OBJS = \
setjmp.ao \
crti.ao \
crtn.ao \
../LibELF/Arch/i386/plt_trampoline.ao
crt0.o: crt0.cpp