1 ## Test that ECSYMBOLS section is created when ARM64EC is used.
3 # RUN: yaml2obj %s -o %t.arm64ec.obj -DMACHINE=IMAGE_FILE_MACHINE_ARM64EC
4 # RUN: yaml2obj %s -o %t.arm64.obj -DMACHINE=IMAGE_FILE_MACHINE_ARM64
5 # RUN: yaml2obj %s -o %t.amd64.obj -DMACHINE=IMAGE_FILE_MACHINE_AMD64
7 ## Create ARM64EC archive.
9 # RUN: llvm-ar cr %t1.a %t.arm64ec.obj
10 # RUN: llvm-nm --print-armap %t1.a | FileCheck --check-prefixes=NOMAP,ECMAP %s
12 ## Add ARM64 object to the archive.
13 # RUN: llvm-ar r %t1.a %t.arm64.obj
14 # RUN: llvm-nm --print-armap %t1.a | FileCheck --check-prefixes=MAP,ECMAP %s
16 ## Create ARM64 archive.
17 # RUN: llvm-ar cr %t2.a %t.arm64.obj
18 # RUN: llvm-nm --print-armap %t2.a | FileCheck --check-prefixes=MAP,NOECMAP %s
20 ## Add ARM64EC object to the archive.
21 # RUN: llvm-ar r %t2.a %t.arm64ec.obj
22 # RUN: llvm-nm --print-armap %t2.a | FileCheck --check-prefixes=MAP,ECMAP %s
24 ## Create mixed archive with ARM64 and ARM64EC members.
25 # RUN: llvm-ar cr %t3.a %t.arm64ec.obj %t.arm64.obj
26 # RUN: llvm-nm --print-armap %t3.a | FileCheck --check-prefixes=MAP,ECMAP %s
28 ## Create mixed archive with ARM64 and AMD64 members.
29 # RUN: llvm-ar cr %t4.a %t.amd64.obj %t.arm64.obj
30 # RUN: llvm-nm --print-armap %t4.a | FileCheck --check-prefixes=MAP,AMDECMAP %s
32 ## Create an archive with no symbol table.
33 # RUN: llvm-ar crS %t5.a %t.amd64.obj %t.arm64.obj
34 # RUN: llvm-nm --print-armap %t5.a | FileCheck --check-prefixes=NOMAP,NOECMAP %s
37 # MAP-NEXT: a in ecsymbols.yaml.tmp.arm64.obj
38 # MAP-NEXT: b in ecsymbols.yaml.tmp.arm64.obj
39 # MAP-NEXT: c in ecsymbols.yaml.tmp.arm64.obj
41 # NOMAP-NOT: Archive map
43 # ECMAP: Archive EC map
44 # ECMAP-NEXT: a in ecsymbols.yaml.tmp.arm64ec.obj
45 # ECMAP-NEXT: b in ecsymbols.yaml.tmp.arm64ec.obj
46 # ECMAP-NEXT: c in ecsymbols.yaml.tmp.arm64ec.obj
48 # NOECMAP-NOT: Archive EC map
50 # AMDECMAP: Archive EC map
51 # AMDECMAP-NEXT: a in ecsymbols.yaml.tmp.amd64.obj
52 # AMDECMAP-NEXT: b in ecsymbols.yaml.tmp.amd64.obj
53 # AMDECMAP-NEXT: c in ecsymbols.yaml.tmp.amd64.obj
62 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
69 SimpleType: IMAGE_SYM_TYPE_NULL
70 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
71 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
75 SimpleType: IMAGE_SYM_TYPE_NULL
76 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
77 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
81 SimpleType: IMAGE_SYM_TYPE_NULL
82 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
83 StorageClass: IMAGE_SYM_CLASS_EXTERNAL