[PATCH v2] elf: Use uint64_t for common symbol alignment warning
H.J. Lu
hjl.tools@gmail.com
Thu Oct 2 03:17:22 GMT 2025
On Thu, Oct 2, 2025 at 11:01 AM Collin Funk <collin.funk1@gmail.com> wrote:
>
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
> > + uint64_t c_align = UINT64_C (1) << common_align;
> > + uint64_t n_align = UINT64_C (1) << normal_align;
> > [...]
> > + (_("warning: alignment %" PRId64 " of common symbol `%s' in %pB is"
> > + " greater than the alignment (%" PRId64 ") of its section %pA"),
> > + c_align, name, common_bfd,
> > + n_align, h->root.u.def.section);
> > [...]
> > + (_("warning: alignment %" PRId64 " of normal symbol `%s' in %pB"
> > + " is smaller than %" PRId64 " used by the common definition in %pB"),
> > + n_align, name, normal_bfd,
> > + c_align, common_bfd);
>
> Doesn't this cause -Wformat-signedness errors? Since PRId64 is for
> int64_t, not uint64_t.
>
> Collin
Here is the v2 patch with PRIu64.
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-elf-Use-uint64_t-for-common-symbol-alignment-warn.patch
Type: application/x-patch
Size: 2530 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251002/f4a33d3f/attachment.bin>
More information about the Binutils
mailing list