File: map.test

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (57 lines) | stat: -rw-r--r-- 2,853 bytes parent folder | download | duplicates (10)
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
47
48
49
50
51
52
53
54
55
56
57
# RUN: yaml2obj %p/Inputs/export.yaml -o %t-dll.obj
# RUN: lld-link /out:%t.dll /dll %t-dll.obj /implib:%t-dll.lib \
# RUN:   /export:exportfn1 /export:exportfn2
# RUN: yaml2obj %p/Inputs/map.yaml -o %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj %t-dll.lib /map:%T/foo.map  /lldmap
# RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < %T/foo.map
# RUN: FileCheck -check-prefix=LLDMAP -strict-whitespace %s < %t.map
# RUN: lld-link /out:%t.exe /entry:main %t.obj %t-dll.lib /map /lldmap:%T/foo-lld.map
# RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < %t.map
# RUN: FileCheck -check-prefix=LLDMAP -strict-whitespace %s < %T/foo-lld.map
# RUN: lld-link /out:%t.dll /dll %t-dll.obj /export:exportfn1 \
# RUN:   /export:foo=exportfn2 /map /mapinfo:exports
# RUN: FileCheck -check-prefix=MAPINFO -strict-whitespace %s < %t.map
# RUN: rm -rf %t && mkdir -p %t && cd %t
# RUN: cp %t.obj map.test.tmp.obj
# RUN: cp %t-dll.lib map.test.tmp-dll.lib
# RUN: lld-link /entry:main map.test.tmp.obj map.test.tmp-dll.lib /map
# RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < map.test.tmp.map

# MAP: {{.*}}
# MAP-EMPTY:
# MAP-NEXT: Timestamp is {{.*}}
# MAP-EMPTY:
# MAP-NEXT: Preferred load address is 0000000140000000
# MAP-EMPTY:
# MAP-NEXT: Start         Length     Name                   Class
# MAP-NEXT: 0001:00000000 00000008H .text                   CODE
# MAP-EMPTY:
# MAP-NEXT:  Address         Publics by Value              Rva+Base               Lib:Object
# MAP-EMPTY:
# MAP-NEXT: 0000:00000042       absolute                   0000000000000042     <absolute>
# MAP-NEXT: 0001:00000000       main                       0000000140001000     map.test.tmp.obj
# MAP-NEXT: 0001:00000010       exportfn1                  0000000140001010     map.test.tmp-dll:map.test.tmp.dll
# MAP-NEXT: 0001:00000020       exportfn2                  0000000140001020     map.test.tmp-dll:map.test.tmp.dll
# MAP-NEXT: 0002:00000040       __imp_exportfn1            0000000140002040     map.test.tmp-dll:map.test.tmp.dll
# MAP-NEXT: 0002:00000048       __imp_exportfn2            0000000140002048     map.test.tmp-dll:map.test.tmp.dll
# MAP-EMPTY:
# MAP-NEXT: entry point at         0001:00000000
# MAP-EMPTY:
# MAP-NEXT: Static symbols
# MAP-EMPTY:
# MAP-NEXT: 0001:00000043       staticdef                  0000000140001043     map.test.tmp.obj


# LLDMAP:      Address  Size     Align Out     In      Symbol
# LLDMAP-NEXT: 00001000 00000026  4096 .text
# LLDMAP-NEXT: 00001000 00000008     4         {{.*}}map.test.tmp.obj:(.text)
# LLDMAP-NEXT: 00001000 00000000     0                 main

# MAPINFO: Exports
# MAPINFO-EMPTY:
# MAPINFO-NEXT:  ordinal    name
# MAPINFO-EMPTY:
# MAPINFO-NEXT:        1    exportfn1
# MAPINFO-NEXT:        2    exportfn3
# MAPINFO-NEXT:        3    exportfn2
# MAPINFO-NEXT:               exported name: foo