2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # Provide new symbol. The value should be 1, like set in PROVIDE()
5 # RUN: echo "SECTIONS { PROVIDE(newsym = 1);}" > %t.script
6 # RUN: ld.lld -o %t1 --script %t.script %t
7 # RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE1 %s
8 # PROVIDE1: 0000000000000001 g *ABS* 0000000000000000 newsym
10 # Provide new symbol (hidden). The value should be 1
11 # RUN: echo "SECTIONS { PROVIDE_HIDDEN(newsym = 1);}" > %t.script
12 # RUN: ld.lld -o %t1 --script %t.script %t
13 # RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN1 %s
14 # HIDDEN1: 0000000000000001 l *ABS* 0000000000000000 .hidden newsym
16 # RUN: echo 'SECTIONS { PROVIDE_HIDDEN("newsym" = 1);}' > %t.script
17 # RUN: ld.lld -o %t1 --script %t.script %t
18 # RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN1 %s