Files
clang-p2996/lld/test/ELF/startstop-shared.s
George Rimar e1937bb524 [ELF] - Give automatically generated __start_* and __stop_* symbols default visibility.
This patch is opposite to D19024, which made this symbols to be hidden by default.

Unfortunately FreeBSD loader wants to see
start_set_modmetadata_set/stop_set_modmetadata_set in the dynamic symbol table. 
They were not placed there because had hidden visibility.

Patch makes them to have default visibility again.

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

llvm-svn: 279262
2016-08-19 15:36:32 +00:00

29 lines
746 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"
// Test that we are able to hide the symbol.
// CHECK: R_X86_64_RELATIVE - 0x[[ADDR:.*]]
// By default the symbol is visible and we need a dynamic reloc.
// CHECK: R_X86_64_64 __start_foo 0x0
// CHECK: Name: __start_bar
// CHECK-NEXT: Value: 0x[[ADDR]]
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Local
// CHECK: Name: __start_foo
// CHECK-NEXT: Value:
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Global