1# RUN: yaml2obj %p/Inputs/export.yaml -o %t-dll.obj 2# RUN: lld-link /out:%t.dll /dll %t-dll.obj /implib:%t-dll.lib \ 3# RUN: /export:exportfn1 /export:exportfn2 4# RUN: yaml2obj %p/Inputs/map.yaml -o %t.obj 5# RUN: lld-link /out:%t.exe /entry:main %t.obj %t-dll.lib /map:%T/foo.map /lldmap 6# RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < %T/foo.map 7# RUN: FileCheck -check-prefix=LLDMAP -strict-whitespace %s < %t.map 8# RUN: lld-link /out:%t.exe /entry:main %t.obj %t-dll.lib /map /lldmap:%T/foo-lld.map 9# RUN: FileCheck -check-prefix=MAP -strict-whitespace %s < %t.map 10# RUN: FileCheck -check-prefix=LLDMAP -strict-whitespace %s < %T/foo-lld.map 11 12# MAP: {{.*}} 13# MAP-EMPTY: 14# MAP-NEXT: Timestamp is {{.*}} 15# MAP-EMPTY: 16# MAP-NEXT: Preferred load address is 0000000140000000 17# MAP-EMPTY: 18# MAP-NEXT: Start Length Name Class 19# MAP-NEXT: 0001:00000000 00000008H .text CODE 20# MAP-EMPTY: 21# MAP-NEXT: Address Publics by Value Rva+Base Lib:Object 22# MAP-EMPTY: 23# MAP-NEXT: 0000:00000042 absolute 0000000000000042 <absolute> 24# MAP-NEXT: 0001:00000000 main 0000000140001000 map.test.tmp.obj 25# MAP-NEXT: 0001:00000010 exportfn1 0000000140001010 map.test.tmp-dll:map.test.tmp.dll 26# MAP-NEXT: 0001:00000020 exportfn2 0000000140001020 map.test.tmp-dll:map.test.tmp.dll 27# MAP-NEXT: 0002:00000040 __imp_exportfn1 0000000140002040 map.test.tmp-dll:map.test.tmp.dll 28# MAP-NEXT: 0002:00000048 __imp_exportfn2 0000000140002048 map.test.tmp-dll:map.test.tmp.dll 29# MAP-EMPTY: 30# MAP-NEXT: entry point at 0001:00000000 31# MAP-EMPTY: 32# MAP-NEXT: Static symbols 33# MAP-EMPTY: 34# MAP-NEXT: 0001:00000043 staticdef 0000000140001043 map.test.tmp.obj 35 36 37# LLDMAP: Address Size Align Out In Symbol 38# LLDMAP-NEXT: 00001000 00000026 4096 .text 39# LLDMAP-NEXT: 00001000 00000008 4 {{.*}}map.test.tmp.obj:(.text) 40# LLDMAP-NEXT: 00001000 00000000 0 main 41