Avoid text relocations on arm trampoline
Summary: fixes #7337 `ldr reg, =symbol` will cause a text relocation, which will fail to link if that's not allowed (which is the default for dynamic libraries). Reviewed By: jspahrsummers Differential Revision: D3281518 fbshipit-source-id: a057b4b9a54d568c8753a9dcd00365a86c7d93b0
This commit is contained in:
parent
4c3286f2a2
commit
65af925501
|
@ -35,7 +35,10 @@ SYMBOL_NAME(RCTProfileTrampoline):
|
|||
* profile
|
||||
*/
|
||||
mov r0, #0xc
|
||||
ldr ip, =L_malloc
|
||||
movw ip, :lower16:(L_malloc-(LPC1_0+4))
|
||||
movt ip, :upper16:(L_malloc-(LPC1_0+4))
|
||||
LPC1_0:
|
||||
add ip, pc
|
||||
ldr ip, [ip]
|
||||
blx ip
|
||||
/**
|
||||
|
@ -89,7 +92,10 @@ SYMBOL_NAME(RCTProfileTrampoline):
|
|||
ldr r1, [r4, #0x8]
|
||||
ldr r4, [r4]
|
||||
push {r1} // save the caller on the stack
|
||||
ldr ip, =L_free
|
||||
movw ip, :lower16:(L_free-(LPC1_1+4))
|
||||
movt ip, :upper16:(L_free-(LPC1_1+4))
|
||||
LPC1_1:
|
||||
add ip, pc
|
||||
ldr ip, [ip]
|
||||
blx ip
|
||||
|
||||
|
|
Loading…
Reference in New Issue