8#include "../linker/module.h"
9#include "../linker/segment.h"
10#include "../linker/segment_manager.h"
11#include "../linker/writer.h"
12#include "../dumper/dumper.h"
14namespace DigitalResearch
103 std::shared_ptr<Linker::Image>
code =
nullptr;
107 std::shared_ptr<Linker::Image>
data =
nullptr;
120 operator size_t()
const;
167 void Clear()
override;
182 template <
typename SizeType>
183 static offset_t CDOS68K_MeasureRelocations(std::map<uint32_t, SizeType>
relocations)
187 offset_t last_relocation = 0;
190 offset_t difference = it.first - last_relocation;
191 if(difference != 0 && difference <= 0x7C)
195 else if(difference < 0x100)
199 else if(difference < 0x10000)
211 template <
typename SizeType>
215 offset_t last_relocation = 0;
218 offset_t difference = it.first - last_relocation;
219 uint8_t highbit = it.second == 2 ? 0x80 : 0x00;
220 if(difference != 0 && difference <= 0x7C)
224 else if(difference < 0x100)
229 else if(difference < 0x10000)
242 offset_t MeasureRelocations()
const;
271 unsigned FormatAdditionalSectionFlags(std::string section_name)
const override;
273 void SetOptions(std::map<std::string, std::string>& options)
override;
275 void OnNewSegment(std::shared_ptr<Linker::Segment> segment)
override;
277 void CreateDefaultSegments();
An abstract interface that separates structure and presentation of the data inside a file.
Definition dumper.h:586
Encodes an object module file as a collection of sections, symbols and relocations.
Definition module.h:24
A helper class, encapsulating functionality needed to import binary data.
Definition reader.h:16
A helper class to collect sections into segments.
Definition segment_manager.h:32
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15
void WriteWord(size_t bytes, uint64_t value, EndianType endiantype)
Read a word.
Definition writer.cc:66