From: Mark Wielaard <mark@klomp.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: dwz@sourceware.org
Subject: Re: [PATCH] Mark and init shstrtab[_len] and const in optimize_multifile
Date: Thu, 30 Jun 2022 14:47:12 +0200 [thread overview]
Message-ID: <9626ffe27319ac372a88c72cb1522d559dc17f3a.camel@klomp.org> (raw)
In-Reply-To: <Yr2NPaeB1P3wgvuM@tucnak>
Hi Jakub,
On Thu, 2022-06-30 at 13:47 +0200, Jakub Jelinek wrote:
> On Thu, Jun 30, 2022 at 01:34:55PM +0200, Mark Wielaard wrote:
> > Old gcc (4.8.5) warn that shstrtab and shstrtab_len can be
> > clobbered
> > by the longjump. Work around that by marking shstrtab_gnu and
> > shstrtab_dwarf5 as static and shstrtab and shstrtab_len as const.
> > Init shstrtab and shstrtab_len at declaration.
> >
> > * dwz.c (optimize_multifile): Make shstrtab_[gnu|dwarf5],
> > shstrtab[_len] static. shstrtab[_len] init and make const.
> > - const char *shstrtab;
> > - size_t shstrtab_len;
> > + const char *shstrtab = dwarf_5 ? shstrtab_dwarf5 : shstrtab_gnu;
>
> You aren't marking shstrtab as const though, that would be
> const char *const shstrtab = ...
Doh, I always get that wrong.
Pushed with that fixed.
Thanks,
Mark
prev parent reply other threads:[~2022-06-30 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 11:34 Mark Wielaard
2022-06-30 11:47 ` Jakub Jelinek
2022-06-30 12:47 ` Mark Wielaard [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=9626ffe27319ac372a88c72cb1522d559dc17f3a.camel@klomp.org \
--to=mark@klomp.org \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.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).