brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · c1e654a Raw
37 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: ld.lld -shared -z nosectionheader -z sectionheader %t.o -o %t.so 2>&1 | count 04# RUN: llvm-readelf -hS %t.so | FileCheck %s --check-prefixes=CHECK,SHDR5 6# RUN: ld.lld -shared -z nosectionheader %t.o -o %t0.so7# RUN: llvm-readelf -h --dyn-syms %t0.so | FileCheck %s --check-prefixes=CHECK,NOSHDR8# RUN: llvm-strings %t0.so | FileCheck %s --check-prefixes=NOSHDR-STR9 10# CHECK:       Size of this header:               64 (bytes)11# CHECK-NEXT:  Size of program headers:           56 (bytes)12# CHECK-NEXT:  Number of program headers:         613# CHECK-NEXT:  Size of section headers:           64 (bytes)14# SHDR-NEXT:   Number of section headers:         1315# SHDR-NEXT:   Section header string table index: 1116# NOSHDR-NEXT: Number of section headers:         017# NOSHDR-NEXT: Section header string table index: 018 19# SHDR:        Section Headers:20# NOSHDR:      Symbol table for image contains 2 entries:21# NOSHDR:        _start22 23## _start occurs as a dynamic string table entry. There is no static string table24## entry. `nonalloc` is not in the output.25# NOSHDR-STR:      _start26# NOSHDR-STR-NOT:  _start27 28# RUN: not ld.lld -r -z nosectionheader %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR29 30# ERR: error: -r and -z nosectionheader may not be used together31 32.globl _start33_start:34 35.section nonalloc,""36.asciz "_start"37