Files
clang-p2996/lld/test/ELF/startstop-shared.s
George Rimar 8ee7947fb4 [ELF] - Make __start_/__stop_<section_name> symbols STV_PROTECTED
There are no reasons for them to be STV_DEFAULT,
recently bfd did the same change.

Differential revision: https://reviews.llvm.org/D44566

llvm-svn: 327983
2018-03-20 14:22:10 +00:00

41 lines
995 B
ArmAsm

// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-readobj -r -t %t.so | FileCheck %s
.data
.quad __start_foo
.section foo,"aw"
.hidden __start_bar
.quad __start_bar
.section bar,"a"
// CHECK: Relocations [
// CHECK-NEXT: Section {{.*}} .rela.dyn {
// CHECK-NEXT: R_X86_64_RELATIVE
// CHECK-NEXT: R_X86_64_RELATIVE
// CHECK-NEXT: }
// CHECK-NEXT: ]
// Test that we are able to hide the symbol.
// By default the symbol is protected.
// CHECK: Name: __start_bar
// CHECK-NEXT: Value:
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other [
// CHECK-NEXT: STV_HIDDEN
// CHECK-NEXT: ]
// CHECK: Name: __start_foo
// CHECK-NEXT: Value:
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other [
// CHECK-NEXT: STV_PROTECTED
// CHECK-NEXT: ]