[ld.so] Properly handle stack alignment in ld.so args

Now when loading a process, init will push all the loader args, align
the stack so that the next pointer will have correct alignment, then
push a pointer to the loader args.

Also:
* _ldso_start will pop all loader args off of the stack before jumping
  to the loaded program's entrypoint, as if it had never run.
* The sentinel arg structures have a size instead of being all zeros, so
  that they can be popped off properly when done.
This commit is contained in:
Justin C. Miller
2024-02-20 19:42:12 -08:00
parent e17119254b
commit 9f8e75f680
3 changed files with 28 additions and 5 deletions

View File

@@ -43,7 +43,6 @@ struct j6_arg_loader
uintptr_t *got;
uintptr_t entrypoint;
uintptr_t start_addr;
uintptr_t other;
};
struct j6_arg_driver