[x264-devel] [PATCH 2/6] aarch64: Fix the symbol prefix when calling the external function puts
Martin Storsjö
martin at martin.st
Mon Oct 16 21:46:30 CEST 2017
This should be squashed into "aarch64: Set the function symbol prefix in
a single location". The same issue was handled correctly in the corresponding
patch for arm, where it was fixed with an ifdef in the checkasm asm
source file. Wrapping this into a macro in asm.S feels cleaner though.
---
common/aarch64/asm.S | 3 +++
tools/checkasm-aarch64.S | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/aarch64/asm.S b/common/aarch64/asm.S
index 872497d..15fb412 100644
--- a/common/aarch64/asm.S
+++ b/common/aarch64/asm.S
@@ -32,8 +32,10 @@
#ifdef PREFIX
# define BASE _x264_
+# define SYM_PREFIX _
#else
# define BASE x264_
+# define SYM_PREFIX
#endif
#ifdef BIT_DEPTH
@@ -44,6 +46,7 @@
#define X(s) JOIN(EXTERN_ASM, s)
#define X264(s) JOIN(BASE, s)
+#define EXT(s) JOIN(SYM_PREFIX, s)
#ifdef __ELF__
# define ELF
diff --git a/tools/checkasm-aarch64.S b/tools/checkasm-aarch64.S
index e858abe..74d9819 100644
--- a/tools/checkasm-aarch64.S
+++ b/tools/checkasm-aarch64.S
@@ -149,7 +149,7 @@ function checkasm_call, export=1
mov w9, #0
str w9, [x2]
movrel x0, error_message
- bl X(puts)
+ bl EXT(puts)
0:
ldp x0, x1, [sp], #16
ldp d14, d15, [sp], #16
--
2.7.4
More information about the x264-devel
mailing list