1;; This test generates 65535 relocation entries in a single section, 2;; which would trigger an overflow section to be generated in 32-bit mode. 3;; Since overflow section is not supported yet, we will emit an error instead of 4;; generating an invalid binary for now. 5; RUN: grep -v RUN: %s | \ 6; RUN: sed >%t.overflow.ll 's/SIZE/65535/;s/MACRO/#/;s/#/################/g;s/#/################/g;s/#/################/g;s/#/################/g;s/#/#_/g;s/_#_\([^#]\)/\1/;s/_/, /g;s/#/i8* @c/g;' 7; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ 8; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.overflow.ll 2>&1 | \ 9; RUN: FileCheck --check-prefix=OVERFLOW %s 10; OVERFLOW: LLVM ERROR: relocation entries overflowed; overflow section is not implemented yet 11 12;; This test generates 65534 relocation entries, an overflow section should 13;; not be generated. 14; RUN: grep -v RUN: %s | \ 15; RUN: sed >%t.ll 's/SIZE/65534/;s/MACRO/#/;s/#/################/g;s/#/################/g;s/#/################/g;s/#/################/g;s/#/#_/g;s/_#_#_\([^#]\)/\1/;s/_/, /g;s/#/i8* @c/g;' 16; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ 17; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll 18; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF32 %s 19 20; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ 21; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.overflow.ll 2>&1 | \ 22; RUN: FileCheck --check-prefix=XCOFF64 %s 23; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ 24; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll 2>&1 | \ 25; RUN: FileCheck --check-prefix=XCOFF64 %s 26; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. 27 28@c = external global i8, align 1 29@arr = global [SIZE x i8*] [MACRO], align 8 30 31; XCOFF32-NOT: Name: .ovrflo 32; XCOFF32-NOT: Type: STYP_OVRFLO 33; XCOFF32: Section { 34; XCOFF32: Name: .data 35; XCOFF32-NEXT: PhysicalAddress: 0x0 36; XCOFF32-NEXT: VirtualAddress: 0x0 37; XCOFF32-NEXT: Size: 0x3FFF8 38; XCOFF32-NEXT: RawDataOffset: 0x64 39; XCOFF32-NEXT: RelocationPointer: 0x4005C 40; XCOFF32-NEXT: LineNumberPointer: 0x0 41; XCOFF32-NEXT: NumberOfRelocations: 65534 42; XCOFF32-NEXT: NumberOfLineNumbers: 0 43; XCOFF32-NEXT: Type: STYP_DATA (0x40) 44; XCOFF32-NEXT: } 45; XCOFF32-NOT: Name: .ovrflo 46; XCOFF32-NOT: Type: STYP_OVRFLO 47