2024-09-21 16:59:55 +03:00
|
|
|
#include "pch.h"
|
2024-09-21 21:47:34 +03:00
|
|
|
#include "test_recompiler.h"
|
2024-09-15 22:04:40 +03:00
|
|
|
|
2024-09-18 15:19:20 +03:00
|
|
|
int main(int argc, char* argv[])
|
2024-09-07 18:00:09 +06:00
|
|
|
{
|
2024-10-01 00:09:18 +03:00
|
|
|
const char* path =
|
|
|
|
#ifdef CONFIG_FILE_PATH
|
|
|
|
CONFIG_FILE_PATH
|
|
|
|
#else
|
|
|
|
argv[1]
|
|
|
|
#endif
|
|
|
|
;
|
|
|
|
|
|
|
|
if (std::filesystem::is_regular_file(path))
|
2024-09-21 21:47:34 +03:00
|
|
|
{
|
2024-10-01 00:09:18 +03:00
|
|
|
Recompiler recompiler;
|
|
|
|
recompiler.LoadConfig(path);
|
2024-09-21 21:47:34 +03:00
|
|
|
recompiler.Analyse();
|
|
|
|
|
2024-09-28 22:44:27 +06:00
|
|
|
auto entry = recompiler.image.symbols.find(recompiler.image.entry_point);
|
|
|
|
if (entry != recompiler.image.symbols.end())
|
|
|
|
{
|
|
|
|
entry->name = "_xstart";
|
|
|
|
}
|
|
|
|
|
2024-10-01 00:09:18 +03:00
|
|
|
recompiler.Recompile();
|
2024-09-21 21:47:34 +03:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-10-01 00:09:18 +03:00
|
|
|
TestRecompiler::RecompileTests(path, argv[2]);
|
2024-09-21 21:47:34 +03:00
|
|
|
}
|
2024-09-09 23:23:04 +06:00
|
|
|
|
2024-09-07 18:21:08 +06:00
|
|
|
return 0;
|
|
|
|
}
|