summaryrefslogtreecommitdiffstats
path: root/compiler/elf_writer_quick.cc
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-04-28 17:54:52 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-04-28 18:13:35 +0100
commit0c5bbc11a6af7b4f83b3929bc99de690635095c0 (patch)
tree4d72ed70efa866e94804e9a6fb210cad34a9abc4 /compiler/elf_writer_quick.cc
parent1c5808c0fa83155565f5319808a2949e0a3f5789 (diff)
downloadart-0c5bbc11a6af7b4f83b3929bc99de690635095c0.zip
art-0c5bbc11a6af7b4f83b3929bc99de690635095c0.tar.gz
art-0c5bbc11a6af7b4f83b3929bc99de690635095c0.tar.bz2
Minor refactoring of ElfBuilder.
* Nest section builder classes within the main builder class to reduce verbosity caused by templates. * Move .eh_frame and .eh_frame_hdr section headers earlier so that the section headers are sorted by file offset. * Do not emit PT_NULL header if .eh_frame_hdr is missing. None of these changes should have any material impact. This CL just prepares ground for the following CL. Change-Id: I56f9825892adb01d413a18ca10cb5c805cb8cd78
Diffstat (limited to 'compiler/elf_writer_quick.cc')
-rw-r--r--compiler/elf_writer_quick.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index 3b2ca94..9ff94e9 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -141,7 +141,7 @@ bool ElfWriterQuick<ElfTypes>::Write(
InstructionSet isa = compiler_driver_->GetInstructionSet();
int alignment = GetInstructionSetPointerSize(isa);
- typedef ElfRawSectionBuilder<ElfTypes> RawSection;
+ typedef typename ElfBuilder<ElfTypes>::ElfRawSectionBuilder RawSection;
RawSection eh_frame(".eh_frame", SHT_PROGBITS, SHF_ALLOC, nullptr, 0, alignment, 0);
RawSection eh_frame_hdr(".eh_frame_hdr", SHT_PROGBITS, SHF_ALLOC, nullptr, 0, 4, 0);
RawSection debug_info(".debug_info", SHT_PROGBITS, 0, nullptr, 0, 1, 0);
@@ -230,7 +230,7 @@ static void WriteDebugSymbols(ElfBuilder<ElfTypes>* builder, OatWriter* oat_writ
}
}
- ElfSymtabBuilder<ElfTypes>* symtab = builder->GetSymtabBuilder();
+ auto* symtab = builder->GetSymtabBuilder();
for (auto it = method_info.begin(); it != method_info.end(); ++it) {
std::string name = PrettyMethod(it->dex_method_index_, *it->dex_file_, true);
if (deduped_addresses.find(it->low_pc_) != deduped_addresses.end()) {