1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o 3# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/protected-shared.s -o %t2.o 4# RUN: ld.lld -shared --soname=t2 %t2.o -o %t2.so 5# RUN: ld.lld %t.o %t2.so -o %t 6# RUN: llvm-readelf -s %t | FileCheck %s 7# RUN: ld.lld %t2.so %t.o -o %t1 8# RUN: llvm-readelf -s %t1 | FileCheck %s 9 10# CHECK: Symbol table '.dynsym' 11# CHECK: Num: Value Size Type Bind Vis Ndx Name 12# CHECK: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo 13 14# CHECK: Symbol table '.symtab' 15# CHECK: Num: Value Size Type Bind Vis Ndx Name 16# CHECK: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo 17# CHECK: {{.*}} 0 NOTYPE GLOBAL DEFAULT [[#]] bar 18 19 .global _start 20_start: 21 22 .data 23 .quad foo 24 25 .global bar 26bar: 27