[PATCH] D75763: [ELF] Postpone evaluation of ORIGIN/LENGTH in a MEMORY command
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 7 02:10:48 PST 2020
grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
LGTM with 2 comments addressed.
================
Comment at: lld/ELF/ScriptParser.cpp:1526
setError("expected one of: " + s1 + ", " + s2 + ", or " + s3);
return 0;
}
----------------
It calls `std::function(nullptr_t)` constructor.
Such `Expr` will fail during evaluation (exception: std::bad_function_call).
You should probably use `return [] { return 0; };`
================
Comment at: lld/test/ELF/linkerscript/memory.s:49
+# RUN: echo 'MEMORY { ram : ORIGIN = symbol, LENGTH = 4097 } \
+# RUN: SECTIONS { \
----------------
I'd probably add a short description comment here and for the test below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75763/new/
https://reviews.llvm.org/D75763
More information about the llvm-commits
mailing list