mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibELF: Make sure calls to _fixup_plt_entry use a properly aligned stack
This commit is contained in:
parent
06883ed8a3
commit
b11fe40240
Notes:
sideshowbarker
2024-07-18 09:27:58 +09:00
Author: https://github.com/gunnarbeutner
Commit: b11fe40240
Pull-request: https://github.com/SerenityOS/serenity/pull/8571
Reviewed-by: https://github.com/BertalanD
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue