diff --git a/lld/test/ELF/mips-n32-rels.s b/lld/test/ELF/mips-n32-rels.s --- a/lld/test/ELF/mips-n32-rels.s +++ b/lld/test/ELF/mips-n32-rels.s @@ -51,7 +51,7 @@ # ELF: Data: 2's complement, big endian # ELF: Version: 1 (current) # ELF: OS/ABI: UNIX - System V -# ELF: ABI Version: 0x0 +# ELF: ABI Version: 0 # ELF: Type: EXEC (Executable file) # ELF: Machine: MIPS R3000 # ELF: Version: 0x1 diff --git a/llvm/test/tools/llvm-objcopy/ELF/partitions.test b/llvm/test/tools/llvm-objcopy/ELF/partitions.test --- a/llvm/test/tools/llvm-objcopy/ELF/partitions.test +++ b/llvm/test/tools/llvm-objcopy/ELF/partitions.test @@ -17,7 +17,7 @@ MAIN-NEXT: Data: 2's complement, little endian MAIN-NEXT: Version: 1 (current) MAIN-NEXT: OS/ABI: UNIX - System V -MAIN-NEXT: ABI Version: 0x0 +MAIN-NEXT: ABI Version: 0 MAIN-NEXT: Type: EXEC (Executable file) MAIN-NEXT: Machine: Advanced Micro Devices X86-64 MAIN-NEXT: Version: 0x1 @@ -76,7 +76,7 @@ PART1-NEXT: Data: 2's complement, little endian PART1-NEXT: Version: 1 (current) PART1-NEXT: OS/ABI: UNIX - System V -PART1-NEXT: ABI Version: 0x0 +PART1-NEXT: ABI Version: 0 PART1-NEXT: Type: DYN (Shared object file) PART1-NEXT: Machine: Advanced Micro Devices X86-64 PART1-NEXT: Version: 0x1 @@ -131,7 +131,7 @@ PART2-NEXT: Data: 2's complement, little endian PART2-NEXT: Version: 1 (current) PART2-NEXT: OS/ABI: UNIX - System V -PART2-NEXT: ABI Version: 0x0 +PART2-NEXT: ABI Version: 0 PART2-NEXT: Type: DYN (Shared object file) PART2-NEXT: Machine: Advanced Micro Devices X86-64 PART2-NEXT: Version: 0x1 diff --git a/llvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test b/llvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test --- a/llvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test +++ b/llvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test @@ -14,13 +14,13 @@ # RUN: llvm-readelf --file-headers %t.abiver.max | FileCheck %s --match-full-lines --check-prefix=ABIVER-MAX-GNU # ABIVER-ZERO-LLVM: ABIVersion: 0 -# ABIVER-ZERO-GNU: ABI Version: 0x0 +# ABIVER-ZERO-GNU: ABI Version: 0 # ABIVER-ANY-LLVM: ABIVersion: 52 -# ABIVER-ANY-GNU: ABI Version: 0x34 +# ABIVER-ANY-GNU: ABI Version: 52 # ABIVER-MAX-LLVM: ABIVersion: 255 -# ABIVER-MAX-GNU: ABI Version: 0xFF +# ABIVER-MAX-GNU: ABI Version: 255 --- !ELF FileHeader: diff --git a/llvm/test/tools/llvm-readobj/ELF/gnu-file-headers.test b/llvm/test/tools/llvm-readobj/ELF/gnu-file-headers.test --- a/llvm/test/tools/llvm-readobj/ELF/gnu-file-headers.test +++ b/llvm/test/tools/llvm-readobj/ELF/gnu-file-headers.test @@ -14,7 +14,7 @@ # I386-NEXT: Data: 2's complement, little endian # I386-NEXT: Version: 1 (current) # I386-NEXT: OS/ABI: UNIX - System V -# I386-NEXT: ABI Version: 0x0 +# I386-NEXT: ABI Version: 0 # I386-NEXT: Type: REL (Relocatable file) # I386-NEXT: Machine: Intel 80386 # I386-NEXT: Version: 0x1 @@ -57,7 +57,7 @@ # X86-64-NEXT: Data: 2's complement, little endian # X86-64-NEXT: Version: 1 (current) # X86-64-NEXT: OS/ABI: UNIX - System V -# X86-64-NEXT: ABI Version: 0x0 +# X86-64-NEXT: ABI Version: 0 # X86-64-NEXT: Type: REL (Relocatable file) # X86-64-NEXT: Machine: Advanced Micro Devices X86-64 # X86-64-NEXT: Version: 0x1 @@ -101,7 +101,7 @@ # MIPSEL-NEXT: Data: 2's complement, little endian # MIPSEL-NEXT: Version: 1 (current) # MIPSEL-NEXT: OS/ABI: UNIX - System V -# MIPSEL-NEXT: ABI Version: 0x0 +# MIPSEL-NEXT: ABI Version: 0 # MIPSEL-NEXT: Type: REL (Relocatable file) # MIPSEL-NEXT: Machine: MIPS R3000 # MIPSEL-NEXT: Version: 0x1 diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -3061,8 +3061,8 @@ OS << "\n"; Str = printEnum(e->e_ident[ELF::EI_OSABI], makeArrayRef(ElfOSABI)); printFields(OS, "OS/ABI:", Str); - Str = "0x" + to_hexString(e->e_ident[ELF::EI_ABIVERSION]); - printFields(OS, "ABI Version:", Str); + printFields(OS, + "ABI Version:", std::to_string(e->e_ident[ELF::EI_ABIVERSION])); Str = printEnum(e->e_type, makeArrayRef(ElfObjectFileType)); printFields(OS, "Type:", Str); Str = printEnum(e->e_machine, makeArrayRef(ElfMachineType));