• Home
  • Raw
  • Download

Lines Matching refs:ElfStatus

49 std::ostream& operator<<(std::ostream& os, const ElfStatus& status) {  in operator <<()
51 case ElfStatus::NO_ERROR: in operator <<()
54 case ElfStatus::FILE_NOT_FOUND: in operator <<()
57 case ElfStatus::READ_FAILED: in operator <<()
60 case ElfStatus::FILE_MALFORMED: in operator <<()
63 case ElfStatus::NO_SYMBOL_TABLE: in operator <<()
66 case ElfStatus::NO_BUILD_ID: in operator <<()
69 case ElfStatus::BUILD_ID_MISMATCH: in operator <<()
72 case ElfStatus::SECTION_NOT_FOUND: in operator <<()
84 ElfStatus IsValidElfFile(int fd, uint64_t file_offset) { in IsValidElfFile()
87 return ElfStatus::READ_FAILED; in IsValidElfFile()
89 return IsValidElfFileMagic(buf, 4) ? ElfStatus::NO_ERROR : ElfStatus::FILE_MALFORMED; in IsValidElfFile()
122 ElfStatus GetBuildIdFromNoteFile(const std::string& filename, BuildId* build_id) { in GetBuildIdFromNoteFile()
125 return ElfStatus::READ_FAILED; in GetBuildIdFromNoteFile()
128 return ElfStatus::NO_BUILD_ID; in GetBuildIdFromNoteFile()
130 return ElfStatus::NO_ERROR; in GetBuildIdFromNoteFile()
149 static ElfStatus OpenObjectFile(const std::string& filename, uint64_t file_offset, in OpenObjectFile()
152 return ElfStatus::FILE_NOT_FOUND; in OpenObjectFile()
156 return ElfStatus::READ_FAILED; in OpenObjectFile()
161 return ElfStatus::READ_FAILED; in OpenObjectFile()
164 ElfStatus status = IsValidElfFile(fd, file_offset); in OpenObjectFile()
165 if (status != ElfStatus::NO_ERROR) { in OpenObjectFile()
170 return ElfStatus::READ_FAILED; in OpenObjectFile()
174 return ElfStatus::READ_FAILED; in OpenObjectFile()
180 return ElfStatus::FILE_MALFORMED; in OpenObjectFile()
182 return ElfStatus::NO_ERROR; in OpenObjectFile()
185 static ElfStatus OpenObjectFileInMemory(const char* data, size_t size, BinaryWrapper* wrapper) { in OpenObjectFileInMemory()
189 return ElfStatus::FILE_MALFORMED; in OpenObjectFileInMemory()
195 return ElfStatus::FILE_MALFORMED; in OpenObjectFileInMemory()
197 return ElfStatus::NO_ERROR; in OpenObjectFileInMemory()
358 ElfStatus GetBuildId(BuildId* build_id) override { in GetBuildId()
366 return ElfStatus::READ_FAILED; in GetBuildId()
369 return ElfStatus::NO_BUILD_ID; in GetBuildId()
372 return ElfStatus::NO_ERROR; in GetBuildId()
376 return ElfStatus::NO_BUILD_ID; in GetBuildId()
379 ElfStatus ParseSymbols(const ParseSymbolCallback& callback) override { in ParseSymbols()
391 return ElfStatus::NO_ERROR; in ParseSymbols()
398 ElfStatus result = ReadSection(".gnu_debugdata", &debugdata); in ParseSymbols()
399 if (result == ElfStatus::SECTION_NOT_FOUND) { in ParseSymbols()
400 return ElfStatus::NO_SYMBOL_TABLE; in ParseSymbols()
401 } else if (result == ElfStatus::NO_ERROR) { in ParseSymbols()
421 ElfStatus ReadSection(const std::string& section_name, std::string* content) override { in ReadSection()
431 return ElfStatus::READ_FAILED; in ReadSection()
434 return ElfStatus::NO_ERROR; in ReadSection()
436 return ElfStatus::SECTION_NOT_FOUND; in ReadSection()
476 std::unique_ptr<ElfFile> CreateElfFileImpl(BinaryWrapper&& wrapper, ElfStatus* status) { in CreateElfFileImpl()
485 *status = ElfStatus::FILE_MALFORMED; in CreateElfFileImpl()
492 ElfStatus status; in Open()
501 const BuildId* expected_build_id, ElfStatus* status) { in Open()
507 *status = ElfStatus::FILE_NOT_FOUND; in Open()
518 *status = ElfStatus::FILE_NOT_FOUND; in Open()
526 if (*status != ElfStatus::NO_ERROR) { in Open()
533 if (*status != ElfStatus::NO_ERROR) { in Open()
537 *status = ElfStatus::BUILD_ID_MISMATCH; in Open()
544 std::unique_ptr<ElfFile> ElfFile::Open(const char* data, size_t size, ElfStatus* status) { in Open()
547 if (*status != ElfStatus::NO_ERROR) { in Open()