Update linker.cpp

2.0
_xeroxz 4 years ago
parent cfdae6a465
commit fd23e65f16

@ -77,9 +77,9 @@ namespace lnk
while (reinterpret_cast<std::uint8_t*>(archive_headers) < lib_file.data() + lib_file.size()) while (reinterpret_cast<std::uint8_t*>(archive_headers) < lib_file.data() + lib_file.size())
{ {
// some absolutely fucked up shit I have to // im not doing alignment correctly, i cannot find
// do since the linker is off by 1 sometimes... // anything online about it either, this "works" for now, but it will probably not
// this sounds weird... I know it sounds weird... its weird... // on other linkers....
if (archive_headers->Name[0] == '\n') if (archive_headers->Name[0] == '\n')
archive_headers = reinterpret_cast<PIMAGE_ARCHIVE_MEMBER_HEADER>( archive_headers = reinterpret_cast<PIMAGE_ARCHIVE_MEMBER_HEADER>(
reinterpret_cast<std::uintptr_t>(archive_headers) + 1); reinterpret_cast<std::uintptr_t>(archive_headers) + 1);

Loading…
Cancel
Save