[x264-devel] checkasm: Fix compilation on hardened x86-64 ELF systems
Henrik Gramner
git at videolan.org
Mon May 22 00:00:07 CEST 2017
x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Fri Mar 24 22:27:42 2017 +0100| [a472b60daae0cac17d91ddf62ad4f474ded63e5b] | committer: Henrik Gramner
checkasm: Fix compilation on hardened x86-64 ELF systems
Normal PC-relative relocations cannot be used for resolving the address of
external symbols on systems where ASLR results in the offset being larger
than 32 bits. We are required to to go through the PLT instead.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a472b60daae0cac17d91ddf62ad4f474ded63e5b
---
tools/checkasm-a.asm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/checkasm-a.asm b/tools/checkasm-a.asm
index 34d5bebe..d1da9b79 100644
--- a/tools/checkasm-a.asm
+++ b/tools/checkasm-a.asm
@@ -153,7 +153,11 @@ cglobal checkasm_call, 2,15,16,max_args*8+8
mov r9, rax
mov r10, rdx
lea r0, [error_message]
+%if FORMAT_ELF
+ call puts wrt ..plt
+%else
call puts
+%endif
mov r1, [rsp+max_args*8]
mov dword [r1], 0
mov rdx, r10
More information about the x264-devel
mailing list