5#include "../dumper/dumper.h"
6#include "../linker/module.h"
7#include "../linker/segment.h"
8#include "../linker/segment_manager.h"
9#include "../linker/writer.h"
27 load_mode_type load_mode = MODE_NORMAL;
28 uint32_t entry_address = 0;
29 bool option_no_relocation =
false;
31 uint32_t base_address = 0;
32 uint32_t code_size = 0;
33 uint32_t data_size = 0;
34 uint32_t bss_size = 0;
35 uint32_t symbol_table_size = 0;
36 uint32_t debug_line_number_table_size = 0;
37 uint32_t debug_symbol_table_size = 0;
38 uint32_t debug_string_table_size = 0;
39 uint32_t bound_module_list_offset = 0;
45 bool absolute_displacement =
false;
46 uint32_t displacement = 0;
50 std::shared_ptr<Linker::Image> code, data, bss;
51 uint32_t relocation_size = 0;
52 std::map<uint32_t, uint8_t> relocations;
53 std::vector<Relocation> relocation_sequence;
55 std::shared_ptr<Linker::Segment> GetCodeSegment();
56 std::shared_ptr<const Linker::Segment> GetCodeSegment()
const;
57 std::shared_ptr<Linker::Segment> GetDataSegment();
58 std::shared_ptr<const Linker::Segment> GetDataSegment()
const;
59 std::shared_ptr<Linker::Segment> GetBssSegment();
60 std::shared_ptr<const Linker::Segment> GetBssSegment()
const;
62 static std::vector<Linker::OptionDescription<void> *> ParameterNames;
65 void OnNewSegment(std::shared_ptr<Linker::Segment> segment)
override;
67 void CreateDefaultSegments();
An abstract interface that separates structure and presentation of the data inside a file.
Definition dumper.h:773
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:20
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