Russell Wallace
2015-Feb-10 11:05 UTC
[LLVMdev] llvm-link failing depending on order of files
I need to link several llvm object files (.bc) into a single such file (.ll or .bc). As I understand it, the tool for doing this is llvm-link. However, it seems to be failing in some cases depending on the order of files presented to it. The simplest test case involves a pair of files. blank.cpp contains nothing. main.cpp contains: #include <llvm/Support/raw_ostream.h> and may or may not contain a main function that just returns 0; it makes no difference to the results. (The include directive is, however, required in order to generate the error.) llvm-link main.bc blank.bc works. llvm-link blank.bc main.bc generates a linked object file that on attempting to convert to an executable, gives the following error message: a1.ll:30:1: error: unknown selection kind $"\01??_7_Iostream_error_category at std@@6B@" = comdat ^ 1 error generated. (A slightly more complex test case gives a different error message at earlier link time.) Anyone have any idea about the cause of this and how to avoid it? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150210/b518bce3/attachment.html>
Rafael EspĂndola
2015-Feb-11 02:08 UTC
[LLVMdev] llvm-link failing depending on order of files
That is strange. Can you put the .ll files in a bug report? On Feb 10, 2015 6:08 AM, "Russell Wallace" <russell.wallace at gmail.com> wrote:> I need to link several llvm object files (.bc) into a single such file > (.ll or .bc). As I understand it, the tool for doing this is llvm-link. > However, it seems to be failing in some cases depending on the order of > files presented to it. > > The simplest test case involves a pair of files. > > blank.cpp contains nothing. > > main.cpp contains: > #include <llvm/Support/raw_ostream.h> > and may or may not contain a main function that just returns 0; it makes > no difference to the results. (The include directive is, however, required > in order to generate the error.) > > llvm-link main.bc blank.bc works. > > llvm-link blank.bc main.bc generates a linked object file that on > attempting to convert to an executable, gives the following error message: > > a1.ll:30:1: error: unknown selection kind > $"\01??_7_Iostream_error_category at std@@6B@" = comdat > ^ > 1 error generated. > > (A slightly more complex test case gives a different error message at > earlier link time.) > > Anyone have any idea about the cause of this and how to avoid it? > > _______________________________________________ > 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/20150210/7abaa960/attachment.html>
Russell Wallace
2015-Feb-11 13:30 UTC
[LLVMdev] llvm-link failing depending on order of files
Done. http://llvm.org/bugs/show_bug.cgi?id=22544 On Wed, Feb 11, 2015 at 2:08 AM, Rafael EspĂndola < rafael.espindola at gmail.com> wrote:> That is strange. Can you put the .ll files in a bug report? > On Feb 10, 2015 6:08 AM, "Russell Wallace" <russell.wallace at gmail.com> > wrote: > >> I need to link several llvm object files (.bc) into a single such file >> (.ll or .bc). As I understand it, the tool for doing this is llvm-link. >> However, it seems to be failing in some cases depending on the order of >> files presented to it. >> >> The simplest test case involves a pair of files. >> >> blank.cpp contains nothing. >> >> main.cpp contains: >> #include <llvm/Support/raw_ostream.h> >> and may or may not contain a main function that just returns 0; it makes >> no difference to the results. (The include directive is, however, required >> in order to generate the error.) >> >> llvm-link main.bc blank.bc works. >> >> llvm-link blank.bc main.bc generates a linked object file that on >> attempting to convert to an executable, gives the following error message: >> >> a1.ll:30:1: error: unknown selection kind >> $"\01??_7_Iostream_error_category at std@@6B@" = comdat >> ^ >> 1 error generated. >> >> (A slightly more complex test case gives a different error message at >> earlier link time.) >> >> Anyone have any idea about the cause of this and how to avoid it? >> >> _______________________________________________ >> 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/20150211/634be2e0/attachment.html>