This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF][AArch64] Add aarch64_elf64_le_vec emulation
ClosedPublic

Authored by peter.smith on May 4 2018, 6:13 AM.

Details

Summary

Android AOSP has started specifying -m aarch64_elf64_le_vec as supported by gold and BFD. This is a simple change to add the emulation so that LLD doesn't immediately error when used as a linker in an AOSP build.

See https://android.googlesource.com/platform/build/soong/+/master/cc/config/arm64_device.go#31

Diff Detail

Event Timeline

peter.smith created this revision.May 4 2018, 6:13 AM
grimar accepted this revision.May 4 2018, 6:53 AM

Looks fine.

This revision is now accepted and ready to land.May 4 2018, 6:53 AM
This revision was automatically updated to reflect the committed changes.

aarch64_elf64_le_vec is a variable name in BFD (extern const bfd_target aarch64_elf64_le_vec;), instead of a BFD emulation.
@srhines Can this workaround be dropped now?

% aarch64-linux-gnu-ld -m aarch64_elf64_le_vec a.o 
aarch64-linux-gnu-ld: unrecognised emulation mode: aarch64_elf64_le_vec
Supported emulations: aarch64linux aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi

aarch64_elf64_le_vec is a variable name in BFD (extern const bfd_target aarch64_elf64_le_vec;), instead of a BFD emulation.
@srhines Can this workaround be dropped now?

% aarch64-linux-gnu-ld -m aarch64_elf64_le_vec a.o 
aarch64-linux-gnu-ld: unrecognised emulation mode: aarch64_elf64_le_vec
Supported emulations: aarch64linux aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi

https://android-review.googlesource.com/c/platform/build/soong/+/1278815 removed the use of this flag a while back, so yes, I am sure that you can drop this patch. Thanks for being proactive about this kind of cleanup.