[Object][Archive] Support a new archive member /<ECSYMBOLS>/
authorPengxuan Zheng <pzheng@quicinc.com>
Sat, 4 Jun 2022 19:22:38 +0000 (12:22 -0700)
committerPengxuan Zheng <pzheng@quicinc.com>
Tue, 7 Jun 2022 00:20:56 +0000 (17:20 -0700)
commitc1d3cfea08f5f700174cd579ab56af1cc9d2191f
treedc780160f56f2a5028bf3bba3bcb3b021854c5ff
parent21c9452305484dde63caed7806384b9e5084a6d2
[Object][Archive] Support a new archive member /<ECSYMBOLS>/

Some libraries (e.g., arm64rt.lib) from the Windows WDK (version 10.0.22000.0)
contain an undocumented special member '/<ECSYMBOLS>/'. This causes llvm-lib to
fail with the following error:

"truncated or malformed archive (long name offset characters after the '/' are
not all decimal numbers: '<ECSYMBOLS>/' for archive member header at offset 162)"

The '/<ECSYMBOLS>/' member does not seem to be documented anywhere, but might be
related to the ARM64EC ABI Microsoft announced last year.

https://blogs.windows.com/windowsdeveloper/2021/06/28/announcing-arm64ec-building-native-and-interoperable-apps-for-windows-11-on-arm/

Reviewed By: thieta, thakis

Differential Revision: https://reviews.llvm.org/D127135
llvm/lib/Object/Archive.cpp
llvm/test/tools/llvm-lib/Inputs/ecsymbols.yaml [new file with mode: 0644]
llvm/test/tools/llvm-lib/ecsymbols.test [new file with mode: 0644]