1## Ensure that the visibility of symbols added with --add-symbol can be
2## specified with the --new-symbol-visibility switch.
3
4# RUN: yaml2obj %s -o %t.obj
5# RUN: llvm-objcopy --new-symbol-visibility protected --add-symbol symbol_protected=.text:42 \
6# RUN:              --add-symbol symbol_hidden=.text:42,hidden %t.obj %t
7# RUN: llvm-readelf -s %t | FileCheck %s
8
9!ELF
10FileHeader:
11  Class:   ELFCLASS64
12  Data:    ELFDATA2LSB
13  Type:    ET_REL
14  Machine: EM_X86_64
15Sections:
16  - Name: .text
17    Type: SHT_PROGBITS
18
19# CHECK: PROTECTED {{.*}} symbol_protected
20# CHECK: HIDDEN {{.*}} symbol_hidden
21