This is an archive of the discontinued LLVM Phabricator instance.

Implement basic loader for Linux aarch64
ClosedPublic

Authored by jeffbailey on Feb 12 2022, 11:06 AM.

Details

Summary

This implements a basic arm64 loader for Linux, and all the currently
enabled linker tests pass. TLS is not implemented, and functions
using it will have undefined behaviour. Notably, the TLS test is
currently disabled on x86_64.

Much of the structure is copied from x86_64 to allow for a refactoring
of the start code between architectures.

Tested:
ninja libc_loader_tests on aarch64-linux.

Co-authored-by: Raman Tenneti <rtenneti@google.com>

Diff Detail

Event Timeline

jeffbailey created this revision.Feb 12 2022, 11:06 AM
jeffbailey requested review of this revision.Feb 12 2022, 11:06 AM

Fix pasto in header.

Sorry for the bad push, still learning arcanist =(

This should restore the whole patch.

You are mixing aarch64 and ARM64. I always associate ARM64 with Apple and aarch64 with the rest (Unix).

You are mixing aarch64 and ARM64. I always associate ARM64 with Apple and aarch64 with the rest (Unix).

I haven't observed that difference (like in https://www.kernel.org/doc/html/latest/arm64/index.html, Debian architecture name), but I'm happy to shift if that's what's preferred.

Interesting. I didn't know about it.

sivachandra accepted this revision.Feb 15 2022, 10:25 AM

Thanks for working on this.

This revision is now accepted and ready to land.Feb 15 2022, 10:25 AM
This revision was automatically updated to reflect the committed changes.