diff --git a/ndless-sdk/tools/zehn_loader/loader.cpp b/ndless-sdk/tools/zehn_loader/loader.cpp index cab4ce7..a87bef6 100644 --- a/ndless-sdk/tools/zehn_loader/loader.cpp +++ b/ndless-sdk/tools/zehn_loader/loader.cpp @@ -72,9 +72,9 @@ int main(int argc, char **argv) old_storage = reinterpret_cast(header); syscall(mallocd, old_storage, header->file_size); - header = reinterpret_cast(mallocd); + header = reinterpret_cast(__builtin_assume_aligned(mallocd, 4)); } - + const Zehn_reloc *reloc_table = reinterpret_cast(reinterpret_cast(header) + sizeof(Zehn_header)); //This loader doesn't parse the flag table const uint8_t *flag_table = reinterpret_cast(reloc_table) + sizeof(Zehn_reloc) * header->reloc_count;