Add patchoat check that input oat file has patch section.
Do this check before opening the output file in case this could be
causing the file to become truncated.
Bug: 27723864
(cherry-picked from commit 99503b9805def2ed7d4fe4bf285c6fdd8ddce6ed)
Change-Id: I2134ec65fb6d9582f4eb4c2619a5ffb7b987eaa6
diff --git a/runtime/elf_file.h b/runtime/elf_file.h
index b5229b5..c3616f7 100644
--- a/runtime/elf_file.h
+++ b/runtime/elf_file.h
@@ -69,6 +69,8 @@
bool GetSectionOffsetAndSize(const char* section_name, uint64_t* offset, uint64_t* size) const;
+ bool HasSection(const std::string& name) const;
+
uint64_t FindSymbolAddress(unsigned section_type,
const std::string& symbol_name,
bool build_map);