
MSVC linker accepts native ARM64 object files as input with `-machine:arm64ec`, similar to `-machine:arm64x`. Its usefulness is very limited; for example, both exports and imports are not reflected in the PE structures and can't work. However, their symbol tables are otherwise functional. Since we already have handling of multiple symbol tables implemented for ARM64X, the required changes are mostly about adjusting relevant checks to account for them on the ARM64EC target. Delay-load helper handling is a bit of a shortcut. The patch never pulls it for native object files and just ensures that the code is fine with that. In general, I think it would be nice to adjust the driver to pull it only when it's actually referenced, which would allow applying the same logic to the native symbol table on ARM64EC without worrying about pulling too much.
22 lines
763 B
ArmAsm
22 lines
763 B
ArmAsm
// REQUIRES: aarch64
|
|
|
|
// Check that -aligncomm applies to both native and EC symbols.
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=aarch64-windows-gnu %s -o %t-arm64.obj
|
|
// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows-gnu %s -o %t-arm64ec.obj
|
|
// RUN: lld-link -machine:arm64x -lldmingw -dll -noentry -out:%t.dll %t-arm64.obj %t-arm64ec.obj
|
|
// RUN: llvm-readobj --hex-dump=.test %t.dll | FileCheck %s
|
|
// CHECK: 0x180004000 10200000 18200000 20200000 28200000
|
|
|
|
// RUN: lld-link -machine:arm64ec -lldmingw -dll -noentry -out:%t-ec.dll %t-arm64.obj %t-arm64ec.obj
|
|
// RUN: llvm-readobj --hex-dump=.test %t-ec.dll | FileCheck %s
|
|
|
|
.data
|
|
.word 0
|
|
|
|
.section .test,"dr"
|
|
.rva sym
|
|
.rva sym2
|
|
.comm sym,4,4
|
|
.comm sym2,4,3
|