aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/MachO
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:05 +0000
commit2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d (patch)
treea2454219fc120589f4fd74786a1b24437b223159 /test/MC/MachO
parentc304718fd8fa25f3f36f47f3de0e0cfe7578bc9e (diff)
downloadexternal_llvm-2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d.zip
external_llvm-2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d.tar.gz
external_llvm-2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d.tar.bz2
MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them. - <rdar://problem/7885351> integrated assembler broken for i386 objc code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/MachO')
-rw-r--r--test/MC/MachO/reloc.s41
1 files changed, 26 insertions, 15 deletions
diff --git a/test/MC/MachO/reloc.s b/test/MC/MachO/reloc.s
index c305eeb..73a69c3 100644
--- a/test/MC/MachO/reloc.s
+++ b/test/MC/MachO/reloc.s
@@ -41,6 +41,9 @@ L1:
jmp L1
ret
+ .objc_class_name_A=0
+ .globl .objc_class_name_A
+
// CHECK: ('cputype', 7)
// CHECK: ('cpusubtype', 3)
// CHECK: ('filetype', 1)
@@ -117,10 +120,10 @@ L1:
// CHECK: ('word-1', 0x4000002)),
// CHECK: # Relocation 7
// CHECK: (('word-0', 0x4),
-// CHECK: ('word-1', 0xc000007)),
+// CHECK: ('word-1', 0xc000008)),
// CHECK: # Relocation 8
// CHECK: (('word-0', 0x0),
-// CHECK: ('word-1', 0xc000007)),
+// CHECK: ('word-1', 0xc000008)),
// CHECK: ])
// CHECK: ('_section_data', '\x00\x00\x00\x00\x04\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00"\x00\x00\x00,\x00q')
// CHECK: # Section 2
@@ -157,13 +160,13 @@ L1:
// CHECK: (('command', 2)
// CHECK: ('size', 24)
// CHECK: ('symoff', 568)
-// CHECK: ('nsyms', 8)
-// CHECK: ('stroff', 664)
-// CHECK: ('strsize', 64)
-// CHECK: ('_string_data', '\x00undef\x00local_a_ext\x00local_a\x00local_a_elt\x00local_b\x00local_c\x00bar\x00_f0\x00\x00')
+// CHECK: ('nsyms', 9)
+// CHECK: ('stroff', 676)
+// CHECK: ('strsize', 84)
+// CHECK: ('_string_data', '\x00undef\x00local_a_ext\x00.objc_class_name_A\x00local_a\x00local_a_elt\x00local_b\x00local_c\x00bar\x00_f0\x00\x00\x00')
// CHECK: ('_symbols', [
// CHECK: # Symbol 0
-// CHECK: (('n_strx', 19)
+// CHECK: (('n_strx', 38)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 2)
// CHECK: ('n_desc', 0)
@@ -171,7 +174,7 @@ L1:
// CHECK: ('_string', 'local_a')
// CHECK: ),
// CHECK: # Symbol 1
-// CHECK: (('n_strx', 27)
+// CHECK: (('n_strx', 46)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 2)
// CHECK: ('n_desc', 0)
@@ -179,7 +182,7 @@ L1:
// CHECK: ('_string', 'local_a_elt')
// CHECK: ),
// CHECK: # Symbol 2
-// CHECK: (('n_strx', 39)
+// CHECK: (('n_strx', 58)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 2)
// CHECK: ('n_desc', 0)
@@ -187,7 +190,7 @@ L1:
// CHECK: ('_string', 'local_b')
// CHECK: ),
// CHECK: # Symbol 3
-// CHECK: (('n_strx', 47)
+// CHECK: (('n_strx', 66)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 2)
// CHECK: ('n_desc', 0)
@@ -195,7 +198,7 @@ L1:
// CHECK: ('_string', 'local_c')
// CHECK: ),
// CHECK: # Symbol 4
-// CHECK: (('n_strx', 55)
+// CHECK: (('n_strx', 74)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 3)
// CHECK: ('n_desc', 0)
@@ -203,7 +206,7 @@ L1:
// CHECK: ('_string', 'bar')
// CHECK: ),
// CHECK: # Symbol 5
-// CHECK: (('n_strx', 59)
+// CHECK: (('n_strx', 78)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 1)
// CHECK: ('n_desc', 0)
@@ -211,6 +214,14 @@ L1:
// CHECK: ('_string', '_f0')
// CHECK: ),
// CHECK: # Symbol 6
+// CHECK: (('n_strx', 19)
+// CHECK: ('n_type', 0x3)
+// CHECK: ('n_sect', 0)
+// CHECK: ('n_desc', 0)
+// CHECK: ('n_value', 0)
+// CHECK: ('_string', '.objc_class_name_A')
+// CHECK: ),
+// CHECK: # Symbol 7
// CHECK: (('n_strx', 7)
// CHECK: ('n_type', 0xf)
// CHECK: ('n_sect', 2)
@@ -218,7 +229,7 @@ L1:
// CHECK: ('n_value', 16)
// CHECK: ('_string', 'local_a_ext')
// CHECK: ),
-// CHECK: # Symbol 7
+// CHECK: # Symbol 8
// CHECK: (('n_strx', 1)
// CHECK: ('n_type', 0x1)
// CHECK: ('n_sect', 0)
@@ -234,8 +245,8 @@ L1:
// CHECK: ('ilocalsym', 0)
// CHECK: ('nlocalsym', 6)
// CHECK: ('iextdefsym', 6)
-// CHECK: ('nextdefsym', 1)
-// CHECK: ('iundefsym', 7)
+// CHECK: ('nextdefsym', 2)
+// CHECK: ('iundefsym', 8)
// CHECK: ('nundefsym', 1)
// CHECK: ('tocoff', 0)
// CHECK: ('ntoc', 0)