llvm-6502/test/MC/MachO/reloc-pcrel-offset.s
Jim Grosbach 8b9300b972 MC tweak symbol difference resolution for non-local symbols.
When the non-local symbol in the expression is in the same fragment
as the second symbol, the assembler can still evaluate the expression
without needing a relocation.

For example, on ARM:
_foo:
	ldr lr, (_foo - 4)

rdar://10348687



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148341 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:14:39 +00:00

18 lines
369 B
ArmAsm

// RUN: llvm-mc -n -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
// CHECK: # Relocation 0
// CHECK: (('word-0', 0x1),
// CHECK: ('word-1', 0x5000002)),
// CHECK-NEXT: ])
// CHECK: ('_section_data', 'e8fbffff ff')
.data
.long 0
.text
_a:
_b:
call _a
.subsections_via_symbols