From: David Spickett Date: Fri, 16 Dec 2022 11:09:49 +0000 (+0000) Subject: [LLVM][objcopy] Fix update-section.test on 32 bit platforms X-Git-Tag: upstream/17.0.6~23575 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=beae6bfa14ac991b405d2928027fb0e31e777a09;p=platform%2Fupstream%2Fllvm.git [LLVM][objcopy] Fix update-section.test on 32 bit platforms This used %zu to print a uint64_t type. z is for size_t so on 32 bit we tried to treat it as a 32 bit number. Use PRIu64 instead to print as 64 bit everywhere. --- diff --git a/llvm/lib/ObjCopy/ELF/ELFObject.cpp b/llvm/lib/ObjCopy/ELF/ELFObject.cpp index 9960974..ea6dada 100644 --- a/llvm/lib/ObjCopy/ELF/ELFObject.cpp +++ b/llvm/lib/ObjCopy/ELF/ELFObject.cpp @@ -2115,7 +2115,7 @@ Error Object::updateSection(StringRef Name, ArrayRef Data) { if (Data.size() > OldSec->Size && OldSec->ParentSegment) return createStringError(errc::invalid_argument, "cannot fit data of size %zu into section '%s' " - "with size %zu that is part of a segment", + "with size %" PRIu64 " that is part of a segment", Data.size(), Name.str().c_str(), OldSec->Size); if (!OldSec->ParentSegment) { diff --git a/llvm/test/tools/llvm-objcopy/ELF/update-section.test b/llvm/test/tools/llvm-objcopy/ELF/update-section.test index ecd108b..79cfe0e 100644 --- a/llvm/test/tools/llvm-objcopy/ELF/update-section.test +++ b/llvm/test/tools/llvm-objcopy/ELF/update-section.test @@ -1,4 +1,3 @@ -# XFAIL: target={{arm.*linux-gnu.*}} # REQUIRES: x86-registered-target # RUN: yaml2obj %s -o %t