title: llvm exception handling failing when built to object and linked
body: <p>I have some exception handling which works fine using the JIT. Now I am
  producing object files and linking them, but the exception handling
  tables seem to be missing. I call <code>_Unwind_RaiseException</code> and get
  <code>_URC_END_OF_STACK</code> as a result.</p>
  
  <p>I produce my object file using <code>TargetMachine::addPassesToEmitFile</code> and
  then I link my resulting files with:</p>
  
  <pre><code>gcc -Wl,--eh-frame-hdr -o prog input.o
  </code></pre>
  
  <p>I'm sure I'm just missing some option to generate the Dwarf tables, but
  I can't figure out what it is. For the JIT version I set
  <code>JITExceptionHandling</code> and <code>JITEmitDebugInfo</code> on <code>TargetOptions</code>.</p>
  
  <p>To check each step I also emitted an LL (LLVM-IR) file. I verified this has the landingpad/invoke intructiosn. I then use the <code>llc</code> tool and then GCC to link. This combination also doesn't produce the desired results.</p>
  
  <p>Which option(s) am I missing to do this correctly?</p>