[RuntimeDyld] Make sure we emit MachO __eh_frame and __gcc_except_tab sections,

even if there are no references to them in the code.

This allows exceptions thrown from JIT'd code to be caught by the JIT itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2015-04-15 03:39:22 +00:00
parent c0a57ae8ec
commit a01f355245
2 changed files with 23 additions and 11 deletions
@@ -31,6 +31,13 @@ insn3:
movl $0, %eax
retq
# Test processing of the __eh_frame section.
# rtdyld-check: *{8}(section_addr(test_x86-64.o, __eh_frame) + 0x20) = eh_frame_test - (section_addr(test_x86-64.o, __eh_frame) + 0x20)
eh_frame_test:
.cfi_startproc
retq
.cfi_endproc
.comm y,4,2
.section __DATA,__data