[x265] [PATCH] Fix building checkasm on i386 when building with PIE

Brad Smith brad at comstyle.com
Sun Apr 16 00:48:06 UTC 2023


Make sure the i386 assembly code calls libc functions through the PLT such
that it can be used to build with PIE.


diff --git a/source/test/checkasm-a.asm b/source/test/checkasm-a.asm
index a69a666ac..dcfe36a57 100644
--- a/source/test/checkasm-a.asm
+++ b/source/test/checkasm-a.asm
@@ -202,7 +202,11 @@ cglobal checkasm_call, 1,7
     mov  r4, edx
     lea  r1, [error_message]
     push r1
+%if FORMAT_ELF
+    call puts wrt ..plt
+%else
     call puts
+%endif
     add  esp, 4
     mov  r1, r1m
     mov  dword [r1], 0


More information about the x265-devel mailing list