<div dir="ltr">Creater sounds better, but I don't find "Simple" is a meaningful prefix. Can you name ELFCreater?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 2:00 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><div><div class="m_5958758844451212476gmail_signature">On Thu, Sep 8, 2016 at 1:47 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br></div></div></span><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It reads a binary file and wrap it with ELF header/trailer. And overall it is part of the reader rather than the writer from the point of view of the entire linking process. So I at least want to avoid "Writer".</div></blockquote><div><br></div></span><div>SimpleELFWriter doesn't read anything. It writes ELF files. If we want to avoid writer I'm fine with SimpleELFCreator.</div><div><div class="h5"><div><br></div><div>- Michael Spencer<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_5958758844451212476gmail-HOEnZb"><div class="m_5958758844451212476gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 1:38 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><div><div>On Thu, Sep 8, 2016 at 1:27 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br></div></div></span><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Doesn't BinaryFile make sense? We have InputFiles to handle input files, so BinaryFile sounds like it is to handle binary file inputs. Do you have other suggestions?</div></blockquote><div><br></div></span><div>SimpleELFWriter isn't an input. It's a class that generates ELF files.</div><span><font color="#888888"><div><br></div><div>- Michael Spencer<br></div></font></span><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 1:16 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Sep 8, 2016 at 9:19 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ruiu added inline comments.<br>
<br>
================<br>
Comment at: ELF/CMakeLists.txt:20<br>
@@ -19,2 +19,3 @@<br>
   ScriptParser.cpp<br>
+  SimpleELFWriter.cpp<br>
   Strings.cpp<br>
----------------<br>
I still don't like this file name. `SimpleELFWriter` sounds like it is for -o binary instead of -b. Can you rename BinaryFile.cpp?<br></blockquote><div><br></div></span><div>I'm fine with finding another name, but BinaryFile isn't at all what this class is.</div><span><font color="#888888"><div><br></div><div>- Michael Spencer<br></div></font></span><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
================<br>
Comment at: ELF/InputFiles.cpp:736<br>
@@ +735,3 @@<br>
+template <class ELFT> std::unique_ptr<InputFile> BinaryFile::createELF() {<br>
<span>+  SimpleELFWriter<ELFT> ELF(ET_REL, Config->EMachine);<br>
+  auto DataSec = ELF.addSection(".data");<br>
----------------<br>
</span>Please move these details to SimpleELFWriter.cpp.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D24060" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2406<wbr>0</a><br><br></blockquote></span></div></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>