llvm.org GIT mirror llvm / bfbea49
[llvm-objcopy] Fix sparc target endianness Summary: AFAIK, the "sparc" target is big endian and the target for 32-bit little-endian SPARC is denoted as "sparcel". This patch fixes the endianness of "sparc" target and adds "sparcel" target for 32-bit little-endian SPARC. Reviewers: espindola, alexshap, rupprecht, jhenderson Reviewed By: jhenderson Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63251 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363336 91177308-0d34-0410-b5e6-96231b3b80d8 Seiya Nuta 3 months ago
2 changed file(s) with 10 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
2424 # RUN: llvm-readobj --file-headers %t.rv64.o | FileCheck %s --check-prefixes=CHECK,LE,RISCV64,64
2525
2626 # RUN: llvm-objcopy -I binary -B sparc %t.txt %t.sparc.o
27 # RUN: llvm-readobj --file-headers %t.sparc.o | FileCheck %s --check-prefixes=CHECK,LE,SPARC,32
27 # RUN: llvm-readobj --file-headers %t.sparc.o | FileCheck %s --check-prefixes=CHECK,BE,SPARC,32
28
29 # RUN: llvm-objcopy -I binary -B sparcel %t.txt %t.sparcel.o
30 # RUN: llvm-readobj --file-headers %t.sparcel.o | FileCheck %s --check-prefixes=CHECK,LE,SPARCEL,32
2831
2932 # RUN: llvm-objcopy -I binary -B x86-64 %t.txt %t.x86-64.o
3033 # RUN: llvm-readobj --file-headers %t.x86-64.o | FileCheck %s --check-prefixes=CHECK,LE,X86-64,64
4043 # RISCV64-SAME: riscv{{$}}
4144 # PPC-SAME: ppc64
4245 # SPARC-SAME: sparc
46 # SPARCEL-SAME: sparc
4347 # X86-64-SAME: x86-64
4448
4549 # AARCH64-NEXT: Arch: aarch64
4953 # PPC-NEXT: Arch: powerpc64le
5054 # RISCV32-NEXT: Arch: riscv32
5155 # RISCV64-NEXT: Arch: riscv64
52 # SPARC-NEXT: Arch: sparcel
56 # SPARC-NEXT: Arch: sparc{{$}}
57 # SPARCEL-NEXT: Arch: sparcel
5358 # X86-64-NEXT: Arch: x86_64
5459
5560 # 32-NEXT: AddressSize: 32bit
7681 # RISCV32-NEXT: Machine: EM_RISCV (0xF3)
7782 # RISCV64-NEXT: Machine: EM_RISCV (0xF3)
7883 # SPARC-NEXT: Machine: EM_SPARC (0x2)
84 # SPARCEL-NEXT: Machine: EM_SPARC (0x2)
7985 # X86-64-NEXT: Machine: EM_X86_64 (0x3E)
8086 # CHECK-NEXT: Version: 1
8187 # CHECK-NEXT: Entry: 0x0
262262 {"powerpc:common64", {ELF::EM_PPC64, true, true}},
263263 {"riscv:rv32", {ELF::EM_RISCV, false, true}},
264264 {"riscv:rv64", {ELF::EM_RISCV, true, true}},
265 {"sparc", {ELF::EM_SPARC, false, true}},
265 {"sparc", {ELF::EM_SPARC, false, false}},
266 {"sparcel", {ELF::EM_SPARC, false, true}},
266267 {"x86-64", {ELF::EM_X86_64, true, true}},
267268 };
268269