[Arm64EC] Copy import descriptors to the EC Map (#84834)
authorDaniel Paoliello <danpao@microsoft.com>
Tue, 12 Mar 2024 21:10:49 +0000 (14:10 -0700)
committerTom Stellard <tstellar@redhat.com>
Sat, 16 Mar 2024 22:55:54 +0000 (15:55 -0700)
commit207ecd684cc6731266e12d8d2df0e3d1d9e1ff8d
tree36db535e9e1c08dfb780aed9082652ae17c910b0
parent79bc8b32c6ed4fc6e002d6426c04d4de874b07cc
[Arm64EC] Copy import descriptors to the EC Map (#84834)

As noted in <https://github.com/llvm/llvm-project/pull/78537>, MSVC
places import descriptors in both the EC and regular map - that PR moved
the descriptors to ONLY the regular map, however this causes linking
errors when linking as Arm64EC:

```
bcryptprimitives.lib(bcryptprimitives.dll) : error LNK2001: unresolved external symbol __IMPORT_DESCRIPTOR_bcryptprimitives (EC Symbol)
```

This change copies import descriptors from the regular map to the EC
map, which fixes this linking error.
llvm/include/llvm/Object/COFFImportFile.h
llvm/lib/Object/ArchiveWriter.cpp
llvm/lib/Object/COFFImportFile.cpp
llvm/test/tools/llvm-lib/arm64ec-implib.test