diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-16 19:57:42 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-16 19:57:42 +0000 |
| commit | 890e89caadb9d2fe50f3d4e5d6782b2d33e2bc29 (patch) | |
| tree | aba891b9f670b8c1fe766a7d28af2ef123a74db9 | |
| parent | aec39c68aea7a06613b52817ed352b7a7764e0bd (diff) | |
| download | bcm5719-llvm-890e89caadb9d2fe50f3d4e5d6782b2d33e2bc29.tar.gz bcm5719-llvm-890e89caadb9d2fe50f3d4e5d6782b2d33e2bc29.zip | |
Add an interesting case where we were already producing the correct result.
llvm-svn: 250544
| -rw-r--r-- | lld/test/elf2/startstop-shared.s | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lld/test/elf2/startstop-shared.s b/lld/test/elf2/startstop-shared.s new file mode 100644 index 00000000000..ba8c5bf554f --- /dev/null +++ b/lld/test/elf2/startstop-shared.s @@ -0,0 +1,18 @@ +// REQUIRES: x86 +// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +// RUN: ld.lld2 %t.o -o %t.so -shared +// RUN: llvm-readobj -r -t %t.so | FileCheck %s + + .quad __start_foo + .section foo,"a" +// By default the symbol is visible and we need a dynamic reloc. +// CHECK: R_X86_64_64 __start_foo 0x0 + + .hidden __start_bar + .quad __start_bar + .section bar,"a" +// Test that we are able to hide the symbol. +// CHECK: R_X86_64_RELATIVE - 0x[[ADDR:.*]] + +// CHECK: Name: __start_bar +// CHECK-NEXT: Value: 0x[[ADDR]] |

