From: "Dmitry V. Levin" <ldv@altlinux.org>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH v2] Improve building with LTO
Date: Mon, 8 Nov 2021 13:02:28 +0300 [thread overview]
Message-ID: <20211108100228.GC27916@altlinux.org> (raw)
In-Reply-To: <d71c4620b0d3d12b29dd7ab507d2502d24c3efa9.camel@klomp.org>
Hi Mark,
On Thu, Nov 04, 2021 at 01:12:29PM +0100, Mark Wielaard wrote:
> Hi Dmitry,
>
> On Thu, 2021-11-04 at 14:23 +0300, Dmitry V. Levin wrote:
> > On Sat, Aug 28, 2021 at 12:31:43PM +0300, Dmitry V. Levin wrote:
> > > On Thu, Feb 18, 2021 at 03:38:56AM +0100, Alexander Miller via
> > > Elfutils-devel wrote:
> > > > From: Alexander Miller <alex.miller@gmx.de>
> > > >
> > > > Use symver attribute for symbol versioning instead of .symver
> > > > assembler directive when available. Convert to use double @
> > > > syntax
> > > > for default version in all cases (required when using the
> > > > attribute).
> > > >
> > > > Add the attributes externally_visible, no_reorder if available
> > > > when
> > > > using assembler directives to improve the situation for < gcc-10.
> > > > This is not 100% reliable, though; -flto-partition=none may still
> > > > be
> > > > needed in some cases.
> > > >
> > > > Note that -Wno-error=stack-usage= is still needed to build with
> > > > LTO.
> > > >
> > > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24498
> > > > Signed-off-by: Alexander Miller <alex.miller@gmx.de>
> > > > ---
> > > > lib/ChangeLog | 13 +++++++
> > > > lib/eu-config.h | 65 +++++++++++++++++++++++++++-
> > > > ------
> > > > libdw/ChangeLog | 11 ++++++
> > > > libdw/dwarf_aggregate_size.c | 4 +--
> > > > libdw/dwarf_arrayorder.c | 2 +-
> > > > libdw/dwarf_bitoffset.c | 2 +-
> > > > libdw/dwarf_bitsize.c | 2 +-
> > > > libdw/dwarf_bytesize.c | 2 +-
> > > > libdw/dwarf_decl_column.c | 2 +-
> > > > libdw/dwarf_decl_file.c | 2 +-
> > > > libdw/dwarf_decl_line.c | 2 +-
> > > > libdw/dwarf_srclang.c | 4 +--
> > > > libdwelf/ChangeLog | 5 +++
> > > > libdwelf/dwelf_elf_begin.c | 2 +-
> > > > libdwfl/ChangeLog | 7 ++++
> > > > libdwfl/core-file.c | 4 +--
> > > > libdwfl/dwfl_module_build_id.c | 4 +--
> > > > libdwfl/dwfl_report_elf.c | 4 +--
> > > > 18 files changed, 107 insertions(+), 30 deletions(-)
> > >
> > > ping?
> >
> > FWiW, I applied this patch in ALT's elfutils package about 2 months
> > ago.
> > Thanks to -Wstack-usage fixes merged, it no longer requires
> > -Wno-error=stack-usage= to build with LTO.
>
> Thanks. This patch was indeed one reason I kept postponing the release,
> because I didn't have have time to properly review it.
>
> Which gcc versions have you tried this against (with/without -flto?)
I tested with gcc10 and gcc11.
I could try older versions, although I didn't feel that necessary.
> I admit I am still a bit nervous about the switch away from @@@ to just
> @ and @@. I was secretly hoping gcc would add @@@ support to the symver
> attribute. But that doesn't seem to be happening, and even if it did,
> it would be gcc 12+ only. So maybe we can include it for this release
> and just tell people they may keep the pieces if they use -flto. But it
https://sourceware.org/bugzilla/show_bug.cgi?id=27367 will likely strike
those who would build elfutils with -flto using gcc11+.
> does also impact symbol versioning for non-lto builds, so I am still a
> little hesitant. I'll try to do some tests to make sure things look ok
> with different gcc versions.
What do you mean by "it does also impact symbol versioning for non-lto
builds"? The code for non-lto builds changes, but the versioning
should remain the same, shouldn't it?
--
ldv
next prev parent reply other threads:[~2021-11-08 10:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 22:57 [PATCH] " Alexander Miller
2021-02-17 20:22 ` Mark Wielaard
2021-02-18 14:27 ` Alexander Miller
2021-02-18 2:38 ` [PATCH v2] " Alexander Miller
2021-08-28 9:31 ` Dmitry V. Levin
2021-11-04 11:23 ` Dmitry V. Levin
2021-11-04 12:12 ` Mark Wielaard
2021-11-08 10:02 ` Dmitry V. Levin [this message]
2021-11-08 23:18 ` Mark Wielaard
2021-11-09 8:58 ` Dmitry V. Levin
2021-11-09 9:04 ` Martin Liška
2021-11-09 9:09 ` Dmitry V. Levin
2021-11-09 9:11 ` Martin Liška
2021-11-09 11:45 ` Mark Wielaard
2021-11-09 13:31 ` Martin Liška
2021-11-09 13:33 ` Martin Liška
2021-11-09 17:49 ` Mark Wielaard
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=20211108100228.GC27916@altlinux.org \
--to=ldv@altlinux.org \
--cc=elfutils-devel@sourceware.org \
/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).