brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 8077a59 Raw
76 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t && split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a1.s -o %t/a1.o5# RUN: ld.lld -T %t/1.t %t/a1.o -o %t/a1 --print-memory-usage \6# RUN:     | FileCheck %s --check-prefix=CHECK1 --match-full-lines --strict-whitespace7# RUN: ld.lld -T %t/2.t %t/a1.o -o %t/a2 --print-memory-usage \8# RUN:     | FileCheck %s --check-prefix=CHECK2 --match-full-lines --strict-whitespace9# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a2.s -o %t/a2.o10# RUN: ld.lld -T %t/3.t %t/a2.o -o %t/a3 --print-memory-usage \11# RUN:     | FileCheck %s --check-prefix=CHECK3 --match-full-lines --strict-whitespace12 13#      CHECK1:Memory region         Used Size  Region Size  %age Used14# CHECK1-NEXT:             ROM:           4 B         1 KB      0.39%15# CHECK1-NEXT:             RAM:           4 B       256 KB      0.00%16#  CHECK1-NOT:{{.}}17 18# CHECK2:Memory region         Used Size  Region Size  %age Used19# CHECK2-NOT:{{.}}20 21#      CHECK3:Memory region         Used Size  Region Size  %age Used22# CHECK3-NEXT:             ROM:        256 KB         1 MB     25.00%23# CHECK3-NEXT:             RAM:          32 B         2 GB      0.00%24#  CHECK3-NOT:{{.}}25 26#--- a1.s27.text28.globl _start29_start:30  .long 131 32.data33.globl b34b:35  .long 236 37#--- a2.s38.text39.globl _start40_start:41  .space 256*102442 43.data44.globl b45b:46  .space 3247 48#--- 1.t49MEMORY {50  ROM (RX) : ORIGIN = 0x0, LENGTH = 1K51  RAM (W)  : ORIGIN = 0x100000, LENGTH = 256K52}53SECTIONS {54  . = 0;55  .text : { *(.text) }56  .data : { *(.data) }57}58 59#--- 2.t60SECTIONS {61  . = 0;62  .text : { *(.text) }63  .data : { *(.data) }64}65 66#--- 3.t67MEMORY {68  ROM (RX) : ORIGIN = 0x0, LENGTH = 1M69  RAM (W)  : ORIGIN = 0x1000000, LENGTH = 2048M70}71SECTIONS {72  . = 0;73  .text : { *(.text) }74  .data : { *(.data) }75}76