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
commit b11fe40240
Notes: sideshowbarker 2024-07-18 09:27:58 +09:00

View file

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