diff options
| author | 2014-10-30 18:36:14 +0000 | |
|---|---|---|
| committer | 2014-10-30 18:36:15 +0000 | |
| commit | a8825e4b38ae01fa77d255ca423ab2f2b77c6097 (patch) | |
| tree | 7b30d5655f6dc8132c036c8a69137c66e6da63c2 /compiler | |
| parent | 263f20b7a04b33f0e4b8f43b9a69ee9a1ddba564 (diff) | |
| parent | f9734550c1453f173150b12efc72b10ebf67878d (diff) | |
Merge "ARM: Generate $t mapping symbol to indicate thumb2 code"
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/elf_writer_quick.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc index c75d8f877d..575886b8e0 100644 --- a/compiler/elf_writer_quick.cc +++ b/compiler/elf_writer_quick.cc @@ -686,6 +686,13 @@ static void WriteDebugSymbols(const CompilerDriver* compiler_driver, symtab->AddSymbol(it->method_name_, &builder->GetTextBuilder(), it->low_pc_, true, it->high_pc_ - it->low_pc_, STB_GLOBAL, STT_FUNC); + // Conforming to aaelf, add $t mapping symbol to indicate start of a sequence of thumb2 + // instructions, so that disassembler tools can correctly disassemble. + if (it->compiled_method_->GetInstructionSet() == kThumb2) { + symtab->AddSymbol("$t", &builder->GetTextBuilder(), it->low_pc_ & ~1, true, + 0, STB_LOCAL, STT_NOTYPE); + } + // Include CFI for compiled method, if possible. if (cfi_info.get() != nullptr) { DCHECK(it->compiled_method_ != nullptr); |