In a debug_frame the cfi offset is to the start of the debug_frame section!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-05-10 15:20:23 +00:00
parent f2453a3f2f
commit 0d450dc659
2 changed files with 9 additions and 9 deletions

View File

@ -752,9 +752,13 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
streamer.EmitLabel(fdeStart);
// CIE Pointer
const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
0);
streamer.EmitAbsValue(offset, 4);
if (IsEH) {
const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
0);
streamer.EmitAbsValue(offset, 4);
} else {
streamer.EmitSymbolValue(&cieStart, 4);
}
unsigned fdeEncoding = asmInfo.getFDEEncoding(UsingCFI);
unsigned size = getSizeForEncoding(streamer, fdeEncoding);