1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/MC/ARM/arm-macho-calls.s
Tim Northover 026f84c050 ARM: use internal relocations for local symbols after all.
Switching to external relocations for ARM-mode branches (to allow Thumb
interworking when the offset is unencodable) causes calls to temporary symbols
to be miscompiled and instead go to the parent externally visible symbol.

Calling a temporary never happens in compiled code, but can occasionally in
hand-written assembly.

llvm-svn: 311611
2017-08-23 22:07:10 +00:00

19 lines
384 B
ArmAsm

@ RUN: llvm-mc -triple armv7-apple-ios -filetype=obj -o %t %s
@ RUN: llvm-objdump -d -r %t | FileCheck %s
@ CHECK: _func:
@ CHECK: bl #0 <_func+0x8>
@ CHECK: ARM_RELOC_BR24 __text
@ CHECK: bl #-12 <_func>
@ CHECK: ARM_RELOC_BR24 _elsewhere
.global _func
_func:
bl Llocal_symbol
bl _elsewhere
Llocal_symbol:
bx lr
.global _elsewhere
_elsewhere:
bx lr