llvm.org GIT mirror llvm / 9abbcb7
Object, support both mach-o archive t.o.c file names For historical reasons archives on mach-o have two possible names for the file containing the table of contents for the archive: "__.SYMDEF SORTED" and "__.SYMDEF". But the libObject archive reader only supported the former. This patch fixes llvm::object::Archive to support both names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221747 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Kledzik 5 years ago
3 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
239239 if (ec)
240240 return;
241241 Name = NameOrErr.get();
242 if (Name == "__.SYMDEF SORTED") {
242 if (Name == "__.SYMDEF SORTED" || Name == "__.SYMDEF") {
243243 SymbolTable = i;
244244 ++i;
245245 }
6060 RUN: llvm-nm -M %t.a | FileCheck %s
6161
6262 RUN: llvm-nm -M %p/Inputs/macho-archive-x86_64.a | FileCheck %s --check-prefix=BSD-MachO
63 RUN: llvm-nm -M %p/Inputs/macho-archive-unsorted-x86_64.a | FileCheck %s --check-prefix=BSD-MachO
6364
6465 BSD-MachO: Archive map
6566 BSD-MachO: _bar in bar.o