[PM/AA] Don't bother forward declaring Function and Value, just include
[oota-llvm.git] / test / Object / nm-shared-object.test
index b361df5355534f98bf31b94e3b584ad2d56b43b1..32ae6a861529b567e4685e764fa8a2ee1754562e 100644 (file)
@@ -1,15 +1,31 @@
 RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-i386 \
-RUN:         | FileCheck %s -check-prefix ELF
+RUN:         | FileCheck %s -check-prefix ELF-32
+
+ELF-32-NOT: U
+ELF-32: 000012c8 A __bss_start
+ELF-32: 000012c8 A _edata
+ELF-32: 000012cc A _end
+ELF-32: 000012c8 B common_sym
+ELF-32: 000012c4 D defined_sym
+ELF-32: 000001f0 T global_func
+ELF-32: 00000000 D tls_sym
+
 RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-x86-64 \
-RUN:         | FileCheck %s -check-prefix ELF
-
-; Note: tls_sym should be 'D' (not '?'), but TLS is not
-; yet recognized by ObjectFile.
-
-ELF: {{[0-9a-f]+}} A __bss_start
-ELF: {{[0-9a-f]+}} A _edata
-ELF: {{[0-9a-f]+}} A _end
-ELF: {{[0-9a-f]+}} B common_sym
-ELF: {{[0-9a-f]+}} D defined_sym
-ELF: {{[0-9a-f]+}} T global_func
-ELF:               ? tls_sym
+RUN:         | FileCheck %s -check-prefix ELF-64
+
+ELF-64-NOT: U
+ELF-64: 0000000000200454 A __bss_start
+ELF-64: 0000000000200454 A _edata
+ELF-64: 0000000000200458 A _end
+ELF-64: 0000000000200454 B common_sym
+ELF-64: 0000000000200450 D defined_sym
+ELF-64: 00000000000002f0 T global_func
+ELF-64: 0000000000000000 D tls_sym
+
+RUN: not llvm-nm -D %p/Inputs/weak-global-symbol.macho-i386 2>&1 \
+RUN:         | FileCheck %s -check-prefix ERROR
+
+RUN: not llvm-nm -D %p/Inputs/trivial-object-test.coff-i386 2>&1 \
+RUN:         | FileCheck %s -check-prefix ERROR
+
+ERROR: File format has no dynamic symbol table.