aboutsummaryrefslogtreecommitdiffstats
path: root/test/Object/objdump-symbol-table.test
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-09-21 07:08:08 +0000
committerAlexey Samsonov <samsonov@google.com>2012-09-21 07:08:08 +0000
commit01fa41a106ed0ff86c3b9ffe0843679211bf487c (patch)
tree5156f0942f736a79dfdf9e5cf642e2168b0d1278 /test/Object/objdump-symbol-table.test
parentf17422181fed6c5c73a27622be012c44f93cde4e (diff)
downloadexternal_llvm-01fa41a106ed0ff86c3b9ffe0843679211bf487c.zip
external_llvm-01fa41a106ed0ff86c3b9ffe0843679211bf487c.tar.gz
external_llvm-01fa41a106ed0ff86c3b9ffe0843679211bf487c.tar.bz2
Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/objdump-symbol-table.test')
-rw-r--r--test/Object/objdump-symbol-table.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Object/objdump-symbol-table.test b/test/Object/objdump-symbol-table.test
index 989ec04..c94b077 100644
--- a/test/Object/objdump-symbol-table.test
+++ b/test/Object/objdump-symbol-table.test
@@ -4,6 +4,8 @@ RUN: llvm-objdump -t %p/Inputs/trivial-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF-i386
RUN: llvm-objdump -t %p/Inputs/trivial-object-test.macho-i386 \
RUN: | FileCheck %s -check-prefix macho-i386
+RUN: llvm-objdump -t %p/Inputs/shared-object-test.elf-i386 \
+RUN: | FileCheck %s -check-prefix ELF-shared
COFF-i386: file format
COFF-i386: SYMBOL TABLE:
@@ -31,3 +33,9 @@ macho-i386: SYMBOL TABLE:
macho-i386: 00000000 g F __TEXT,__text 00000024 _main
macho-i386: 00000000 *UND* 00000000 _SomeOtherFunction
macho-i386: 00000000 *UND* 00000000 _puts
+
+ELF-shared: shared-object-test.elf-i386: file format
+ELF-shared: SYMBOL TABLE:
+ELF-shared: 00000200 l F .text 00000003 local_func
+ELF-shared: 000012c4 g .data 00000004 defined_sym
+ELF-shared: 000001f0 g F .text 00000003 global_func