summaryrefslogtreecommitdiff
path: root/test/Object/nm-trivial-object.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/Object/nm-trivial-object.test')
-rw-r--r--test/Object/nm-trivial-object.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Object/nm-trivial-object.test b/test/Object/nm-trivial-object.test
index 631e821134..ee0c3ffd8e 100644
--- a/test/Object/nm-trivial-object.test
+++ b/test/Object/nm-trivial-object.test
@@ -16,6 +16,8 @@ RUN: llvm-nm %p/Inputs/trivial-object-test.macho-x86-64 \
RUN: | FileCheck %s -check-prefix macho64
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 \
+RUN: | FileCheck %s -check-prefix ELF-SEC-ADDR
COFF: 00000000 d .data
COFF: 00000000 t .text
@@ -54,3 +56,11 @@ macho64: 00000028 s L_.str
macho64: 00000000 U _SomeOtherFunction
macho64: 00000000 T _main
macho64: 00000000 U _puts
+
+
+Test that nm uses addresses even with ELF .o files.
+ELF-SEC-ADDR: 00000058 D a
+ELF-SEC-ADDR-NEXT: 0000005c D b
+ELF-SEC-ADDR-NEXT: 00000040 T f
+ELF-SEC-ADDR-NEXT: 00000050 T g
+ELF-SEC-ADDR-NEXT: 00000060 D p