public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28197] New: compat_symbol should migrate to .symver *, *,  remove
@ 2021-08-05 18:17 i at maskray dot me
  0 siblings, 0 replies; only message in thread
From: i at maskray dot me @ 2021-08-05 18:17 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 18:17 [Bug build/28197] New: compat_symbol should migrate to .symver *, *, remove i at maskray dot me

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).