6#include "../dumper/dumper.h"
7#include "../linker/module_collector.h"
8#include "../linker/options.h"
9#include "../linker/reader.h"
10#include "../linker/segment.h"
11#include "../linker/segment_manager.h"
12#include "../linker/writer.h"
26 ::EndianType endian_type = ::UndefinedEndian;
27 uint32_t format_version = 4;
29 uint32_t data_offset = 0;
30 uint32_t bss_offset = 0;
31 uint32_t bss_end_offset = 0;
32 uint32_t stack_size = 0;
33 uint32_t relocation_offset = 0;
35 std::shared_ptr<Linker::Image> code, data;
53 std::vector<Relocation> relocations;
55 static constexpr uint32_t FLAG_RAM = 0x0001;
56 static constexpr uint32_t FLAG_GOTPIC = 0x0002;
57 static constexpr uint32_t FLAG_GZIP = 0x0004;
60 : format_version(format_version)
64 void Clear()
override;
90 InitializeFields(ram, got);
94 std::shared_ptr<Linker::Segment> bss, stack;
95 std::shared_ptr<Linker::GlobalOffsetTable> got;
97 std::shared_ptr<Linker::OptionCollector>
GetOptions()
override;
99 void SetOptions(std::map<std::string, std::string>& options)
override;
101 void OnNewSegment(std::shared_ptr<Linker::Segment> segment)
override;
103 void CreateDefaultSegments();
105 void SetLinkScript(std::string script_file, std::map<std::string, std::string>& options)
override;
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