33 lines · python
1# RUN: %python %s | llvm-mc -filetype=obj -triple i686-pc-win32 - | llvm-readobj -h - | FileCheck %s2 3from __future__ import print_function4 5# This test checks that the COFF object emitter can produce objects with6# more than 65279 sections.7 8# While we only generate 65277 sections, an implicit .text, .data and .bss will9# also be emitted. This brings the total to 65280.10num_sections = 6527711 12# CHECK: ImageFileHeader {13# CHECK-NEXT: Machine: IMAGE_FILE_MACHINE_I38614# CHECK-NEXT: SectionCount: 6528015# CHECK-NEXT: TimeDateStamp: {{[0-9]+}}16# CHECK-NEXT: PointerToSymbolTable: 0x{{[0-9A-F]+}}17# CHECK-NEXT: SymbolCount: 19583718# CHECK-NEXT: StringTableSize: {{[0-9]+}}19# CHECK-NEXT: OptionalHeaderSize: 020# CHECK-NEXT: Characteristics [ (0x0)21# CHECK-NEXT: ]22# CHECK-NEXT: }23 24for i in range(0, num_sections):25 print(26 """ .section .bss,"bw",discard,_b%d27 .globl _b%d # @b%d28_b%d:29 .byte 0 # 0x030"""31 % (i, i, i, i)32 )33