diff options
| author | Ed Schouten <ed@nuxi.nl> | 2017-02-21 15:34:41 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@nuxi.nl> | 2017-02-21 15:34:41 +0000 |
| commit | c16bc135112ee0330163f20759cdd42e428801ac (patch) | |
| tree | c8775644d3c5a19641aa4d266abda34fedaf83f7 | |
| parent | 6d8957b979a888d9b8e0b9023495c4078f7a7ff7 (diff) | |
| download | bcm5719-llvm-c16bc135112ee0330163f20759cdd42e428801ac.tar.gz bcm5719-llvm-c16bc135112ee0330163f20759cdd42e428801ac.zip | |
Add a test for the feature introduced in r295240.
r295240 tweaked LLD to generate a symbol table when passing in
--export-dynamic, even when creating static executables. Add a test to
make sure this never regresses.
Reviewed by: ruiu, rafael
Differential Revision: https://reviews.llvm.org/D30175
llvm-svn: 295725
| -rw-r--r-- | lld/test/ELF/static-with-export-dynamic.s | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lld/test/ELF/static-with-export-dynamic.s b/lld/test/ELF/static-with-export-dynamic.s new file mode 100644 index 00000000000..8634835d9aa --- /dev/null +++ b/lld/test/ELF/static-with-export-dynamic.s @@ -0,0 +1,32 @@ +// RUN: llvm-mc -filetype=obj -triple=i686-unknown-cloudabi %s -o %t.o +// RUN: ld.lld --export-dynamic %t.o -o %t +// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s +// REQUIRES: x86 + +// Ensure that a dynamic symbol table is present when --export-dynamic +// is passed in, even when creating statically linked executables. +// +// CHECK: DynamicSymbols [ +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: Undefined +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: _start +// CHECK-NEXT: Value: 0x11000 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: ] + +.global _start +_start: + ret |

