1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

LibELF: Make sure calls to _fixup_plt_entry use a properly aligned stack

This commit is contained in:
Gunnar Beutner 2021-07-09 01:08:16 +02:00 committed by Andreas Kling
parent 06883ed8a3
commit b11fe40240

View file

@ -28,7 +28,12 @@ _plt_trampoline: # (object, relocation_index)
shlq $3, %rsi shlq $3, %rsi
leaq (%rsi, %rsi, 2), %rsi leaq (%rsi, %rsi, 2), %rsi
pushq %rbp
movq %rsp, %rbp
andq $~15, %rsp
call _fixup_plt_entry@PLT call _fixup_plt_entry@PLT
movq %rbp, %rsp
popq %rbp
movq %rax, 88(%rsp) # replace object argument with symbol address movq %rax, 88(%rsp) # replace object argument with symbol address