From d82679d8050130522ebcf90c6061211a25b1c83d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 9 Feb 2021 00:43:10 -0800 Subject: [PATCH] [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. --- lld/ELF/Driver.cpp | 3 +-- lld/test/ELF/emulation-aarch64.s | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index fe722eb..4e10b02 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -144,8 +144,7 @@ static std::tuple parseEmulation(StringRef emul) { std::pair ret = StringSwitch>(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}) diff --git a/lld/test/ELF/emulation-aarch64.s b/lld/test/ELF/emulation-aarch64.s index 2d26a1e..68db8b4 100644 --- a/lld/test/ELF/emulation-aarch64.s +++ b/lld/test/ELF/emulation-aarch64.s @@ -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 -- 2.7.4