[PATCH] D44264: [ELF] Add elf64lppc emulation.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 9 14:15:28 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL327177: [ELF] Add elf64lppc emulation. (authored by MaskRay, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D44264
Files:
lld/trunk/ELF/Driver.cpp
lld/trunk/test/ELF/emulation.s
Index: lld/trunk/test/ELF/emulation.s
===================================================================
--- lld/trunk/test/ELF/emulation.s
+++ lld/trunk/test/ELF/emulation.s
@@ -218,6 +218,37 @@
# PPC64-NEXT: StringTableSectionIndex:
# PPC64-NEXT: }
+# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %tppc64le
+# RUN: ld.lld -m elf64lppc %tppc64le -o %t2ppc64le
+# RUN: llvm-readobj -file-headers %t2ppc64le | FileCheck --check-prefix=PPC64LE %s
+# RUN: ld.lld %tppc64le -o %t3ppc64le
+# RUN: llvm-readobj -file-headers %t3ppc64le | FileCheck --check-prefix=PPC64LE %s
+# PPC64LE: ElfHeader {
+# PPC64LE-NEXT: Ident {
+# PPC64LE-NEXT: Magic: (7F 45 4C 46)
+# PPC64LE-NEXT: Class: 64-bit (0x2)
+# PPC64LE-NEXT: DataEncoding: LittleEndian (0x1)
+# PPC64LE-NEXT: FileVersion: 1
+# PPC64LE-NEXT: OS/ABI: SystemV (0x0)
+# PPC64LE-NEXT: ABIVersion: 0
+# PPC64LE-NEXT: Unused: (00 00 00 00 00 00 00)
+# PPC64LE-NEXT: }
+# PPC64LE-NEXT: Type: Executable (0x2)
+# PPC64LE-NEXT: Machine: EM_PPC64 (0x15)
+# PPC64LE-NEXT: Version: 1
+# PPC64LE-NEXT: Entry:
+# PPC64LE-NEXT: ProgramHeaderOffset: 0x40
+# PPC64LE-NEXT: SectionHeaderOffset:
+# PPC64LE-NEXT: Flags [ (0x0)
+# PPC64LE-NEXT: ]
+# PPC64LE-NEXT: HeaderSize: 64
+# PPC64LE-NEXT: ProgramHeaderEntrySize: 56
+# PPC64LE-NEXT: ProgramHeaderCount:
+# PPC64LE-NEXT: SectionHeaderEntrySize: 64
+# PPC64LE-NEXT: SectionHeaderCount:
+# PPC64LE-NEXT: StringTableSectionIndex:
+# PPC64LE-NEXT: }
+
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %tmips
# RUN: ld.lld -m elf32btsmip -e _start %tmips -o %t2mips
# RUN: llvm-readobj -file-headers %t2mips | FileCheck --check-prefix=MIPS %s
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -127,6 +127,7 @@
.Case("elf64btsmip", {ELF64BEKind, EM_MIPS})
.Case("elf64ltsmip", {ELF64LEKind, EM_MIPS})
.Case("elf64ppc", {ELF64BEKind, EM_PPC64})
+ .Case("elf64lppc", {ELF64LEKind, EM_PPC64})
.Cases("elf_amd64", "elf_x86_64", {ELF64LEKind, EM_X86_64})
.Case("elf_i386", {ELF32LEKind, EM_386})
.Case("elf_iamcu", {ELF32LEKind, EM_IAMCU})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44264.137838.patch
Type: text/x-patch
Size: 2310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180309/108a9a9b/attachment.bin>
More information about the llvm-commits
mailing list