This patch fixes target linker emulation for aarch64 big endian.
aarch64_be_linux is not recognized by gnu ld. The equivalent emulation mode supported by gnu ld is aarch64linuxb.
Details
- Reviewers
peter.smith cpirker javed.absar - Commits
- rG74c32a11796e: Merging r341312:
rGd8e7ed6457b1: [Aarch64] Fix linker emulation for Aarch64 big endian
rL345920: Merging r341312:
rC341312: [Aarch64] Fix linker emulation for Aarch64 big endian
rL341312: [Aarch64] Fix linker emulation for Aarch64 big endian
Diff Detail
- Repository
- rL LLVM
Event Timeline
I can confirm that binutils use aarch64linuxb as their target linux emulation and not aarch64_be_linux. I checked the original commit http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140310/101365.html , this has references to ld-linux-aarch64_be.so which does seem to be mentioned in binutils and the directory "/lib/aarch64_be-linux-gnu" that I couldn't find any reference to, or any close equivalent of that directory mentioned in binutils. It may be worth checking that as well.
So this looks like it is the right thing to do for me, there is a chance that we may be breaking something set up by the original commit so I'll add the original committer as a reviewer as they seemed to be quite active with AArch64 BE changes.
cpirker, as the original author do you have any concerns about changing the big-endian emulation name to match binutils?
I've been referred back to this by a colleague trying to build with big-endian clang with binutils and is seeing an error message out of binutils. I've checked that binutils from the initial commit always used aarch64linuxb and I've verified that I cannot build a aarch64_be-linux-gnu executable with binutils without this change, and I can with this change.
I've set LGTM.