Using the `GOT_PREL' relocation type means that we don't need to burn a
register for the GOT.
#endif
.endm
+// Load address of external symbol ADDR into REG directly.
+ .macro leaextq reg, addr, cond=
+#if WANT_PIC
+ ldr\cond \reg, .L$_leaextq$\@
+.L$_leaextq_pc$\@:
+ ldr\cond \reg, [pc, \reg]
+ _LIT
+ .balign 4
+.L$_leaextq$\@:
+ .word \addr(GOT_PREL) + (. - .L$_leaextq_pc$\@ - 8)
+ _ENDLIT
+#else
+ ldr\cond \reg, =\addr
+#endif
+ .endm
+
#endif
///--------------------------------------------------------------------------