[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / zsectionheader.s
blobc1e654ac1082dde923e23b8773206d9f3d7c6608
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: ld.lld -shared -z nosectionheader -z sectionheader %t.o -o %t.so 2>&1 | count 0
4 # RUN: llvm-readelf -hS %t.so | FileCheck %s --check-prefixes=CHECK,SHDR
6 # RUN: ld.lld -shared -z nosectionheader %t.o -o %t0.so
7 # RUN: llvm-readelf -h --dyn-syms %t0.so | FileCheck %s --check-prefixes=CHECK,NOSHDR
8 # RUN: llvm-strings %t0.so | FileCheck %s --check-prefixes=NOSHDR-STR
10 # CHECK: Size of this header: 64 (bytes)
11 # CHECK-NEXT: Size of program headers: 56 (bytes)
12 # CHECK-NEXT: Number of program headers: 6
13 # CHECK-NEXT: Size of section headers: 64 (bytes)
14 # SHDR-NEXT: Number of section headers: 13
15 # SHDR-NEXT: Section header string table index: 11
16 # NOSHDR-NEXT: Number of section headers: 0
17 # NOSHDR-NEXT: Section header string table index: 0
19 # SHDR: Section Headers:
20 # NOSHDR: Symbol table for image contains 2 entries:
21 # NOSHDR: _start
23 ## _start occurs as a dynamic string table entry. There is no static string table
24 ## entry. `nonalloc` is not in the output.
25 # NOSHDR-STR: _start
26 # NOSHDR-STR-NOT: _start
28 # RUN: not ld.lld -r -z nosectionheader %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
30 # ERR: error: -r and -z nosectionheader may not be used together
32 .globl _start
33 _start:
35 .section nonalloc,""
36 .asciz "_start"