From: Tim Northover Date: Fri, 30 May 2014 16:01:29 +0000 (+0000) Subject: MachO: move test to ARM directory. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ba735134d73c8df1aa2bb4f47cda962cc27e5e7f;p=oota-llvm.git MachO: move test to ARM directory. This test specifies an ARM triple, so it needs ARM as a registered target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209905 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/MC/MachO/ARM/aliased-symbols.s b/test/MC/MachO/ARM/aliased-symbols.s new file mode 100644 index 00000000000..0b4463d055a --- /dev/null +++ b/test/MC/MachO/ARM/aliased-symbols.s @@ -0,0 +1,115 @@ +// RUN: llvm-mc -triple thumbv7m-apple-darwin-eabi %s -filetype=obj -o %t +// RUN: llvm-readobj -symbols %t | FileCheck %s + + .data + var1 = var2 + .long var1 + .long var2 + .long var2 + 4 +defined_early: + .long 0 + + alias_to_early = defined_early + alias_to_late = defined_late + +defined_late: + .long 0 + + .global extern_test + extern_test = var2 + + alias_to_local = Ltmp0 +Ltmp0: + +// CHECK: Symbols [ + + // defined_early was defined. Actually has value 0xc. +// CHECK: Symbol { +// CHECK-NEXT: Name: defined_early +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __data (0x2) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[DEFINED_EARLY:[0-9A-F]+]] +// CHECK-NEXT: } + + // alias_to_early was an alias to defined_early. But we can resolve it. +// CHECK: Symbol { +// CHECK-NEXT: Name: alias_to_early +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __data (0x2) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[DEFINED_EARLY]] +// CHECK-NEXT: } + + // defined_late was defined. Just after defined_early. +// CHECK: Symbol { +// CHECK-NEXT: Name: defined_late +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __data (0x2) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[DEFINED_LATE:[0-9A-F]+]] +// CHECK-NEXT: } + + // alias_to_late was an alias to defined_late. But we can resolve it. +// CHECK: Symbol { +// CHECK-NEXT: Name: alias_to_late +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __data (0x2) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[DEFINED_LATE]] +// CHECK-NEXT: } + + // alias_to_local is an alias, but what it points to has no + // MachO representation. We must resolve it. +// CHECK: Symbol { +// CHECK-NEXT: Name: alias_to_local (37) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x14 +// CHECK-NEXT: } + + // extern_test was a pure alias to the unknown "var2". + // N_INDR and Extern. +// CHECK: Name: extern_test +// CHECK-NEXT: Extern +// CHECK-NEXT: Type: Indirect (0xA) +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[VAR2_STRINGINDEX:[0-9a-f]+]] +// CHECK-NEXT: } + + // var1 was another alias to an unknown variable. Not extern this time. +// CHECK: Symbol { +// CHECK-NEXT: Name: var1 (1) +// CHECK-NEXT: Type: Indirect (0xA) +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x[[VAR2_STRINGINDEX]] +// CHECK-NEXT: } + + // var2 was a normal undefined (extern) symbol. +// CHECK: Symbol { +// CHECK-NEXT: Name: var2 +// CHECK-NEXT: Extern +// CHECK-NEXT: Type: Undef (0x0) +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } diff --git a/test/MC/MachO/aliased-symbols.s b/test/MC/MachO/aliased-symbols.s deleted file mode 100644 index 0b4463d055a..00000000000 --- a/test/MC/MachO/aliased-symbols.s +++ /dev/null @@ -1,115 +0,0 @@ -// RUN: llvm-mc -triple thumbv7m-apple-darwin-eabi %s -filetype=obj -o %t -// RUN: llvm-readobj -symbols %t | FileCheck %s - - .data - var1 = var2 - .long var1 - .long var2 - .long var2 + 4 -defined_early: - .long 0 - - alias_to_early = defined_early - alias_to_late = defined_late - -defined_late: - .long 0 - - .global extern_test - extern_test = var2 - - alias_to_local = Ltmp0 -Ltmp0: - -// CHECK: Symbols [ - - // defined_early was defined. Actually has value 0xc. -// CHECK: Symbol { -// CHECK-NEXT: Name: defined_early -// CHECK-NEXT: Type: Section (0xE) -// CHECK-NEXT: Section: __data (0x2) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[DEFINED_EARLY:[0-9A-F]+]] -// CHECK-NEXT: } - - // alias_to_early was an alias to defined_early. But we can resolve it. -// CHECK: Symbol { -// CHECK-NEXT: Name: alias_to_early -// CHECK-NEXT: Type: Section (0xE) -// CHECK-NEXT: Section: __data (0x2) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[DEFINED_EARLY]] -// CHECK-NEXT: } - - // defined_late was defined. Just after defined_early. -// CHECK: Symbol { -// CHECK-NEXT: Name: defined_late -// CHECK-NEXT: Type: Section (0xE) -// CHECK-NEXT: Section: __data (0x2) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[DEFINED_LATE:[0-9A-F]+]] -// CHECK-NEXT: } - - // alias_to_late was an alias to defined_late. But we can resolve it. -// CHECK: Symbol { -// CHECK-NEXT: Name: alias_to_late -// CHECK-NEXT: Type: Section (0xE) -// CHECK-NEXT: Section: __data (0x2) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[DEFINED_LATE]] -// CHECK-NEXT: } - - // alias_to_local is an alias, but what it points to has no - // MachO representation. We must resolve it. -// CHECK: Symbol { -// CHECK-NEXT: Name: alias_to_local (37) -// CHECK-NEXT: Type: Section (0xE) -// CHECK-NEXT: Section: (0x0) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x14 -// CHECK-NEXT: } - - // extern_test was a pure alias to the unknown "var2". - // N_INDR and Extern. -// CHECK: Name: extern_test -// CHECK-NEXT: Extern -// CHECK-NEXT: Type: Indirect (0xA) -// CHECK-NEXT: Section: (0x0) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[VAR2_STRINGINDEX:[0-9a-f]+]] -// CHECK-NEXT: } - - // var1 was another alias to an unknown variable. Not extern this time. -// CHECK: Symbol { -// CHECK-NEXT: Name: var1 (1) -// CHECK-NEXT: Type: Indirect (0xA) -// CHECK-NEXT: Section: (0x0) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x[[VAR2_STRINGINDEX]] -// CHECK-NEXT: } - - // var2 was a normal undefined (extern) symbol. -// CHECK: Symbol { -// CHECK-NEXT: Name: var2 -// CHECK-NEXT: Extern -// CHECK-NEXT: Type: Undef (0x0) -// CHECK-NEXT: Section: (0x0) -// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) -// CHECK-NEXT: Flags [ (0x0) -// CHECK-NEXT: ] -// CHECK-NEXT: Value: 0x0 -// CHECK-NEXT: }