Paul Melis
2009-Dec-02 09:15 UTC
[LLVMdev] Troubles with llvm.gcroot and exception handling
[Forgot to include llvmdev in my reply, sending a second time] Hi Duncan, Duncan Sands wrote:>> 22:40|melis at juggle2:~/projects/llvm_gc> llc root.ll >> 22:40|melis at juggle2:~/projects/llvm_gc> gcc -o r root.s >> /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: >> error in /tmp/ccGhPZDb.o(.eh_frame); no .eh_frame_hdr table will be >> created. > > the assembler you pasted assembles for me on x86-32 linux.Ah, sorry for not being clear. The piece of assembler shown was for the case where the gcroot call was removed and no exception handling code was generated. I should have included the assembly for root.ll as shown.>> I'm actually puzzled that exception handling code is generated, and more >> so that it is caused by the llvm.gcroot call. If I comment that one out >> all no exception handling stuff is created: > > The EscapeEnumerator code in ShadowStackGC.cpp adds cleanup code using > invoke and unwind - might be related to this?Okay, so that's probably where the EH stuff comes from. Does the assembler error indicate a bug or is there something else I need to do (like using a gcc flag, or perhaps using ld instead of gcc) to generate an executable? Paul