RUN: | FileCheck %s -check-prefix macho
RUN: llvm-nm %p/Inputs/trivial-object-test.macho-x86-64 \
RUN: | FileCheck %s -check-prefix macho64
+RUN: llvm-nm %p/Inputs/macho-text-data-bss.macho-x86_64 \
+RUN: | FileCheck %s -check-prefix macho-tdb
RUN: llvm-nm %p/Inputs/common.coff-i386 \
RUN: | FileCheck %s -check-prefix COFF-COMMON
RUN: llvm-nm %p/Inputs/relocatable-with-section-address.elf-x86-64 \
macho64: 0000000000000000 T _main
macho64: U _puts
+macho-tdb: 0000000000000030 s EH_frame0
+macho-tdb: 0000000000000070 b _b
+macho-tdb: 000000000000000c D _d
+macho-tdb: 0000000000000000 T _t
+macho-tdb: 0000000000000048 S _t.eh
Test that nm uses addresses even with ELF .o files.
ELF-SEC-ADDR64: 0000000000000058 D a
CHECK-AR: 0000000000000080 S _main.eh
CHECK-AR: U _printf
CHECK-AR: macho-universal-archive.x86_64.i386(foo.o) (for architecture i386):
-CHECK-AR: 00000008 S _bar
+CHECK-AR: 00000008 D _bar
CHECK-AR: 00000000 T _foo
StringRef SegmentName = Obj.getSectionFinalSegmentName(Ref);
if (SegmentName == "__TEXT" && SectionName == "__text")
return 't';
+ else if (SegmentName == "__DATA" && SectionName == "__data")
+ return 'd';
+ else if (SegmentName == "__DATA" && SectionName == "__bss")
+ return 'b';
else
return 's';
}