[lld] r253639 - [ELF/AArch64] Accept -m aarch64linux.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 18:48:54 PST 2015
Author: ikudrin
Date: Thu Nov 19 20:48:53 2015
New Revision: 253639
URL: http://llvm.org/viewvc/llvm-project?rev=253639&view=rev
Log:
[ELF/AArch64] Accept -m aarch64linux.
This option is passed by clang driver if the target triple
is "aarch64-unknown-linux".
Differential Revision: http://reviews.llvm.org/D14831
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=253639&r1=253638&r2=253639&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Nov 19 20:48:53 2015
@@ -50,6 +50,8 @@ static std::pair<ELFKind, uint16_t> pars
return {ELF32LEKind, EM_386};
if (S == "elf_x86_64")
return {ELF64LEKind, EM_X86_64};
+ if (S == "aarch64linux")
+ return {ELF64LEKind, EM_AARCH64};
error("Unknown emulation: " + S);
}
Modified: lld/trunk/test/ELF/emulation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/emulation.s?rev=253639&r1=253638&r2=253639&view=diff
==============================================================================
--- lld/trunk/test/ELF/emulation.s (original)
+++ lld/trunk/test/ELF/emulation.s Thu Nov 19 20:48:53 2015
@@ -141,7 +141,31 @@
# MIPSEL-NEXT: Flags [ (0x0)
# MIPSEL-NEXT: ]
-# REQUIRES: x86,ppc,mips
+# 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: llvm-readobj -file-headers %t3aarch64 | FileCheck --check-prefix=AARCH64 %s
+# AARCH64: ElfHeader {
+# AARCH64-NEXT: Ident {
+# AARCH64-NEXT: Magic: (7F 45 4C 46)
+# AARCH64-NEXT: Class: 64-bit (0x2)
+# AARCH64-NEXT: DataEncoding: LittleEndian (0x1)
+# AARCH64-NEXT: FileVersion: 1
+# AARCH64-NEXT: OS/ABI: SystemV (0x0)
+# AARCH64-NEXT: ABIVersion: 0
+# AARCH64-NEXT: Unused: (00 00 00 00 00 00 00)
+# AARCH64-NEXT: }
+# AARCH64-NEXT: Type: Executable (0x2)
+# AARCH64-NEXT: Machine: EM_AARCH64 (0xB7)
+# AARCH64-NEXT: Version: 1
+# AARCH64-NEXT: Entry:
+# AARCH64-NEXT: ProgramHeaderOffset: 0x40
+# AARCH64-NEXT: SectionHeaderOffset:
+# AARCH64-NEXT: Flags [ (0x0)
+# AARCH64-NEXT: ]
+
+# REQUIRES: x86,ppc,mips,aarch64
.globl _start;
_start:
More information about the llvm-commits
mailing list