[PATCH] D96214: [ELF] Inspect -EL & -EB for OUTPUT_FORMAT(default, big, little)
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 04:49:33 PST 2021
peter.smith accepted this revision.
peter.smith added a comment.
This revision is now accepted and ready to land.
LGTM, I've made some small suggestions.
================
Comment at: lld/ELF/Config.h:157
bool disableVerify;
+ bool eb = false;
+ bool el = false;
----------------
eb and el are close in name to the isLE option? Perhaps use something like "optLE" or "leSet" to avoid confusion.
================
Comment at: lld/ELF/Options.td:162
+def el: F<"EL">;
+def eb: F<"EB">;
----------------
Worth adding a simple line of text for the help file? Possibly the man page as well.
ld.bfd says "Link little-endian objects" for EL
================
Comment at: lld/ELF/ScriptParser.cpp:436
+// second form is used, choose big if -EB is specified, little if -EL is
+// specified.
void ScriptParser::readOutputFormat() {
----------------
Worth mentioning what happens if second form is used but no choice of -EB or -EL is made.
"choose big if -EB is specified, little if -EL is specified or default if neither is specified."
https://sourceware.org/binutils/docs/ld/Format-Commands.html
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96214/new/
https://reviews.llvm.org/D96214
More information about the llvm-commits
mailing list