[llvm-objcopy] Remove %p format specifiers

On 32-bit machines %p expects 32 bit values, however
addresses in llvm-objcopy are always 64 bits.

llvm-svn: 362074
This commit is contained in:
Eugene Leviant 2019-05-30 09:09:01 +00:00
parent 7fad428931
commit fa147c97d6
2 changed files with 5 additions and 5 deletions

View File

@ -67,8 +67,8 @@
# SIGN_EXTENDED-NEXT: :051000000001020304E1
# SIGN_EXTENDED-NEXT: :00000001FF
# BAD-ADDR: error: {{.*}}: Section '.text2' address range [{{.*}}, {{.*}}] is not 32 bit
# BAD-ADDR2: error: {{.*}}: Section '.text3' address range [{{.*}}, {{.*}}] is not 32 bit
# BAD-ADDR: error: {{.*}}: Section '.text2' address range [0x{{.*}}, 0x{{.*}}] is not 32 bit
# BAD-ADDR2: error: {{.*}}: Section '.text3' address range [0x{{.*}}, 0x{{.*}}] is not 32 bit
# There shouldn't be 'ExtendedAddr' nor 'Data' records
# ZERO_SIZE_SEC-NOT: :02000004
@ -78,4 +78,4 @@
# START1: :040000030000FFFFFB
# START2: :0400000500100000E7
# START3: :040000058000100067
# BAD-START: error: {{.*}}: Entry point address {{.*}} overflows 32 bits
# BAD-START: error: {{.*}}: Entry point address 0x{{.*}} overflows 32 bits

View File

@ -2019,7 +2019,7 @@ Error IHexWriter::checkSection(const SectionBase &Sec) {
if (addressOverflows32bit(Addr) || addressOverflows32bit(Addr + Sec.Size - 1))
return createStringError(
errc::invalid_argument,
"Section '%s' address range [%p, %p] is not 32 bit", Sec.Name.c_str(),
"Section '%s' address range [0x%llx, 0x%llx] is not 32 bit", Sec.Name.c_str(),
Addr, Addr + Sec.Size - 1);
return Error::success();
}
@ -2036,7 +2036,7 @@ Error IHexWriter::finalize() {
// We can't write 64-bit addresses.
if (addressOverflows32bit(Obj.Entry))
return createStringError(errc::invalid_argument,
"Entry point address %p overflows 32 bits.",
"Entry point address 0x%llx overflows 32 bits.",
Obj.Entry);
// If any section we're to write has segment then we