[PATCH] D99680: Allow /STACK in #pragma comment(linker, ...)
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 16:01:15 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Revision".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ac3fcc526ce: Allow /STACK in #pragma comment(linker, ...) (authored by alexreinking, committed by rnk).
Changed prior to commit:
https://reviews.llvm.org/D99680?vs=334539&id=343223#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99680/new/
https://reviews.llvm.org/D99680
Files:
lld/COFF/Driver.cpp
lld/test/COFF/stack-drectve.s
Index: lld/test/COFF/stack-drectve.s
===================================================================
--- /dev/null
+++ lld/test/COFF/stack-drectve.s
@@ -0,0 +1,16 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t.obj
+# RUN: lld-link /out:%t.exe /entry:main %t.obj
+# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
+
+# CHECK: SizeOfStackReserve: 20480
+# CHECK: SizeOfStackCommit: 12288
+
+ .text
+ .globl main
+main:
+ mov $42, %eax
+ ret
+
+ .section .drectve,"yn"
+ .ascii " -stack:0x5000,0x3000"
Index: lld/COFF/Driver.cpp
===================================================================
--- lld/COFF/Driver.cpp
+++ lld/COFF/Driver.cpp
@@ -408,6 +408,10 @@
case OPT_section:
parseSection(arg->getValue());
break;
+ case OPT_stack:
+ parseNumbers(arg->getValue(), &config->stackReserve,
+ &config->stackCommit);
+ break;
case OPT_subsystem: {
bool gotVersion = false;
parseSubsystem(arg->getValue(), &config->subsystem,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99680.343223.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210505/6a4c3030/attachment.bin>
More information about the llvm-commits
mailing list