[PATCH] D50105: Allow oformat option to accept elf format
Rumeet Dhindsa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 14:58:59 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD338445: Allow oformat to accept format starting with elf as acceptable format. (authored by rdhindsa, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50105?vs=158390&id=158393#toc
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50105
Files:
ELF/Driver.cpp
test/ELF/oformat-binary.s
Index: test/ELF/oformat-binary.s
===================================================================
--- test/ELF/oformat-binary.s
+++ test/ELF/oformat-binary.s
@@ -19,6 +19,8 @@
# RUN: | FileCheck %s --check-prefix ERR
# ERR: unknown --oformat value: foo
+# RUN: ld.lld -o /dev/null %t --oformat elf
+
.text
.align 4
.globl _start
Index: ELF/Driver.cpp
===================================================================
--- ELF/Driver.cpp
+++ ELF/Driver.cpp
@@ -501,6 +501,8 @@
StringRef S = Arg->getValue();
if (S == "binary")
return true;
+ if (S.startswith("elf"))
+ return false;
error("unknown --oformat value: " + S);
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50105.158393.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/acb825f6/attachment.bin>
More information about the llvm-commits
mailing list