<br><br><div class="gmail_quote">On Wed, Dec 14, 2011 at 10:38 AM, Rafael Ávila de Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@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>> Is it more clear now? If not, I would like to give it another try and<br>
> write much more details and examples.<br>
<br>
</div>I am still not completely sure I understand the use case. In particular<br>
since you say you want a bitcode module in the end, I don't understand<br>
how this is different from using llvm-link, it doesn't complain about<br>
undefined symbols...<br></blockquote><div>Complaining about undefined symbols is the next step. It's already implemented in my branch: <a href="https://github.com/krasin/bitlink/commit/be222a2863a989666d4925e5344d0c84cac8e06b" target="_blank">https://github.com/krasin/bitlink/commit/be222a2863a989666d4925e5344d0c84cac8e06b</a></div>



<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Can you provide an example? What are your inputs. Are they IL or ELF?<br>
What are the outputs that you want? Are they IL or ELF?<br></blockquote><div>All the inputs and all the outputs are IL. Some IL inputs are just stubs which have only functions with empty bodies. </div><div>The output IL file is supposed to have all the symbols resolved, statically or dynamically (i.e. there's a stub that has that symbols defined).</div>



<div>In case of Emscripten, that's enough.</div><div>In our case (PNaCl), we also add metadata to the output IL file, so that it would be possible to track which shared libraries are actually needed.</div><div><br></div>

<div>As for "real life" example, we may want to consider a developer on Windows machine who wants to write a portable program (that will run inside NaCl) using libpng and glibc using PNaCl toolchain that would provide portable bitcode stubs for glibc and libpng port from naclports repositories (with link-time portable stubs as well). In this case, the developer wants to create a bitcode file that will be treated by PNaCl as executable (and would be translated to the target architecture before the actual run), linked dynamically with glibc and libpng. He may achieve this by using modified gold + modified gold plugin from the PNaCl toolchain (but Windows would prevent him from this path, see cygwin notes in my previous messages), or he can use the bitcode linker, I'm currently working on. In this case, the developer will know if all the symbols are resolved and will not have a dependency on gold linker.</div>
<div><br></div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> krasin<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br>