mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
c326067040
We were producing a relocation for ---------------- .section foo,bar La: Lb: .long La-Lb -------------- but not for --------------------- .section foo,bar zed: La: Lb: .long La-Lb ---------------- This patch handles the case where both fragments are part of the first atom in a section and there is no corresponding symbol to that atom. This fixes pr21328. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221304 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
418 B
ArmAsm
17 lines
418 B
ArmAsm
// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
|
|
|
|
.data
|
|
L_var1:
|
|
L_var2:
|
|
.long L_var2 - L_var1
|
|
.set L_var3, .
|
|
.set L_var4, .
|
|
.long L_var4 - L_var3
|
|
|
|
// CHECK: Relocations [
|
|
// CHECK-NEXT: Section __data {
|
|
// CHECK-NEXT: 0x4 0 2 0 X86_64_RELOC_SUBTRACTOR 0 0x2
|
|
// CHECK-NEXT: 0x4 0 2 0 X86_64_RELOC_UNSIGNED 0 0x2
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|