[PATCH] D107322: [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 10:06:43 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG976bd2361237: [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it (authored by Ramesh, committed by hoy).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107322/new/
https://reviews.llvm.org/D107322
Files:
llvm/lib/Object/Archive.cpp
llvm/test/Object/archive-symtab.test
Index: llvm/test/Object/archive-symtab.test
===================================================================
--- llvm/test/Object/archive-symtab.test
+++ llvm/test/Object/archive-symtab.test
@@ -50,6 +50,11 @@
# RUN: llvm-ar rcsU %t.a %t.elf-x86-64 %t2.elf-x86-64
# RUN: llvm-nm --print-armap %t.a | FileCheck %s
+# RUN: rm -f %t.a
+# RUN: env SYM64_THRESHOLD=0 llvm-ar crTs %t.a %t.elf-x86-64 %t2.elf-x86-64
+# RUN: llvm-nm --print-armap %t.a | FileCheck %s
+# RUN: grep '/SYM64/' %t.a
+
# RUN: rm -f %t.a
# RUN: env SYM64_THRESHOLD=836 llvm-ar rcsU %t.a %t.elf-x86-64 %t2.elf-x86-64
# RUN: llvm-nm --print-armap %t.a | FileCheck %s
Index: llvm/lib/Object/Archive.cpp
===================================================================
--- llvm/lib/Object/Archive.cpp
+++ llvm/lib/Object/Archive.cpp
@@ -418,7 +418,7 @@
if (!NameOrErr)
return NameOrErr.takeError();
StringRef Name = NameOrErr.get();
- return Parent->IsThin && Name != "/" && Name != "//";
+ return Parent->IsThin && Name != "/" && Name != "//" && Name != "/SYM64/";
}
Expected<std::string> Archive::Child::getFullName() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107322.364528.patch
Type: text/x-patch
Size: 1125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210805/b50107df/attachment.bin>
More information about the llvm-commits
mailing list