[llvm] edcfc39 - [Object] Use BFD name for little-endian PowerPC64
Bill Wendling via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 20:10:18 PDT 2020
Author: Bill Wendling
Date: 2020-04-19T20:10:05-07:00
New Revision: edcfc391e142ea4f2c5d9dc4976644dd2cecdcae
URL: https://github.com/llvm/llvm-project/commit/edcfc391e142ea4f2c5d9dc4976644dd2cecdcae
DIFF: https://github.com/llvm/llvm-project/commit/edcfc391e142ea4f2c5d9dc4976644dd2cecdcae.diff
LOG: [Object] Use BFD name for little-endian PowerPC64
Summary:
Little-endian PowerPC object files should report "elf64-powerpcle" instead of
"elf64-powerpc".
Reviewers: jhenderson, MaskRay, espindola, alexshap, rupprecht, #powerpc
Reviewed By: MaskRay
Subscribers: wuzish, emaste, nemanjai, shchenz, steven.zhang, llvm-commits
Tags: #llvm, #powerpc
Differential Revision: https://reviews.llvm.org/D78344
Added:
Modified:
llvm/include/llvm/Object/ELFObjectFile.h
llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
Removed:
################################################################################
diff --git a/llvm/include/llvm/Object/ELFObjectFile.h b/llvm/include/llvm/Object/ELFObjectFile.h
index 3fbfa9ca42d9..b0aa86942a3f 100644
--- a/llvm/include/llvm/Object/ELFObjectFile.h
+++ b/llvm/include/llvm/Object/ELFObjectFile.h
@@ -1121,7 +1121,7 @@ StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
case ELF::EM_AARCH64:
return (IsLittleEndian ? "elf64-littleaarch64" : "elf64-bigaarch64");
case ELF::EM_PPC64:
- return "elf64-powerpc";
+ return (IsLittleEndian ? "elf64-powerpcle" : "elf64-powerpc");
case ELF::EM_RISCV:
return "elf64-littleriscv";
case ELF::EM_S390:
diff --git a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
index e4ab2dd59c67..db82c36ccd21 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
@@ -147,7 +147,7 @@ Symbols:
# MIPS-SAME: mips
# PPC-SAME: powerpc{{$}}
# PPC64BE-SAME: powerpc{{$}}
-# PPC64LE-SAME: powerpc{{$}}
+# PPC64LE-SAME: powerpcle{{$}}
# RISCV32-SAME: riscv{{$}}
# RISCV64-SAME: riscv{{$}}
# SPARC-SAME: sparc
More information about the llvm-commits
mailing list