mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
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:
@ -752,9 +752,13 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
|||||||
|
|
||||||
streamer.EmitLabel(fdeStart);
|
streamer.EmitLabel(fdeStart);
|
||||||
// CIE Pointer
|
// CIE Pointer
|
||||||
const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
|
if (IsEH) {
|
||||||
0);
|
const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
|
||||||
streamer.EmitAbsValue(offset, 4);
|
0);
|
||||||
|
streamer.EmitAbsValue(offset, 4);
|
||||||
|
} else {
|
||||||
|
streamer.EmitSymbolValue(&cieStart, 4);
|
||||||
|
}
|
||||||
unsigned fdeEncoding = asmInfo.getFDEEncoding(UsingCFI);
|
unsigned fdeEncoding = asmInfo.getFDEEncoding(UsingCFI);
|
||||||
unsigned size = getSizeForEncoding(streamer, fdeEncoding);
|
unsigned size = getSizeForEncoding(streamer, fdeEncoding);
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
|
||||||
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
|
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
|
||||||
|
|
||||||
|
|
||||||
// The only difference in gas' output in this test is that we don't produce
|
|
||||||
// the relocations to .debug_frame (we know their values).
|
|
||||||
|
|
||||||
.cfi_sections .debug_frame
|
.cfi_sections .debug_frame
|
||||||
|
|
||||||
f1:
|
f1:
|
||||||
@ -27,7 +23,7 @@ f2:
|
|||||||
// ELF_64-NEXT: ('sh_info', 0x00000000)
|
// ELF_64-NEXT: ('sh_info', 0x00000000)
|
||||||
// ELF_64-NEXT: ('sh_addralign', 0x00000008)
|
// ELF_64-NEXT: ('sh_addralign', 0x00000008)
|
||||||
// ELF_64-NEXT: ('sh_entsize', 0x00000000)
|
// ELF_64-NEXT: ('sh_entsize', 0x00000000)
|
||||||
// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 1c000000 00000000 00000000 01000000 00000000 14000000 34000000 00000000 00000000 01000000 00000000')
|
// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 00000000 00000000 00000000 01000000 00000000 14000000 00000000 00000000 00000000 01000000 00000000')
|
||||||
|
|
||||||
// ELF_32: (('sh_name', 0x00000010) # '.debug_frame'
|
// ELF_32: (('sh_name', 0x00000010) # '.debug_frame'
|
||||||
// ELF_32-NEXT: ('sh_type', 0x00000001)
|
// ELF_32-NEXT: ('sh_type', 0x00000001)
|
||||||
@ -39,4 +35,4 @@ f2:
|
|||||||
// ELF_32-NEXT: ('sh_info', 0x00000000)
|
// ELF_32-NEXT: ('sh_info', 0x00000000)
|
||||||
// ELF_32-NEXT: ('sh_addralign', 0x00000004)
|
// ELF_32-NEXT: ('sh_addralign', 0x00000004)
|
||||||
// ELF_32-NEXT: ('sh_entsize', 0x00000000)
|
// ELF_32-NEXT: ('sh_entsize', 0x00000000)
|
||||||
// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 18000000 00000000 01000000 0c000000 28000000 01000000 01000000')
|
// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 00000000 00000000 01000000 0c000000 00000000 01000000 01000000')
|
||||||
|
Reference in New Issue
Block a user