public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug general/24498] 0.176: isn't LTO ready
Date: Thu, 02 Apr 2020 11:14:06 +0000	[thread overview]
Message-ID: <bug-24498-10460-hrlaXvZhgE@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24498-10460@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=24498

--- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
We need a way to generate symbol versions without having to use (top-level)
inline assembly. It appears GCC 10 will provide this:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

We should try to use this to define the symbol version macros (OLD_VERSION,
NEW_VERSION, COMPAT_VERSION_NEWPROTO, COMPAT_VERSION) in lib/eu-config.h

symver ("name2@nodename")

    On ELF targets this attribute creates a symbol version. The name2 part of
the parameter is the actual name of the symbol by which it will be externally
referenced. The nodename portion should be the name of a node specified in the
version script supplied to the linker when building a shared library. Versioned
symbol must be defined and must be exported with default visibility.

    __attribute__ ((__symver__ ("foo@VERS_1"))) int
    foo_v1 (void)
    {
    }

    Will produce a .symver foo_v1, foo@VERS_1 directive in the assembler
output.

    It’s an error to define multiple version of a given symbol. In such case an
alias can be used.

    __attribute__ ((__symver__ ("foo@VERS_2")))
    __attribute__ ((alias ("foo_v1")))
    int symver_foo_v1 (void);

    This example creates an alias of foo_v1 with symbol name symver_foo_v1
which will be version VERS_2 of foo.

    Finally if the parameter is "name2@@nodename" then in addition to creating
a symbol version (as if "name2@nodename" was used) the version will be also
used to resolve name2 by the linker.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-04-02 11:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 19:49 [Bug general/24498] New: " kloczko.tomasz at gmail dot com
2019-04-28 20:25 ` [Bug general/24498] " mark at klomp dot org
2019-04-28 20:25 ` mark at klomp dot org
2019-04-28 20:37 ` kloczko.tomasz at gmail dot com
2019-04-28 20:43 ` mark at klomp dot org
2019-09-15 13:57 ` kloczko.tomasz at gmail dot com
2019-10-04  7:39 ` mark at klomp dot org
2020-03-30 22:11 ` kloczko.tomasz at gmail dot com
2020-04-02 11:14 ` mark at klomp dot org [this message]
2020-04-10 19:47 ` mark at klomp dot org
2020-04-15  5:12 ` marxin.liska at gmail dot com
2020-04-15  7:03 ` kloczko.tomasz at gmail dot com
2020-04-15  7:07 ` marxin.liska at gmail dot com
2020-04-15 12:50 ` mark at klomp dot org
2020-04-15 13:56 ` mark at klomp dot org
2020-04-15 15:53 ` kloczko.tomasz at gmail dot com
2020-04-16 16:00 ` mark at klomp dot org
2020-04-16 17:04 ` mark at klomp dot org
2020-04-17  9:42 ` mark at klomp dot org
2020-04-17 10:36 ` mark at klomp dot org
2020-05-06 14:39 ` mark at klomp dot org
2020-05-06 15:23 ` kloczko.tomasz at gmail dot com
2020-05-06 15:25 ` kloczko.tomasz at gmail dot com
2020-05-06 16:10 ` mark at klomp dot org
2020-05-06 16:10 ` [Bug general/24498] 0.179: " mark at klomp dot org
2020-05-06 17:28 ` kloczko.tomasz at gmail dot com
2022-04-24 18:14 ` mark at klomp dot org

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=bug-24498-10460-hrlaXvZhgE@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.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).