[lld] r331521 - [ELF][AArch64] Add aarch64_elf64_le_vec emulation
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri May 4 07:28:29 PDT 2018
Author: psmith
Date: Fri May 4 07:28:29 2018
New Revision: 331521
URL: http://llvm.org/viewvc/llvm-project?rev=331521&view=rev
Log:
[ELF][AArch64] Add aarch64_elf64_le_vec emulation
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.
Differential Revision: https://reviews.llvm.org/D46429
Modified:
lld/trunk/ELF/Driver.cpp
lld/trunk/test/ELF/emulation.s
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=331521&r1=331520&r2=331521&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Fri May 4 07:28:29 2018
@@ -118,7 +118,8 @@ static std::tuple<ELFKind, uint16_t, uin
std::pair<ELFKind, uint16_t> Ret =
StringSwitch<std::pair<ELFKind, uint16_t>>(S)
- .Cases("aarch64elf", "aarch64linux", {ELF64LEKind, EM_AARCH64})
+ .Cases("aarch64elf", "aarch64linux", "aarch64_elf64_le_vec",
+ {ELF64LEKind, EM_AARCH64})
.Cases("armelf", "armelf_linux_eabi", {ELF32LEKind, EM_ARM})
.Case("elf32_x86_64", {ELF32LEKind, EM_X86_64})
.Cases("elf32btsmip", "elf32btsmipn32", {ELF32BEKind, EM_MIPS})
Modified: lld/trunk/test/ELF/emulation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/emulation.s?rev=331521&r1=331520&r2=331521&view=diff
==============================================================================
--- lld/trunk/test/ELF/emulation.s (original)
+++ lld/trunk/test/ELF/emulation.s Fri May 4 07:28:29 2018
@@ -366,8 +366,12 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %taarch64
# RUN: ld.lld -m aarch64linux %taarch64 -o %t2aarch64
# RUN: llvm-readobj -file-headers %t2aarch64 | FileCheck --check-prefix=AARCH64 %s
-# RUN: ld.lld %taarch64 -o %t3aarch64
+# RUN: ld.lld -m aarch64elf %taarch64 -o %t3aarch64
# RUN: llvm-readobj -file-headers %t3aarch64 | FileCheck --check-prefix=AARCH64 %s
+# RUN: ld.lld -m aarch64_elf64_le_vec %taarch64 -o %t4aarch64
+# RUN: llvm-readobj -file-headers %t4aarch64 | FileCheck --check-prefix=AARCH64 %s
+# RUN: ld.lld %taarch64 -o %t5aarch64
+# RUN: llvm-readobj -file-headers %t5aarch64 | FileCheck --check-prefix=AARCH64 %s
# AARCH64: ElfHeader {
# AARCH64-NEXT: Ident {
# AARCH64-NEXT: Magic: (7F 45 4C 46)
More information about the llvm-commits
mailing list