[llvm] [llvm-objcopy] Add possibility to verify .note section format (PR #90458)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 01:02:48 PDT 2024
================
@@ -657,10 +657,14 @@ static Error verifyNoteSection(StringRef Name, endianness Endianness,
NameSizeValue = byteswap(NameSizeValue);
DescSizeValue = byteswap(DescSizeValue);
}
+
+ // NameSizeValue and DescSizeValue need to be padded to 4.
+ auto iceil4 = [](auto v) { return (v + 3) / 4 * 4; };
----------------
jh7370 wrote:
Rather than inventing a new function, why not use the existing `AlignTo` function?
https://github.com/llvm/llvm-project/pull/90458
More information about the llvm-commits
mailing list