[PATCH] D24060: [lld][ELF] Add support for -b binary
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 11:16:52 PDT 2016
rafael added a comment.
I still thing that writing an ELF to read it back is a bad design, but the refactoring needed to avoid it is non-trivial. We are almost there for symbols, but sections require more work.
So please upload a last version with the linux build fixed, the symbol names changes and the nit in this comment. With that, it probably LGTM and will try to refactor it afterwards.
================
Comment at: ELF/Driver.cpp:507
@@ +506,3 @@
+ StringRef Val = Arg->getValue();
+ if (Val == "elf" || Val == "default") {
+ Config->Binary = false;
----------------
You can write this as
case OPT_format: {
StringRef Val = Arg->getValue();
if (Val == "elf" || Val == "default")
Config->Binary = false;
else if (Val == "binary")
Config->Binary = true;
else
error("unknown " + Arg->getSpelling() + " format: " + Arg->getValue() +
" (supported formats: elf, default, binary)");
break;
}
https://reviews.llvm.org/D24060
More information about the llvm-commits
mailing list