Hi, afaics in manuals the llvm-{link,ld} tools only can merge bitcode files into one bigger piece which looks like a static-linking from the c/c++ world. i'm wondering is it any possibility to link bitcode elements dynamically in the same way as e.g. c#/msil assemblies? static linking into one executable looks horrible - any change in library used in project forces relinking of everything. i've found a thread[*] in archive but it only describes a new linker tool without virtual machine support for loading bitcodes in runtime. so, is there any plans to develop so called dynamic bitcode linking or there's another solution for this problem? [*] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-December/046055.html BR, Paweł.
On Saturday 11 of February 2012 14:29:10 Paweł Sikora wrote:> Hi, > > afaics in manuals the llvm-{link,ld} tools only can merge bitcode files > into one bigger piece which looks like a static-linking from the c/c++ world. > i'm wondering is it any possibility to link bitcode elements dynamically > in the same way as e.g. c#/msil assemblies? static linking into one executable > looks horrible - any change in library used in project forces relinking of everything. > > i've found a thread[*] in archive but it only describes a new linker tool > without virtual machine support for loading bitcodes in runtime. > > so, is there any plans to develop so called dynamic bitcode linking > or there's another solution for this problem? > > [*] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-December/046055.html >i've changed a little the 'lli' to test loading of additional ${bitcode}.config file. this simple .config contains a list of bitcodes required by current bitcode. it seems to work in this trivial scenario but it would be great to store such list directly in bitcode file (creating in llvm-link / using in lli). is it any simple method to embbed such structure in bitcode file? some metadata? thanks for any hints. BR, Paweł. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120226/e000809f/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: lli-load_deps.patch Type: text/x-patch Size: 2018 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120226/e000809f/attachment.bin>
Hi Pawel, Bitcode contains a field for a list of dependent libraries ("deplibs", see Module::getLibraries()) which contains a list of needed libraries (similar to ELF DT_NEEDED). The PNaCl team at Google is working on getting bitcode to act like shared objects and dynamic executables. As far as I know, we're the only ones doing this at the moment. - pdox On Sun, Feb 26, 2012 at 5:23 AM, Paweł Sikora <pawel.sikora at agmk.net> wrote:> ** > > On Saturday 11 of February 2012 14:29:10 Paweł Sikora wrote: > > > Hi, > > > > > > afaics in manuals the llvm-{link,ld} tools only can merge bitcode files > > > into one bigger piece which looks like a static-linking from the c/c++ > world. > > > i'm wondering is it any possibility to link bitcode elements dynamically > > > in the same way as e.g. c#/msil assemblies? static linking into one > executable > > > looks horrible - any change in library used in project forces relinking > of everything. > > > > > > i've found a thread[*] in archive but it only describes a new linker tool > > > without virtual machine support for loading bitcodes in runtime. > > > > > > so, is there any plans to develop so called dynamic bitcode linking > > > or there's another solution for this problem? > > > > > > [*] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-December/046055.html > > > > > > > i've changed a little the 'lli' to test loading of additional > ${bitcode}.config file. > > this simple .config contains a list of bitcodes required by current > bitcode. > > it seems to work in this trivial scenario but it would be great to store > such list > > directly in bitcode file (creating in llvm-link / using in lli). > > > > is it any simple method to embbed such structure in bitcode file? some > metadata? > > > > thanks for any hints. > > > > BR, > > Paweł. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120226/0e8f8183/attachment.html>