1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/MC/ARM/macho-reloc-thumb-local.s
Tim Northover 4b802a178e ARM-MachO: don't add Thumb bit for addend to non-external relocation.
ld64 supplies its own Thumb bit for Thumb functions, and intentionally zeroes
out that part of any addend in an object file. But it only does that for
symbols marked N_EXT -- i.e. external symbols. So LLVM should avoid setting
that extra bit in other cases.

llvm-svn: 339007
2018-08-06 11:32:44 +00:00

22 lines
417 B
ArmAsm

@ RUN: llvm-mc -triple thumbv6m-apple-macho %s -filetype=obj -o %t
@ RUN: llvm-objdump -macho -section=__DATA,__data %t | FileCheck %s
@ CHECK: 00000000 00000003
.data
.align 2
.global _foo
_foo:
.long _bar
.long _baz
.text
.thumb_func _bar
.weak_definition _bar
_bar:
bx lr
.thumb_func _baz
.global _baz
_baz:
bx lr