Andrey Belevantsev
2014-Jun-24 07:19 UTC
[LLVMdev] Linking/archiving bitcodes with module asm
Hello, I'm archiving a number of bitcode files via gold plugin based on LLVM 3.4. When I find a thumbv7 bitcode with a couple of module asms, I get a segfault in ARMAsmParser::parseDirectiveFnStart because getTargetStreamer returns NULL. Frankly, I don't see how this is supposed to work because as far as I understood LTOModule::addAsmGlobalSymbols only creates a RecordStreamer which is then attached to the MCTargetAsmParser, and no TargetStreamer is ever created. The places that explicitly call createAsmStreamer are only writing assembly as llvm-mc or cc1as. I've tried to follow that scheme in addAsmGlobalSymbols but failed. Any ideas? Andrey
Rafael Espíndola
2014-Aug-08 23:00 UTC
[LLVMdev] Linking/archiving bitcodes with module asm
I think this has been fixed on trunk, can you confirm? On 24 June 2014 03:19, Andrey Belevantsev <abel at ispras.ru> wrote:> Hello, > > I'm archiving a number of bitcode files via gold plugin based on LLVM 3.4. > When I find a thumbv7 bitcode with a couple of module asms, I get a segfault > in ARMAsmParser::parseDirectiveFnStart because getTargetStreamer returns > NULL. Frankly, I don't see how this is supposed to work because as far as I > understood LTOModule::addAsmGlobalSymbols only creates a RecordStreamer > which is then attached to the MCTargetAsmParser, and no TargetStreamer is > ever created. > > The places that explicitly call createAsmStreamer are only writing assembly > as llvm-mc or cc1as. I've tried to follow that scheme in > addAsmGlobalSymbols but failed. Any ideas? > > Andrey > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Andrey Belevantsev
2014-Aug-13 14:22 UTC
[LLVMdev] Linking/archiving bitcodes with module asm
Hi Rafael, On 09.08.2014 3:00, Rafael Espíndola wrote:> I think this has been fixed on trunk, can you confirm?I only have 3.4-based toolchain, so could you point me to the patches that fixed this? I could try backporting them and then checking. It's been some time ago, so I would need to dig up this example back. Yours, Andrey> > On 24 June 2014 03:19, Andrey Belevantsev <abel at ispras.ru> wrote: >> Hello, >> >> I'm archiving a number of bitcode files via gold plugin based on LLVM 3.4. >> When I find a thumbv7 bitcode with a couple of module asms, I get a segfault >> in ARMAsmParser::parseDirectiveFnStart because getTargetStreamer returns >> NULL. Frankly, I don't see how this is supposed to work because as far as I >> understood LTOModule::addAsmGlobalSymbols only creates a RecordStreamer >> which is then attached to the MCTargetAsmParser, and no TargetStreamer is >> ever created. >> >> The places that explicitly call createAsmStreamer are only writing assembly >> as llvm-mc or cc1as. I've tried to follow that scheme in >> addAsmGlobalSymbols but failed. Any ideas? >> >> Andrey >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev