From 7370d92da01ad07c649e3f988aaf55ee7585a803 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 12 Feb 2019 14:00:30 +0000 Subject: Remove oat_patches from the DWARF writer. We no longer use them. Test: test-art-host-gtest-dwarf_test Change-Id: Ie018d2314f028584edb398b6310a7284a0ec2069 --- compiler/linker/elf_builder.h | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'compiler/linker/elf_builder.h') diff --git a/compiler/linker/elf_builder.h b/compiler/linker/elf_builder.h index 54e07fcd46..33e1866c50 100644 --- a/compiler/linker/elf_builder.h +++ b/compiler/linker/elf_builder.h @@ -51,14 +51,10 @@ namespace linker { // .strtab - Names for .symtab. // .symtab - Debug symbols. // .debug_frame - Unwind information (CFI). -// .debug_frame.oat_patches - Addresses for relocation. // .debug_info - Debug information. -// .debug_info.oat_patches - Addresses for relocation. // .debug_abbrev - Decoding information for .debug_info. // .debug_str - Strings for .debug_info. // .debug_line - Line number tables. -// .debug_line.oat_patches - Addresses for relocation. -// .text.oat_patches - Addresses for relocation. // .shstrtab - Names of ELF sections. // Elf_Shdr[] - Section headers. // @@ -575,29 +571,6 @@ class ElfBuilder final { Section* GetDebugInfo() { return &debug_info_; } Section* GetDebugLine() { return &debug_line_; } - // Encode patch locations as LEB128 list of deltas between consecutive addresses. - // (exposed publicly for tests) - static void EncodeOatPatches(const ArrayRef& locations, - std::vector* buffer) { - buffer->reserve(buffer->size() + locations.size() * 2); // guess 2 bytes per ULEB128. - uintptr_t address = 0; // relative to start of section. - for (uintptr_t location : locations) { - DCHECK_GE(location, address) << "Patch locations are not in sorted order"; - EncodeUnsignedLeb128(buffer, dchecked_integral_cast(location - address)); - address = location; - } - } - - void WritePatches(const char* name, const ArrayRef& patch_locations) { - std::vector buffer; - EncodeOatPatches(patch_locations, &buffer); - std::unique_ptr
s(new Section(this, name, SHT_OAT_PATCH, 0, nullptr, 0, 1, 0)); - s->Start(); - s->WriteFully(buffer.data(), buffer.size()); - s->End(); - other_sections_.push_back(std::move(s)); - } - void WriteSection(const char* name, const std::vector* buffer) { std::unique_ptr
s(new Section(this, name, SHT_PROGBITS, 0, nullptr, 0, 1, 0)); s->Start(); -- cgit v1.2.3-59-g8ed1b