diff options
-rw-r--r-- | compiler/elf_writer_debug.cc | 12 | ||||
-rw-r--r-- | compiler/elf_writer_quick.cc | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/compiler/elf_writer_debug.cc b/compiler/elf_writer_debug.cc index 28e6999472..e8c3b6e432 100644 --- a/compiler/elf_writer_debug.cc +++ b/compiler/elf_writer_debug.cc @@ -170,11 +170,13 @@ void WriteEhFrame(const CompilerDriver* compiler, size_t cie_offset = eh_frame->size(); WriteEhFrameCIE(isa, address_type, eh_frame); for (const OatWriter::DebugInfo& mi : method_infos) { - const SwapVector<uint8_t>* opcodes = mi.compiled_method_->GetCFIInfo(); - if (opcodes != nullptr) { - WriteEhFrameFDE(Is64BitInstructionSet(isa), cie_offset, - mi.low_pc_, mi.high_pc_ - mi.low_pc_, - opcodes, eh_frame, eh_frame_patches); + if (!mi.deduped_) { // Only one FDE per unique address. + const SwapVector<uint8_t>* opcodes = mi.compiled_method_->GetCFIInfo(); + if (opcodes != nullptr) { + WriteEhFrameFDE(Is64BitInstructionSet(isa), cie_offset, + mi.low_pc_, mi.high_pc_ - mi.low_pc_, + opcodes, eh_frame, eh_frame_patches); + } } } diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc index 178aa03955..60f4d0764f 100644 --- a/compiler/elf_writer_quick.cc +++ b/compiler/elf_writer_quick.cc @@ -202,6 +202,9 @@ static void WriteDebugSymbols(ElfBuilder<ElfTypes>* builder, OatWriter* oat_writ auto* symtab = builder->GetSymtab(); for (auto it = method_info.begin(); it != method_info.end(); ++it) { + if (it->deduped_) { + continue; // Add symbol only for the first instance. + } std::string name = PrettyMethod(it->dex_method_index_, *it->dex_file_, true); if (deduped_addresses.find(it->low_pc_) != deduped_addresses.end()) { name += " [DEDUPED]"; |