mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Report endianness in output of {dwarf, obj}dump
For biendian targets like ARM and AArch64, it is useful to have the output of the llvm-dwarfdump and llvm-objdump report the endianness used when the object files were generated. Patch by Charlie Turner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218391 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -855,6 +855,7 @@ uint8_t ELFObjectFile<ELFT>::getBytesInAddress() const {
|
||||
|
||||
template <class ELFT>
|
||||
StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
|
||||
bool IsLittleEndian = ELFT::TargetEndianness == support::little;
|
||||
switch (EF.getHeader()->e_ident[ELF::EI_CLASS]) {
|
||||
case ELF::ELFCLASS32:
|
||||
switch (EF.getHeader()->e_machine) {
|
||||
@ -863,7 +864,7 @@ StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
|
||||
case ELF::EM_X86_64:
|
||||
return "ELF32-x86-64";
|
||||
case ELF::EM_ARM:
|
||||
return "ELF32-arm";
|
||||
return (IsLittleEndian ? "ELF32-arm-little" : "ELF32-arm-big");
|
||||
case ELF::EM_HEXAGON:
|
||||
return "ELF32-hexagon";
|
||||
case ELF::EM_MIPS:
|
||||
@ -883,7 +884,7 @@ StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
|
||||
case ELF::EM_X86_64:
|
||||
return "ELF64-x86-64";
|
||||
case ELF::EM_AARCH64:
|
||||
return "ELF64-aarch64";
|
||||
return (IsLittleEndian ? "ELF64-aarch64-little" : "ELF64-aarch64-big");
|
||||
case ELF::EM_PPC64:
|
||||
return "ELF64-ppc64";
|
||||
case ELF::EM_S390:
|
||||
|
Reference in New Issue
Block a user