diff options
author | Pengxuan Zheng <pzheng@quicinc.com> | 2022-06-04 12:22:38 -0700 |
---|---|---|
committer | Pengxuan Zheng <pzheng@quicinc.com> | 2022-06-06 17:20:56 -0700 |
commit | c1d3cfea08f5f700174cd579ab56af1cc9d2191f (patch) | |
tree | dc780160f56f2a5028bf3bba3bcb3b021854c5ff /llvm/lib/Object/Archive.cpp | |
parent | 21c9452305484dde63caed7806384b9e5084a6d2 (diff) | |
download | llvm-c1d3cfea08f5f700174cd579ab56af1cc9d2191f.zip llvm-c1d3cfea08f5f700174cd579ab56af1cc9d2191f.tar.gz llvm-c1d3cfea08f5f700174cd579ab56af1cc9d2191f.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
-rw-r--r-- | llvm/lib/Object/Archive.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp index 0b29428..ad03f9c 100644 --- a/llvm/lib/Object/Archive.cpp +++ b/llvm/lib/Object/Archive.cpp @@ -261,6 +261,10 @@ Expected<StringRef> ArchiveMemberHeader::getName(uint64_t Size) const { // It looks like a CFG guard: we just skip it for now. if (Name.equals("/<XFGHASHMAP>/")) return Name; + // Some libraries (e.g., arm64rt.lib) from the Windows WDK + // (version 10.0.22000.0) contain this undocumented special member. + if (Name.equals("/<ECSYMBOLS>/")) + return Name; // It's a long name. // Get the string table offset. std::size_t StringOffset; |