3 # RUN: rm -rf %t && split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a1.s -o %t/a1.o
5 # 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-whitespace
7 # 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-whitespace
9 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a2.s -o %t/a2.o
10 # 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-whitespace
13 # CHECK1:Memory region Used Size Region Size %age Used
14 # CHECK1-NEXT: ROM: 4 B 1 KB 0.39%
15 # CHECK1-NEXT: RAM: 4 B 256 KB 0.00%
18 # CHECK2:Memory region Used Size Region Size %age Used
21 # CHECK3:Memory region Used Size Region Size %age Used
22 # CHECK3-NEXT: ROM: 256 KB 1 MB 25.00%
23 # CHECK3-NEXT: RAM: 32 B 2 GB 0.00%
50 ROM
(RX
) : ORIGIN
= 0x0, LENGTH
= 1K
51 RAM
(W
) : ORIGIN
= 0x100000, LENGTH
= 256K
68 ROM
(RX
) : ORIGIN
= 0x0, LENGTH
= 1M
69 RAM
(W
) : ORIGIN
= 0x1000000, LENGTH
= 2048M