<div><br><div class="gmail_quote"><div dir="auto">On Wed, Mar 7, 2018 at 9:56 AM Eric Christopher via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Zach!<br><br>I've been thinking a bit about this for a while now and I'm still of two opinions:<br><br><div class="gmail_quote"></div></div><div><div class="gmail_quote"><div>On Wed, Mar 7, 2018 at 9:21 AM Zachary Turner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Currently llvm-objcopy only supports ELF files, and most of it's command line flags are ELF / DWARF specific that don't make any sense on COFF files.  So a useful set of options for COFF would be largely disjoint, with maybe 1-2 overlapping options.  What would be the best way to add this in llvm-objcopy?  I can think of 3 options:<div><br></div><div>1) Re-write the existing CLI of llvm-objcopy to use subcommands, and put the current set of options behind an ELF subcommand.  To me this is the cleanest approach, but it's also the most disruptive, as existing users of llvm-objcopy would have to retrain themselves to use this new subcommand, and tools / scripts may have to be updated as wells.</div><div><br></div></div></blockquote><div><br></div></div></div><div><div class="gmail_quote"><div>I really like this option. I like orderly commands and having an ELF subcommand is really nice, however...</div></div></div><div><div class="gmail_quote"><div> </div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">While this is tempting, I don’t think that we can break compatibility with existing tools as it is intended to be a replacement.  However, we could do something like we did with readobj and readelf.  Note that the obj copy from binutils also works with COFF, so that should be supported too.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>2) Throw in all of the COFF options to the current llvm-objcopy, and just have them be mixed with the ELF options.  I think this makes the tool more difficult to use and more confusing, but it is admittedly the simplest approach.</div><div><br></div></div></blockquote><div><br></div></div></div><div><div class="gmail_quote"><div>This is the sort of thing that people expect from using gnu objcopy and so I'm reticent to have a tool with no way to get the "command line expected syntax".</div><div><br></div><div>Mostly what I want is 1 with a shim that gets me 2.</div><div><br></div><div>Thoughts?</div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">I think we are thinking more or less the same thing.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div></div></div></div><div><div class="gmail_quote"><div><br></div><div>-eric</div></div></div><div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>3) Make a new tool called llvm-coffcopy / llvm-objcopy-coff, or something to that effect.</div><div><br></div><div>Anyone have any thoughts or strong preferences?</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>