From 6d8c8f0344a706df651567387ede683ab3ec1b5f Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Mon, 26 Oct 2015 10:57:09 +0000 Subject: Rewrite ElfBuilder to make streaming directly to file easier. The previous design required knowing all the sections and their sizes before even the first byte of the file was written. The new design allows sections to be written one by one without any knowledge of later sections. Furthermore, as soon as section is started, its virtual memory address is known, which removes the need for the various patching passes. The new ElfBuilder essentially tries to be a thin wrapper around OutputStream which keeps track where the various sections start/end and then writes their ELF headers. Change-Id: I817e7f3b41882e4e4b9b442cfe56e4ef2e26babd --- compiler/cfi_test.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/cfi_test.h') diff --git a/compiler/cfi_test.h b/compiler/cfi_test.h index 6fd457599f..508b04a16f 100644 --- a/compiler/cfi_test.h +++ b/compiler/cfi_test.h @@ -48,11 +48,11 @@ class CFITest : public dwarf::DwarfTest { // Pretty-print CFI opcodes. constexpr bool is64bit = false; dwarf::DebugFrameOpCodeWriter<> initial_opcodes; - dwarf::WriteDebugFrameCIE(is64bit, dwarf::DW_EH_PE_absptr, dwarf::Reg(8), - initial_opcodes, kCFIFormat, &debug_frame_data_); + dwarf::WriteCIE(is64bit, dwarf::Reg(8), + initial_opcodes, kCFIFormat, &debug_frame_data_); std::vector debug_frame_patches; - dwarf::WriteDebugFrameFDE(is64bit, 0, 0, actual_asm.size(), ArrayRef(actual_cfi), - kCFIFormat, &debug_frame_data_, &debug_frame_patches); + dwarf::WriteFDE(is64bit, 0, 0, 0, actual_asm.size(), ArrayRef(actual_cfi), + kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches); ReformatCfi(Objdump(false, "-W"), &lines); // Pretty-print assembly. auto* opts = new DisassemblerOptions(false, actual_asm.data(), true); -- cgit v1.2.3-59-g8ed1b