summaryrefslogtreecommitdiff
path: root/test/ELF/emulation-ppc.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/emulation-ppc.s')
-rw-r--r--test/ELF/emulation-ppc.s37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/ELF/emulation-ppc.s b/test/ELF/emulation-ppc.s
index 843e77604779..4c8beb10159e 100644
--- a/test/ELF/emulation-ppc.s
+++ b/test/ELF/emulation-ppc.s
@@ -103,5 +103,42 @@
# PPC64LE-NEXT: StringTableSectionIndex:
# PPC64LE-NEXT: }
+# RUN: llvm-mc -filetype=obj -triple=powerpc-unknown-linux %s -o %tppc32
+# RUN: ld.lld -m elf32ppc %tppc32 -o %t2ppc32
+# RUN: llvm-readobj -file-headers %t2ppc32 | FileCheck --check-prefix=PPC32 %s
+# RUN: ld.lld %tppc32 -o %t3ppc32
+# RUN: llvm-readobj -file-headers %t3ppc32 | FileCheck --check-prefix=PPC32 %s
+# RUN: echo 'OUTPUT_FORMAT(elf32-powerpc)' > %tppc32.script
+# RUN: ld.lld %tppc32.script %tppc32 -o %t4ppc32
+# RUN: llvm-readobj -file-headers %t4ppc32 | FileCheck --check-prefix=PPC32 %s
+# RUN: ld.lld -m elf32ppclinux %tppc32 -o %t5ppc32
+# RUN: llvm-readobj -file-headers %t5ppc32 | FileCheck --check-prefix=PPC32 %s
+
+# PPC32: ElfHeader {
+# PPC32-NEXT: Ident {
+# PPC32-NEXT: Magic: (7F 45 4C 46)
+# PPC32-NEXT: Class: 32-bit (0x1)
+# PPC32-NEXT: DataEncoding: BigEndian (0x2)
+# PPC32-NEXT: FileVersion: 1
+# PPC32-NEXT: OS/ABI: SystemV (0x0)
+# PPC32-NEXT: ABIVersion: 0
+# PPC32-NEXT: Unused: (00 00 00 00 00 00 00)
+# PPC32-NEXT: }
+# PPC32-NEXT: Type: Executable (0x2)
+# PPC32-NEXT: Machine: EM_PPC (0x14)
+# PPC32-NEXT: Version: 1
+# PPC32-NEXT: Entry:
+# PPC32-NEXT: ProgramHeaderOffset: 0x34
+# PPC32-NEXT: SectionHeaderOffset:
+# PPC32-NEXT: Flags [ (0x0)
+# PPC32-NEXT: ]
+# PPC32-NEXT: HeaderSize: 52
+# PPC32-NEXT: ProgramHeaderEntrySize: 32
+# PPC32-NEXT: ProgramHeaderCount:
+# PPC32-NEXT: SectionHeaderEntrySize: 40
+# PPC32-NEXT: SectionHeaderCount:
+# PPC32-NEXT: StringTableSectionIndex:
+# PPC32-NEXT: }
+
.globl _start
_start: