12typedef uint64_t offset_t;
13typedef int64_t relative_offset_t;
14typedef size_t number_t;
25extern EndianType DefaultEndianType;
30size_t GetOffset(EndianType endiantype,
size_t bytes,
size_t index);
35offset_t AlignTo(offset_t value, offset_t align);
40uint16_t Swap16(uint16_t value);
45uint16_t FromLittleEndian16(uint16_t value);
50uint16_t FromBigEndian16(uint16_t value);
55uint32_t Swap32(uint32_t value);
60uint32_t Swap32words(uint32_t value);
65uint32_t FromLittleEndian32(uint32_t value);
70uint32_t FromBigEndian32(uint32_t value);
75uint32_t FromPDP11Endian32(uint32_t value);
80uint64_t Swap64(uint64_t value);
85uint64_t Swap64words(uint64_t value);
90uint64_t FromLittleEndian64(uint64_t value);
92uint64_t FromBigEndian64(uint64_t value);
94uint64_t FromPDP11Endian64(uint64_t value);
99uint64_t ReadUnsigned(
size_t bytes,
size_t maximum, uint8_t
const * data, EndianType endiantype);
104int64_t SignExtend(
size_t bytes, int64_t value);
109int64_t ReadSigned(
size_t bytes,
size_t maximum, uint8_t
const * data, EndianType endiantype);
114void WriteWord(
size_t bytes,
size_t maximum, uint8_t * data, uint64_t value, EndianType endiantype);
116bool LookupOption(std::map<std::string, std::string>& options, std::string key, std::string& value);
124 Exception(std::string message) : message(message)
130 extern std::ostream Debug;
131 extern std::ostream Warning;
132 extern std::ostream Error;
134 [[noreturn]]
void FatalError(std::string message);
138 typedef std::map<std::shared_ptr<Section>,
Location> Displacement;
Represents a single offset within a section, or an absolute location in memory if the section is null...
Definition location.h:17
A representation of a value within some binary data that has to be fixed up once the exact position o...
Definition relocation.h:27
A section of data as read from an object file.
Definition section.h:25
A class representing a sequence of sections that must be written to the output file as a group.
Definition segment.h:26
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15