[PATCH] D52526: Allow later -z name=<int> args to override earlier args
Ryan Prichard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 26 13:52:27 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD343145: Allow later -z name=<int> args to override earlier args (authored by rprichard, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D52526?vs=167035&id=167197#toc
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D52526
Files:
Common/Args.cpp
test/ELF/zstack-size.s
Index: test/ELF/zstack-size.s
===================================================================
--- test/ELF/zstack-size.s
+++ test/ELF/zstack-size.s
@@ -6,6 +6,9 @@
# RUN: ld.lld -z stack-size=0 %t -o %t2
# RUN: llvm-readobj -program-headers %t2 | FileCheck %s -check-prefix=CHECK2
+# RUN: ld.lld -z stack-size=0x2000 -z stack-size=0x1000 %t -o %t3
+# RUN: llvm-readobj -program-headers %t3 | FileCheck %s -check-prefix=CHECK1
+
.global _start
_start:
nop
Index: Common/Args.cpp
===================================================================
--- Common/Args.cpp
+++ Common/Args.cpp
@@ -41,7 +41,7 @@
uint64_t lld::args::getZOptionValue(opt::InputArgList &Args, int Id,
StringRef Key, uint64_t Default) {
- for (auto *Arg : Args.filtered(Id)) {
+ for (auto *Arg : Args.filtered_reverse(Id)) {
std::pair<StringRef, StringRef> KV = StringRef(Arg->getValue()).split('=');
if (KV.first == Key) {
uint64_t Result = Default;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52526.167197.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180926/b9f96e70/attachment.bin>
More information about the llvm-commits
mailing list