1 // RUN
: llvm-mc
-triple thumbv7m-apple-darwin-eabi
%s
-filetype
=obj
-o
%t
2 // RUN
: llvm-readobj
--symbols
%t | FileCheck
%s
12 alias_to_early
= defined_early
13 alias_to_late
= defined_late
21 alias_to_local
= Ltmp0
26 // defined_early was defined. Actually has value
0xc.
28 // CHECK-NEXT
: Name
: defined_early
29 // CHECK-NEXT
: Type
: Section
(0xE)
30 // CHECK-NEXT
: Section
: __data
(0x2)
31 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
32 // CHECK-NEXT
: Flags
[ (0x0)
34 // CHECK-NEXT
: Value
: 0x
[[DEFINED_EARLY
:[0-9A-F
]+]]
37 // alias_to_early was an alias to defined_early. But we can resolve it.
39 // CHECK-NEXT
: Name
: alias_to_early
40 // CHECK-NEXT
: Type
: Section
(0xE)
41 // CHECK-NEXT
: Section
: __data
(0x2)
42 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
43 // CHECK-NEXT
: Flags
[ (0x0)
45 // CHECK-NEXT
: Value
: 0x
[[DEFINED_EARLY
]]
48 // alias_to_late was an alias to defined_late. But we can resolve it.
50 // CHECK-NEXT
: Name
: alias_to_late
51 // CHECK-NEXT
: Type
: Section
(0xE)
52 // CHECK-NEXT
: Section
: __data
(0x2)
53 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
54 // CHECK-NEXT
: Flags
[ (0x0)
56 // CHECK-NEXT
: Value
: 0x
[[DEFINED_LATE
:[0-9A-F
]+]]
59 // defined_late was defined. Just after defined_early.
61 // CHECK-NEXT
: Name
: defined_late
62 // CHECK-NEXT
: Type
: Section
(0xE)
63 // CHECK-NEXT
: Section
: __data
(0x2)
64 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
65 // CHECK-NEXT
: Flags
[ (0x0)
67 // CHECK-NEXT
: Value
: 0x
[[DEFINED_LATE
]]
70 // alias_to_local is an alias
, but what it points to has no
71 // MachO representation. We must resolve it.
73 // CHECK-NEXT
: Name
: alias_to_local
(42)
74 // CHECK-NEXT
: Type
: Section
(0xE)
75 // CHECK-NEXT
: Section
: __data
(0x2)
76 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
77 // CHECK-NEXT
: Flags
[ (0x0)
79 // CHECK-NEXT
: Value
: 0x14
82 // extern_test was
a pure alias to the unknown
"var2".
84 // CHECK
: Name
: extern_test
86 // CHECK-NEXT
: Type
: Indirect
(0xA)
87 // CHECK-NEXT
: Section
: (0x0)
88 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
89 // CHECK-NEXT
: Flags
[ (0x0)
91 // CHECK-NEXT
: Value
: 0x
[[VAR2_STRINGINDEX
:[0-9a-f
]+]]
94 // var1 was another alias to an unknown variable.
Not extern this time.
96 // CHECK-NEXT
: Name
: var1
(89)
97 // CHECK-NEXT
: Type
: Indirect
(0xA)
98 // CHECK-NEXT
: Section
: (0x0)
99 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
100 // CHECK-NEXT
: Flags
[ (0x0)
102 // CHECK-NEXT
: Value
: 0x
[[VAR2_STRINGINDEX
]]
105 // var2 was
a normal undefined
(extern
) symbol.
107 // CHECK-NEXT
: Name
: var2
108 // CHECK-NEXT
: Extern
109 // CHECK-NEXT
: Type
: Undef
(0x0)
110 // CHECK-NEXT
: Section
: (0x0)
111 // CHECK-NEXT
: RefType
: UndefinedNonLazy
(0x0)
112 // CHECK-NEXT
: Flags
[ (0x0)
114 // CHECK-NEXT
: Value
: 0x0