Skip to content

Commit dafe4c0

Browse files
Roger Kimint3
authored andcommitted
[Mach-O][NFC] Reorder map file tests
We are just grouping the files and the tests together. Reviewed By: int3, #lld-macho Differential Revision: https://reviews.llvm.org/D119456
1 parent 4f2c46c commit dafe4c0

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

lld/test/MachO/map-file.s

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@
1010
# RUN: FileCheck %s < %t/out
1111
# RUN: FileCheck %s --check-prefix=MAPFILE < %t/test-map.time-trace
1212

13-
#--- foo.s
14-
.section __TEXT,obj
15-
.globl _foo
16-
_foo:
17-
18-
#--- test.s
19-
.comm _number, 1
20-
.globl _main
21-
_main:
22-
ret
23-
2413
# CHECK: Sections:
2514
# CHECK-NEXT: Idx Name Size VMA Type
2615
# CHECK-NEXT: 0 __text {{[0-9a-f]+}} [[#%x,TEXT:]] TEXT
@@ -52,25 +41,6 @@ _main:
5241
# CHECK-NEXT: 0x[[#FOO]] [ 2] _foo
5342
# CHECK-NEXT: 0x[[#NUMBER]] [ 1] _number
5443

55-
#--- c-string-literal.s
56-
.section __TEXT,__cstring
57-
.globl _hello_world, _hello_its_me, _main
58-
59-
_hello_world:
60-
.asciz "Hello world!\n"
61-
62-
_hello_its_me:
63-
.asciz "Hello, it's me"
64-
65-
.text
66-
_main:
67-
movl $0x2000004, %eax # write() syscall
68-
mov $1, %rdi # stdout
69-
leaq _hello_world(%rip), %rsi
70-
mov $13, %rdx # length of str
71-
syscall
72-
ret
73-
7444
# RUN: %lld -map %t/c-string-literal-map %t/c-string-literal.o -o %t/c-string-literal-out
7545
# RUN: FileCheck --check-prefix=CSTRING %s < %t/c-string-literal-map
7646

@@ -91,3 +61,33 @@ _main:
9161
# DEADCSTRING-DAG: literal string: Hello, it's me
9262

9363
# MAPFILE: "name":"Total Write map file"
64+
65+
#--- foo.s
66+
.section __TEXT,obj
67+
.globl _foo
68+
_foo:
69+
70+
#--- test.s
71+
.comm _number, 1
72+
.globl _main
73+
_main:
74+
ret
75+
76+
#--- c-string-literal.s
77+
.section __TEXT,__cstring
78+
.globl _hello_world, _hello_its_me, _main
79+
80+
_hello_world:
81+
.asciz "Hello world!\n"
82+
83+
_hello_its_me:
84+
.asciz "Hello, it's me"
85+
86+
.text
87+
_main:
88+
movl $0x2000004, %eax # write() syscall
89+
mov $1, %rdi # stdout
90+
leaq _hello_world(%rip), %rsi
91+
mov $13, %rdx # length of str
92+
syscall
93+
ret

0 commit comments

Comments
 (0)