<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 20, 2015 at 6:53 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><br><div><div>On Jan 20, 2015, at 6:37 PM, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:</div><br><blockquote type="cite"><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>If my understanding is correct, the dependencies dependencies between components in LLD should be like this:</div><div><br></div><div>Config: (nothing)</div><div>Core: Config</div><div>Driver: Core Passes ReaderWriter</div><div>Passes: Core ReaderWriter</div><div>ReaderWriter: Core (and Driver?)</div><div><br></div><div>I don't want ReaderWriter to depend on Driver, but it may be unavoidable because of .drectve section in PE/COFF which contains command line options.</div></blockquote><div><br></div></span><div>Well, it *can't* depend on Driver if Driver depends on ReaderWriter.</div><span><div></div></span></div></div></div></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Oh that's true. Then the only thing we can do is to combine Driver and ReaderWriter to make it one library? It's far from ideal and feels wrong though.</div></blockquote><br></div></span><div>Can we finesse this by having the WinLinkDriver register a “parse” function pointer with PECOFFLinkingContext.  Then have FileCOFF just call the registered parse function in the PECOFFLinkingContext?  </div><span class="HOEnZb"><font color="#888888"><div></div></font></span></div></blockquote></div><br></div><div class="gmail_extra">We could and I thought about that. The problem is that it's quite common to have a .drectve section for a COFF file, so PE/COFF ReaderWriter would be mostly unusable if you don't register the parser. If you always have to register, it would spoil the meaning of splitting them up.</div></div>