197785af4SGeorge Rimar# REQUIRES: x86 297785af4SGeorge Rimar 397785af4SGeorge Rimar# RUN: echo ".section .foo,\"a\"" > %t.s 497785af4SGeorge Rimar# RUN: echo ".quad 1" >> %t.s 597785af4SGeorge Rimar# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o 697785af4SGeorge Rimar 7*81cebfd0SFangrui Song# RUN: not ld.lld -o /dev/null %t.o --script %s 2>&1 | FileCheck %s 897785af4SGeorge Rimar 997785af4SGeorge Rimar# Check we are able to catch 'ram' overflow caused by BYTE command. 1097785af4SGeorge Rimar# CHECK: error: section '.foo' will not fit in region 'ram': overflowed by 1 bytes 1197785af4SGeorge Rimar 1297785af4SGeorge RimarMEMORY { 1397785af4SGeorge Rimar text (rwx): org = 0x0, len = 0x1000 1497785af4SGeorge Rimar ram (rwx): org = 0x1000, len = 8 1597785af4SGeorge Rimar} 1697785af4SGeorge RimarSECTIONS { 1797785af4SGeorge Rimar .text : { *(.text) } > text 1897785af4SGeorge Rimar .foo : { 1997785af4SGeorge Rimar *(.foo) 2097785af4SGeorge Rimar BYTE(0x1) 2197785af4SGeorge Rimar } > ram 2297785af4SGeorge Rimar} 23