llvm.org GIT mirror llvm / fef0e8c
[llvm-objcopy] Add elf32-sparc and elf32-sparcel target Summary: The "sparc"/"sparcel" architectures appears in ArchMap (used by -B option) but not in OutputFormatMap (used by -I/-O option). Add their targets into OutputFormatMap for consistency. Note that AFAIK there're no targets for 32-bit little-endian SPARC ("elf32-sparcel") in GNU binutils. Reviewers: espindola, alexshap, rupprecht, jhenderson, compnerd, jakehehrlich Reviewed By: jhenderson, compnerd, jakehehrlich Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63238 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363524 91177308-0d34-0410-b5e6-96231b3b80d8 Seiya Nuta 30 days ago
2 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9696 # RUN: llvm-readobj --file-headers %t.elf64_tradlittlemips.o | FileCheck %s --check-prefixes=CHECK,LE,MIPS,MIPS64LE,64,SYSV
9797 # RUN: llvm-readobj --file-headers %t.elf64_tradlittlemips.dwo | FileCheck %s --check-prefixes=CHECK,LE,MIPS,MIPS64LE,64,SYSV
9898
99 # RUN: llvm-objcopy %t.o -O elf32-sparc %t.elf32_sparc.o --split-dwo=%t.elf32_sparc.dwo
100 # RUN: llvm-readobj --file-headers %t.elf32_sparc.o | FileCheck %s --check-prefixes=CHECK,BE,SPARC,32,SYSV
101 # RUN: llvm-readobj --file-headers %t.elf32_sparc.dwo | FileCheck %s --check-prefixes=CHECK,BE,SPARC,32,SYSV
102
103 # RUN: llvm-objcopy %t.o -O elf32-sparcel %t.elf32_sparcel.o --split-dwo=%t.elf32_sparcel.dwo
104 # RUN: llvm-readobj --file-headers %t.elf32_sparcel.o | FileCheck %s --check-prefixes=CHECK,LE,SPARCEL,32,SYSV
105 # RUN: llvm-readobj --file-headers %t.elf32_sparcel.dwo | FileCheck %s --check-prefixes=CHECK,LE,SPARCEL,32,SYSV
106
99107 !ELF
100108 FileHeader:
101109 Class: ELFCLASS32
136144 # PPC64LE-SAME: ppc64{{$}}
137145 # RISCV32-SAME: riscv{{$}}
138146 # RISCV64-SAME: riscv{{$}}
147 # SPARC-SAME: sparc
139148 # X86-64-SAME: x86-64
140149 # DEFAULT-SAME: unknown
141150
152161 # PPC64LE-NEXT: Arch: powerpc64le
153162 # RISCV32-NEXT: Arch: riscv32
154163 # RISCV64-NEXT: Arch: riscv64
164 # SPARC-NEXT: Arch: sparc{{$}}
165 # SPARCEL-NEXT: Arch: sparcel
155166 # X86-64-NEXT: Arch: x86_64
156167 # DEFAULT-NEXT: Arch: unknown
157168
176187 # PPC64: Machine: EM_PPC64 (0x15)
177188 # RISCV32: Machine: EM_RISCV (0xF3)
178189 # RISCV64: Machine: EM_RISCV (0xF3)
190 # SPARC: Machine: EM_SPARC (0x2)
179191 # X86-64: Machine: EM_X86_64 (0x3E)
180192
181193 # 32: HeaderSize: 52
305305 {"elf32-tradlittlemips", {ELF::EM_MIPS, false, true}},
306306 {"elf64-tradbigmips", {ELF::EM_MIPS, true, false}},
307307 {"elf64-tradlittlemips", {ELF::EM_MIPS, true, true}},
308 // SPARC
309 {"elf32-sparc", {ELF::EM_SPARC, false, false}},
310 {"elf32-sparcel", {ELF::EM_SPARC, false, true}},
308311 };
309312
310313 static Expected getOutputFormatMachineInfo(StringRef Format) {