public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "i at maskray dot me" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug build/28197] New: compat_symbol should migrate to .symver *, *,  remove
Date: Thu, 05 Aug 2021 18:17:45 +0000	[thread overview]
Message-ID: <bug-28197-131@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 28197
           Summary: compat_symbol should migrate to .symver *, *, remove
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
                CC: carlos at redhat dot com
  Target Milestone: ---

Due to an assembler design flaw (IMO), .symver foo,foo@v1 produces two symbols
`foo` and foo@v1 if foo is defined. This has caused all sorts of linker
complexity (in all of GNU ld, gold, and ld.lld AFAICT from PRs). .symver should
really behave like "rename" && there should only be one defined symbol 'foo@v1'

I implemented a hack for LLD 13.0.0: https://reviews.llvm.org/D107235

Due to PR gold/28196, gold linked libc.so has many default version symbols
(e.g. __free_hook@@GLIBC_2.2.5) while they should be non-default version
symbols instead.


Migrating to .symver foo,foo@v1, remove  can make all of GNU ld, gold, and
ld.lld happier. They all implement some hacks to ensure foo and foo@v1 don't
end up with two dynamic symbols. The migration is blocked on PR gas/28157 (make
relocations work).

After glibc is migrated, if at some point the compatibility with the old
`.symver foo,foo@v1` behavior is no longer needed, we can default gas to
`,remove`. Over time, all linkers can drop their foo && foo@v1 combining hacks.

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

                 reply	other threads:[~2021-08-05 18:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-28197-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).