shithub: dav1d

Download patch

ref: 32ae5dd05994b47aee00ac7dfc429830369f4f1c
parent: 7bbc5e3d5c22d5c154cc523b899480d65798d547
author: Martin Storsjö <[email protected]>
date: Mon Oct 7 06:27:42 EDT 2019

arm: Support PIC loading of non-global symbols in the movrel macro on apple platforms

--- a/src/arm/32/util.S
+++ b/src/arm/32/util.S
@@ -32,8 +32,9 @@
 #include "config.h"
 #include "src/arm/asm.S"
 
-.macro movrel rd, val, offset=0
+.macro movrel rd, val, offset=0, global=1
 #if defined(PIC) && defined(__APPLE__)
+.if \global
         ldr             \rd,  1f
         b               2f
 1:
@@ -50,7 +51,9 @@
         .indirect_symbol \val
         .word       0
         .text
-#elif defined(PIC)
+.else
+#endif
+#if defined(PIC)
         ldr             \rd,  1f
         b               2f
 1:
@@ -57,6 +60,9 @@
         .word           \val + \offset - (2f + 8 - 4 * CONFIG_THUMB)
 2:
         add             \rd,  \rd,  pc
+#if defined(__APPLE__)
+.endif
+#endif
 #else
         movw            \rd, #:lower16:\val+\offset
         movt            \rd, #:upper16:\val+\offset