From: Alan Modra <amodra@gmail.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: PR29613, use of uninitialized value in objcopy
Date: Fri, 19 Apr 2024 09:55:38 +0930 [thread overview]
Message-ID: <ZiG6Arizan36z8ca@squeak.grove.modra.org> (raw)
In-Reply-To: <CA+=Sn1=TvJvOaJYRuTG-xNqx5QhrigrKi9j+Gb2eM7u-OUJ88A@mail.gmail.com>
On Thu, Apr 18, 2024 at 02:12:27PM -0700, Andrew Pinski wrote:
> On Mon, Sep 26, 2022 at 2:56 AM Alan Modra via Binutils
> <binutils@sourceware.org> wrote:
> >
> > PR 29613
> > * elf.c (_bfd_elf_write_secondary_reloc_section): Trim sh_size
> > back to relocs written. Use better types for vars.
>
> Just FYI. I noticed that this adds the use of `%zu` to
> _bfd_error_handler but _bfd_error_handler uses ATTRIBUTE_PRINTF_1
> which uses just the printf format which on mingw is different from
> other targets (it is an alias to ms_printf rather than an alias to
> gnu_printf). So this and other uses `%zu` will cause a warning to show
> up because of that.
> This was reported to GCC via
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114775 .
From binutils/README:
To build binutils you will need a C99 compliant compiler and library.
Casting size_t to long in order to print values is just plain wrong,
particularly on LLP64 hosts where sizeof(long)==4 and
sizeof(size_t)==8. In fact, many places in binutils that use long
variables, struct fields or function return values ought to be using
size_t or ssize_t.
--
Alan Modra
Australia Development Lab, IBM
prev parent reply other threads:[~2024-04-19 0:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 9:55 Alan Modra
2024-04-18 21:12 ` Andrew Pinski
2024-04-19 0:25 ` Alan Modra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZiG6Arizan36z8ca@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=pinskia@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).