[PATCH] D38005: [COFF] Check for sections larger than 4 GiB

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 13:43:47 PDT 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: test/COFF/section-size.s:3-5
+# RUN: echo '.lcomm s, 0x80000000' | llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t80000000_1.obj
+# RUN: cp %t80000000_1.obj %t80000000_2.obj
+# RUN: echo '.lcomm s, 0xffffffff' | llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %tffffffff.obj
----------------
It seems just %t1.obj and %t3.obj suffice.


================
Comment at: test/COFF/section-size.s:9
+
+# RUN: not lld-link -entry:main %tmain.obj %t80000000_1.obj %t80000000_2.obj -out:%t.exe 2>&1 | FileCheck %s
+# CHECK: error: section larger than 4 GiB: .bss
----------------
Instead of creating a temporary file by cp, you can just pass the same object file twice.


https://reviews.llvm.org/D38005





More information about the llvm-commits mailing list