blob: f865a85a8dcbbeee2921769dee8a5b272261e88c (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include "offsets.h"
OffsetCalculator::OffsetCalculator(const std::filesystem::path& asmOutputFile, const std::filesystem::path& cOutputFile, int baseOffset_)
: asmOutput(asmOutputFile), cOutput(cOutputFile), baseOffset(baseOffset_), lastEnd(0) {
}
void OffsetCalculator::addAsset(int start, const std::string& symbol) {
asmOutput << "\t.equiv offset_" << symbol << ", " << start - baseOffset << std::endl;
cOutput << "#define offset_" << symbol << " " << start - baseOffset << std::endl;
}
|