llvm-project/llvm/test/tools/llvm-objcopy/ELF/add-symbol-new-symbol-visibility.test
Chris Jackson fa1fe93789 [llvm-objcopy] Allow the visibility of symbols created by --binary and
--add-symbol to be specified with --new-symbol-visibility

llvm-svn: 370458
2019-08-30 10:17:16 +00:00

21 lines
597 B
Plaintext

## Ensure that the visibility of symbols added with --add-symbol can be
## specified with the --new-symbol-visibility switch.
# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-objcopy --new-symbol-visibility protected --add-symbol symbol_protected=.text:42 \
# RUN: --add-symbol symbol_hidden=.text:42,hidden %t.obj %t
# RUN: llvm-readelf -s %t | FileCheck %s
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
# CHECK: PROTECTED {{.*}} symbol_protected
# CHECK: HIDDEN {{.*}} symbol_hidden