diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp --- a/llvm/lib/Object/Archive.cpp +++ b/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 Archive::Child::getFullName() const { diff --git a/llvm/test/Object/archive-symtab.test b/llvm/test/Object/archive-symtab.test --- a/llvm/test/Object/archive-symtab.test +++ b/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