RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
omf.h
1#ifndef OMF_H
2#define OMF_H
3
4#include "../common.h"
5#include "../dumper/dumper.h"
6#include "../linker/format.h"
7#include "../linker/reader.h"
8#include "../linker/writer.h"
9
10/* TODO: unimplemented */
11
12/* Intel Object Module format (input only) */
13
14namespace OMF
15{
19 class OMFFormat : public virtual Linker::InputFormat
20 {
21 public:
22 void ReadFile(Linker::Reader& rd) override;
24 offset_t WriteFile(Linker::Writer& wr) const override;
25 void Dump(Dumper::Dumper& dump) const override;
27 void GenerateModule(Linker::Module& module) const override;
28 /* TODO */
29 };
30}
31
32#endif /* OMF_H */
An abstract interface that separates structure and presentation of the data inside a file.
Definition dumper.h:586
offset_t WriteFile(Writer &wr) const override=0
Stores data in memory to file.
A class that provides a general interface to loading a module.
Definition format.h:166
virtual void GenerateModule(ModuleCollector &linker, std::string file_name, bool is_library=false) const
Loads the information into a module object.
Definition format.cc:180
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, encapsulating functionality needed to export binary data.
Definition writer.h:15
Intel Relocatable Object Module format, used by various 16/32-bit DOS based compilers and linkers,...
Definition omf.h:20
void GenerateModule(Linker::Module &module) const override
Loads the information into a module object, a convenience method when there is a single module genera...
Definition omf.cc:31
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition omf.cc:8
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition omf.cc:13
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition omf.cc:20