retdec
relocation.h
Go to the documentation of this file.
1 
7 #ifndef FILEINFO_FILE_INFORMATION_FILE_INFORMATION_TYPES_RELOCATION_TABLE_RELOCATION_H
8 #define FILEINFO_FILE_INFORMATION_FILE_INFORMATION_TYPES_RELOCATION_TABLE_RELOCATION_H
9 
10 #include <limits>
11 #include <string>
12 
13 namespace retdec {
14 namespace fileinfo {
15 
23 {
24  private:
25  std::string symbolName;
26  unsigned long long offset = std::numeric_limits<unsigned long long>::max();
27  unsigned long long symbolValue = std::numeric_limits<unsigned long long>::max();
28  unsigned long long relocationType = std::numeric_limits<unsigned long long>::max();
29  long long addend = std::numeric_limits<long long>::min();
30  long long calculatedValue = std::numeric_limits<long long>::min();
31  public:
34  std::string getSymbolName() const;
35  std::string getOffsetStr(std::ios_base &(* format)(std::ios_base &)) const;
36  std::string getSymbolValueStr() const;
37  std::string getRelocationTypeStr() const;
38  std::string getAddendStr() const;
39  std::string getCalculatedValueStr() const;
41 
44  void setSymbolName(std::string name);
45  void setOffset(unsigned long long value);
46  void setSymbolValue(unsigned long long value);
47  void setRelocationType(unsigned long long type);
48  void setAddend(long long value);
49  void setCalculatedValue(long long value);
51 };
52 
53 } // namespace fileinfo
54 } // namespace retdec
55 
56 #endif
Definition: relocation.h:23
unsigned long long relocationType
type of relocation
Definition: relocation.h:28
void setSymbolName(std::string name)
Definition: relocation.cpp:72
void setRelocationType(unsigned long long type)
Definition: relocation.cpp:99
void setOffset(unsigned long long value)
Definition: relocation.cpp:81
void setSymbolValue(unsigned long long value)
Definition: relocation.cpp:90
void setAddend(long long value)
Definition: relocation.cpp:108
long long addend
relocation addend
Definition: relocation.h:29
std::string getAddendStr() const
Definition: relocation.cpp:54
std::string getSymbolValueStr() const
Definition: relocation.cpp:36
unsigned long long symbolValue
value of associated symbol
Definition: relocation.h:27
std::string symbolName
name of associated symbol
Definition: relocation.h:25
unsigned long long offset
relocation offset
Definition: relocation.h:26
std::string getSymbolName() const
Definition: relocation.cpp:17
long long calculatedValue
calculated value of relocation
Definition: relocation.h:30
void setCalculatedValue(long long value)
Definition: relocation.cpp:117
std::string getOffsetStr(std::ios_base &(*format)(std::ios_base &)) const
Definition: relocation.cpp:27
std::string getCalculatedValueStr() const
Definition: relocation.cpp:63
std::string getRelocationTypeStr() const
Definition: relocation.cpp:45
Definition: archive_wrapper.h:19