[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / lld / test / ELF / compress-sections-special.s
blob7e474ac7c7d67fdc20b2efc4ce1db69f5a26540c
1 # REQUIRES: x86, zlib
3 # RUN: rm -rf %t && mkdir %t && cd %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o a.o
5 # RUN: ld.lld -pie a.o --compress-sections .strtab=zlib --compress-sections .symtab=zlib -o out
6 # RUN: llvm-readelf -Ss -x .strtab out 2>&1 | FileCheck %s
8 # CHECK: nonalloc0 PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
9 # CHECK: .symtab SYMTAB 0000000000000000 [[#%x,]] [[#%x,]] 18 C 12 3 1
10 # CHECK-NEXT: .shstrtab STRTAB 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
11 # CHECK-NEXT: .strtab STRTAB 0000000000000000 [[#%x,]] [[#%x,]] 00 C 0 0 1
13 ## TODO Add compressed SHT_STRTAB/SHT_SYMTAB support to llvm-readelf
14 # CHECK: warning: {{.*}}: unable to get the string table for the SHT_SYMTAB section: SHT_STRTAB string table section
16 # CHECK: Hex dump of section '.strtab':
17 # CHECK-NEXT: 01000000 00000000 5c000000 00000000
18 # CHECK-NEXT: 01000000 00000000 {{.*}}
20 # RUN: not ld.lld -shared a.o --compress-sections .dynstr=zlib 2>&1 | FileCheck %s --check-prefix=ERR-ALLOC
21 # ERR-ALLOC: error: --compress-sections: section '.dynstr' with the SHF_ALLOC flag cannot be compressed
23 .globl _start, g0, g1
24 _start:
25 l0:
26 g0:
27 g1:
28 .globl ggggggggggggggggggggggggggggggg0
29 .globl ggggggggggggggggggggggggggggggg1
31 .section nonalloc0,""
32 .quad .text+1
33 .quad .text+2