8#include "../linker/module.h"
9#include "../linker/options.h"
10#include "../linker/segment.h"
11#include "../linker/segment_manager.h"
12#include "../linker/writer.h"
13#include "../dumper/dumper.h"
15namespace DigitalResearch
104 std::shared_ptr<Linker::Image>
code =
nullptr;
108 std::shared_ptr<Linker::Image>
data =
nullptr;
121 operator size_t()
const;
168 void Clear()
override;
183 template <
typename SizeType>
184 static offset_t CDOS68K_MeasureRelocations(std::map<uint32_t, SizeType>
relocations)
188 offset_t last_relocation = 0;
191 offset_t difference = it.first - last_relocation;
192 if(difference != 0 && difference <= 0x7C)
196 else if(difference < 0x100)
200 else if(difference < 0x10000)
212 template <
typename SizeType>
216 offset_t last_relocation = 0;
219 offset_t difference = it.first - last_relocation;
220 uint8_t highbit = it.second == 2 ? 0x80 : 0x00;
221 if(difference != 0 && difference <= 0x7C)
225 else if(difference < 0x100)
230 else if(difference < 0x10000)
243 offset_t MeasureRelocations()
const;
264 InitializeFields(noreloc, reloc);
284 unsigned FormatAdditionalSectionFlags(std::string section_name)
const override;
286 static std::vector<Linker::OptionDescription<void> *> ParameterNames;
289 std::shared_ptr<Linker::OptionCollector>
GetOptions()
override;
291 void SetOptions(std::map<std::string, std::string>& options)
override;
293 void OnNewSegment(std::shared_ptr<Linker::Segment> segment)
override;
295 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
Helper class that contains the options interpreted by the format.
Definition options.h:308
Documents and handles command line options.
Definition options.h:196
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