map-file2.test
2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/map-file2.s -o %t.o
# RUN: ld.lld -o %t %t.o -Map=%t.map --script %s
# RUN: FileCheck -strict-whitespace %s < %t.map
SECTIONS {
. = 0x1000;
.aaa : { *(.aaa.*) }
.bbb : AT(0x2000) { *(.bbb.*) }
.ccc : AT(0x3000) { *(.ccc.*) }
. += 0x100;
.ddd : {
BYTE(0x11)
. += 0x100;
*(.ddd.*)
}
.text : { *(.text.*) }
}
# CHECK: VMA LMA Size Align Out In Symbol
# CHECK-NEXT: 0 0 1000 1 . = 0x1000
# CHECK-NEXT: 1000 1000 8 1 .aaa
# CHECK-NEXT: 1000 1000 8 1 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.aaa)
# CHECK-NEXT: 1008 2000 8 1 .bbb
# CHECK-NEXT: 1008 2000 8 1 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.bbb)
# CHECK-NEXT: 1010 3000 8 1 .ccc
# CHECK-NEXT: 1010 3000 8 1 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.ccc)
# CHECK-NEXT: 1018 3008 100 1 . += 0x100
# CHECK-NEXT: 1118 3108 109 1 .ddd
# CHECK-NEXT: 1118 3108 1 1 BYTE ( 0x11 )
# CHECK-NEXT: 1119 3109 100 1 . += 0x100
# CHECK-NEXT: 1219 3209 8 1 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.ddd)
# CHECK-NEXT: 1228 3218 34 8 .eh_frame
# CHECK-NEXT: 1228 3218 30 1 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.eh_frame+0x0)
# CHECK-NEXT: 125c 324c 1 4 .text
# CHECK-NEXT: 125c 324c 1 4 {{.*}}{{/|\\}}map-file2.test.tmp.o:(.text)
# CHECK-NEXT: 125c 324c 0 1 f(int)
# CHECK-NEXT: 125c 324c 0 1 _start
# CHECK-NEXT: 0 0 8 1 .comment
# CHECK-NEXT: 0 0 8 1 <internal>:(.comment)
# CHECK-NEXT: 0 0 48 8 .symtab
# CHECK-NEXT: 0 0 48 8 <internal>:(.symtab)
# CHECK-NEXT: 0 0 48 1 .shstrtab
# CHECK-NEXT: 0 0 48 1 <internal>:(.shstrtab)
# CHECK-NEXT: 0 0 e 1 .strtab
# CHECK-NEXT: 0 0 e 1 <internal>:(.strtab)