diff --git a/crt0/switch_crt0.s b/crt0/switch_crt0.s index e90897b6..826ccf45 100644 --- a/crt0/switch_crt0.s +++ b/crt0/switch_crt0.s @@ -3,8 +3,10 @@ _start: bl startup + .word 0 .ascii "HOMEBREW" +.org _start+0x80 startup: // get aslr base sub x28, x30, #4 diff --git a/tools/elf2nro.c b/tools/elf2nro.c index 0fa9ae74..f4e84ead 100644 --- a/tools/elf2nro.c +++ b/tools/elf2nro.c @@ -163,8 +163,7 @@ int main(int argc, char* argv[]) { fwrite(buf[i], nro_hdr.Segments[i].Size, 1, out); } - fseek(out, 0, SEEK_SET); - fwrite(&nro_start, sizeof(nro_start), 1, out); + fseek(out, sizeof(nro_start), SEEK_SET); fwrite(&nro_hdr, sizeof(nro_hdr), 1, out); return EXIT_SUCCESS;