brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · c496d99 Raw
47 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=i686 %s -o %t1.o4# RUN: echo "SECTIONS { .text : { . = 0xffffffff; *(.text*); } }" > %t1.script5# RUN: not ld.lld --no-check-sections -T %t1.script %t1.o -o /dev/null 2>&1 | FileCheck %s6 7## Error if an address is greater than or equal to 2**32 for ELF32.8## When -M is specified, print the link map even if such an error occurs,9## because the link map can help diagnose problems.10# RUN: not ld.lld -T %t1.script %t1.o -M -o /dev/null 2>&1 | \11# RUN:   FileCheck --check-prefix=MAP1 %s12 13# MAP1:           VMA      LMA     Size Align Out     In      Symbol14# MAP1-NEXT:        0        0 100000001     4 .text15# MAP1-NEXT:        0        0 ffffffff     1         . = 0xffffffff16# MAP1-NEXT: 100000000 100000000        1     4         {{.*}}.o:(.text)17# MAP1:      error: section .text at 0x0 of size 0x100000001 exceeds available address space18 19## Error if an address is greater than or equal to 2**63.20## Print a link map if -M is specified.21# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t2.o22# RUN: echo "SECTIONS { .text : { . = 0x8fffffffffffffff; *(.text*); } }" > %t2.script23# RUN: not ld.lld -T %t2.script -M %t2.o -o /dev/null 2>&1 | \24# RUN:   FileCheck --check-prefixes=MAP2,CHECK64 %s25 26# MAP2:                   VMA              LMA     Size Align Out     In      Symbol27# MAP2:      9000000000000000 9000000000000000        1     4         {{.*}}.o:(.text)28# MAP2-NEXT: 9000000000000000 9000000000000000        0     1                 _start29 30# CHECK: error: output file too large31# CHECK-NEXT: section sizes:32# CHECK-NEXT: .text 429496729733# CHECK-NEXT: .data 134 35# CHECK64: error: output file too large36# CHECK64-NEXT: section sizes:37# CHECK64-NEXT: .text 1037629354146162278538# CHECK64-NEXT: .data 139 40.data41.byte 4242 43.text44.global _start45_start:46  nop47