Skip to content

Commit 02ccc2a

Browse files
xen0ntru
authored andcommitted
[lld][ELF][test] Fix excessive output file size in loongarch-add-sub.s
Initially the .rodata section came before .text, hence sharing its segment with the program header sitting at a small offset, pushing the output file size to ~72GiB (the file was sparse though, so not much is really written). This breaks on 32-bit platforms and is irrelevant to the feature being tested, so re-order the two sections so .text gets processed first, and both sections get their own segment. This addresses the issue found by the clang-armv8-lld-2stage builder: https://lab.llvm.org/buildbot/#/builders/178/builds/5340 Reviewed By: SixWeining, xry111 Differential Revision: https://reviews.llvm.org/D156293 (cherry picked from commit ffe2b6f)
1 parent d4a6c50 commit 02ccc2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lld/test/ELF/loongarch-add-sub.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %s -o %t.la64.o
44

5-
# RUN: ld.lld --section-start=.rodata=0x1234567890 --section-start=.text=0x9876543210 %t.la64.o -o %t.la64
5+
# RUN: ld.lld --section-start=.text=0x1234567890 --section-start=.rodata=0x9876543210 %t.la64.o -o %t.la64
66
# RUN: llvm-readelf -x .rodata %t.la64 | FileCheck --check-prefix=CHECK %s
77
# CHECK: section '.rodata':
8-
# CHECK-NEXT: 0x1234567890 10325476 98badcfe 80b9fd41 86000000
9-
# CHECK-NEXT: 0x12345678a0 80b9fd41 80b980
8+
# CHECK-NEXT: 0x9876543210 10325476 98badcfe 804602be 79ffffff
9+
# CHECK-NEXT: 0x9876543220 804602be 804680
1010

11+
.text
1112
.global _start
12-
1313
_start:
1414
1:
1515
break 0

0 commit comments

Comments
 (0)