1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o 3// RUN: ld.lld %t.o -o %t.so -shared 4// RUN: llvm-readobj -r -t %t.so | FileCheck %s 5 6 .data 7 .quad __start_foo 8 .section foo,"aw" 9 10 .hidden __start_bar 11 .quad __start_bar 12 .section bar,"a" 13 14// Test that we are able to hide the symbol. 15// CHECK: R_X86_64_RELATIVE - 0x[[ADDR:.*]] 16 17// By default the symbol is visible and we need a dynamic reloc. 18// CHECK: R_X86_64_64 __start_foo 0x0 19 20// CHECK: Name: __start_bar 21// CHECK-NEXT: Value: 0x[[ADDR]] 22// CHECK-NEXT: Size: 23// CHECK-NEXT: Binding: Local 24 25// CHECK: Name: __start_foo 26// CHECK-NEXT: Value: 27// CHECK-NEXT: Size: 28// CHECK-NEXT: Binding: Global 29