Filer
ElfSizeCalculator.h
Go to the documentation of this file.
1 #ifndef ELFSIZECALCULATOR_H
2 #define ELFSIZECALCULATOR_H
3 
4 #include <QString>
5 #include <elf.h>
6 
16 {
17 public:
23  static qint64 calculateElfSize(const QString& filePath);
24 
25 private:
33  static qint64 CalculateElfSizeInternal(const QString& filePath);
34 
40  static bool IsElfHeaderMagicValid(const Elf64_Ehdr& header);
41 
48  static qint64 CalculateElfSize64(const Elf64_Ehdr& header, qint64 fileSize);
49 
56  static qint64 CalculateElfSize32(const Elf64_Ehdr& header, qint64 fileSize);
57 
63  static void PrintError(const QString& context, const QString& error);
64 };
65 
66 #endif // ELFSIZECALCULATOR_H
Definition: ElfSizeCalculator.h:16
static qint64 calculateElfSize(const QString &filePath)
Calculate the ELF size for the given file path.
Definition: ElfSizeCalculator.cpp:6