This adds the initial ELF/AArch64 support to lld. Only basic a "Hello World" app has been successfully tested for both dynamic and static compiling.
I'm not an expert on linkers neither AARch64, but I agree that this is a great starting point. Thanks for working on this!
As Shankar said, tests would be good, following what's already in lld for other archs. Even if you can't link more than hello world, you do have some features in, and linking / disassembling / FileCheck'ing wouldn't be that hard to implement for a few basic cases. It would be good, however, to stress each part of the code more thoroughly with time, and since this is brand new code, it shouldn't take too long to go in, or we'll forget, and then ignore.
With tests and the comments addressed by others and me, I think this looks good to me, too.
Forgot debug for this one, and some others. Is that intentional?
If I got it right, the ones that have debug messages here are not the ones that have it up there. Since we're mostly just calling them in the switch, why not move them all into one place, ie. the functions up there?
Thanks for the comments. I'll try to add some tests and resubmit a modified patch.
You're right, the debug messages should all be moved up into the actual relocation functions. I'll move them all up there and ensure all relocation functions have a debug message.
I'm not an expert of ARM64 so maybe I'm just scratching the surface, but here are my comments.
Indentation error? Please run clang-format on the files.
I think this function overrides ExecutableWriter::createImplicitFiles. If a member function overrides, don't write "virtual" but add "override". That applies to other functions too.