[LLVMdev] LLVM creates unterminated ELF .eh_frame sections

Yuri yuri at rawbw.com
Tue Apr 30 16:06:42 PDT 2013


On 04/30/2013 11:53, Rafael EspĂ­ndola wrote:
> Are you trying MCJIT?:-)

No.


>
> I first tried to compensate for that in MCJIT by adding those 4 bytes.
> That works for Linux, but not for OS X where __register_frame takes a
> single FDE at a time. I have an incomplete wip patch if you are
> interested.

On BSD __register_frame also takes a single argument and therefore needs 
terminating zero.
I also have a simple patch for this: adding Streamer.EmitIntValue(0, 4); 
at the end of MCDwarfFrameEmitter::Emit in lib/MC/MCDwarf.cpp fixed the 
issue for me.

Somebody needs to check this or similar in.

Yuri



More information about the llvm-dev mailing list