projects
/
platform
/
upstream
/
libffi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
624c7a3
)
x86: Fix ffi_prep_closure_loc (#542)
author
hjl-tools
<hjl.tools@gmail.com>
Sat, 22 Feb 2020 14:32:22 +0000
(06:32 -0800)
committer
GitHub
<noreply@github.com>
Sat, 22 Feb 2020 14:32:22 +0000
(09:32 -0500)
Since FFI_TRAMPOLINE_SIZE is increased by 4 bytes to add ENDBR32, adjust
jump displacement by 4 bytes.
src/x86/ffi.c
patch
|
blob
|
history
diff --git
a/src/x86/ffi.c
b/src/x86/ffi.c
index e2473220484e4d08dcfeae66abc3cea8977fe2e7..346e784e15de56478c850dd5ff0013685ddfcc0c 100644
(file)
--- a/
src/x86/ffi.c
+++ b/
src/x86/ffi.c
@@
-566,7
+566,7
@@
ffi_prep_closure_loc (ffi_closure* closure,
/* jmp dest */
tramp[9] = 0xe9;
- *(unsigned *)(tramp + 10) = (unsigned)dest - ((unsigned)codeloc + 1
0
);
+ *(unsigned *)(tramp + 10) = (unsigned)dest - ((unsigned)codeloc + 1
4
);
closure->cif = cif;
closure->fun = fun;