selfpatch-slr/finalize/finalize.cpp

31 lines
906 B
C++

#include <iostream>
/*
<sourcefile>.spslr:
SPSLR_FINALIZE_HEADER <CU filename> <CU uid symbol>
target <name> <local uid> <size> <field count>
f <offset> <size> <flags>
f <offset> <size> <flags>
...
ipin <label> <target uid> <field offset>
ipin <label> <target uid> <field offset>
ipin <label> <target uid> <field offset>
...
dpin <symbol> <offset> <level> <target uid>
dpin <symbol> <offset> <level> <target uid>
...
Datapins for same var/symbol are randomized in order of their level, from bottom of nest to top
The CU uid symbol helps differentiating between e.g. "file.c" and "sub/file.c" (symbtab has no idea)
Between CUs, types with the same name HAVE TO HAVE the same layout -> randomized together
To begin with, anonymous types are not allowed for randomization (later solved with hash(type) instead of name)!
*/
int main(int argc, char** argv) {
std::cout << "Hello World!" << std::endl;
}