Add support for Darwin’s static library table of contents with 64-bit offsets to the archive members.
Darwin added support in its Xcode 8.0 tools (released in the beta) for static
library table of contents with 64-bit offsets to the archive members. The
change is very straight forward. The table of contents member is named
___.SYMDEF_64 or "___.SYMDEF_64 SORTED" and same layout is used but with
fields using 64 bit values instead of 32 bit values.
rdar://26869808
llvm-svn: 273058
diff --git a/llvm/test/Object/archive-symtab.test b/llvm/test/Object/archive-symtab.test
index 6bad783..0fcf9ad 100644
--- a/llvm/test/Object/archive-symtab.test
+++ b/llvm/test/Object/archive-symtab.test
@@ -99,6 +99,12 @@
MACHO-NEXT: 0000000000000001 T _foo
MACHO-NEXT: 0000000000000002 T _main
+RUN: llvm-nm -M %p/Inputs/macho-toc64-archive-x86_64.a | FileCheck --check-prefix=MACHO-TOC64 %s
+
+MACHO-TOC64: Archive map
+MACHO-TOC64-NEXT: _test in test.o
+MACHO-TOC64-NEXT: _test in xtest.o
+
RUN: rm -f %t.a
RUN: llvm-ar --format=gnu rcsU %t.a %p/Inputs/coff-short-import-code %p/Inputs/coff-short-import-data
RUN: llvm-nm -M %t.a | FileCheck --check-prefix=COFF-SHORT-IMPORT %s