[ELF] Drop Android specific workaround -m aarch64_elf64_le_vec

`extern const bfd_target aarch64_elf64_le_vec;` is a variable in BFD.
It was somehow misused as an emulation by Android.

```
% 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
```

Acked by Stephen Hines, who removed the flag from Android a while back.
This commit is contained in:
Fangrui Song 2021-02-09 00:43:10 -08:00
parent d1522d349f
commit d82679d805
2 changed files with 1 additions and 4 deletions

View File

@ -144,8 +144,7 @@ static std::tuple<ELFKind, uint16_t, uint8_t> parseEmulation(StringRef emul) {
std::pair<ELFKind, uint16_t> ret =
StringSwitch<std::pair<ELFKind, uint16_t>>(s)
.Cases("aarch64elf", "aarch64linux", "aarch64_elf64_le_vec",
{ELF64LEKind, EM_AARCH64})
.Cases("aarch64elf", "aarch64linux", {ELF64LEKind, EM_AARCH64})
.Cases("aarch64elfb", "aarch64linuxb", {ELF64BEKind, EM_AARCH64})
.Cases("armelf", "armelf_linux_eabi", {ELF32LEKind, EM_ARM})
.Case("elf32_x86_64", {ELF32LEKind, EM_X86_64})

View File

@ -9,8 +9,6 @@
# RUN: echo 'OUTPUT_FORMAT(elf64-littleaarch64)' > %t.script
# RUN: ld.lld %t.script %t.o -o %t3
# RUN: llvm-readobj --file-headers %t3 | FileCheck --check-prefixes=AARCH64,LE %s
# RUN: ld.lld -m aarch64_elf64_le_vec %t.o -o %taosp
# RUN: llvm-readobj --file-headers %taosp | FileCheck --check-prefixes=AARCH64,LE %s
# RUN: llvm-mc -filetype=obj -triple=aarch64_be %s -o %t.be.o
# RUN: ld.lld %t.be.o -o %t