public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Allow LLD 13.0.0 and improve compatibility with gold and clang
@ 2021-08-05 16:25 Fangrui Song
  2021-08-05 16:25 ` [PATCH v2 1/3] elf: Replace .tls_common with .tbss definition [BZ #28152] Fangrui Song
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Fangrui Song @ 2021-08-05 16:25 UTC (permalink / raw)
  To: libc-alpha

The patches allow LLD 13.0.0 to build glibc. LLD's compatibility with
GNU ld is generally better than gold's compatibility with GNU ld.


About `make check` results:

I can't configure glibc --enable-static-pie with gold, so I use
--disable-static-pie with gold.

* gold (--disable-static-pie) has 22 FAIL.
* ld.bfd has 14 FAIL.
* ld.lld has 16 FAIL. (With glibc bug BZ #28153 fixed)

(I am using a variant of the Debian testing (BZ #28177
libgcc_s.so.1), so even with GNU ld there may be relatively more
failures than Fedora/RedHat.

% ./testrun.sh stdlib/tst-quick_exit 
stdlib/tst-quick_exit: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
)

`make check` only has 2 more failures with LLD than with GNU ld:
BZ #28154 (LLD follows the PowerPC port of GNU ld for ifunc by
placing IRELATIVE relocations in .rela.dyn).
The set of dynamic symbols is the same with GNU ld and LLD,
modulo unused SHN_ABS version node symbols.

For comparison, gold does not support --enable-static-pie
(--no-dynamic-linker is unsupported BZ #22221), yet
has 6 failures more than LLD. gold linked libc.so has
larger .dynsym differences with GNU ld and LLD
(ISTM non-default version symbols are changed to default versions
by a version script).

---

I identified the lack of support of

* version script on non-default version symbols
* copy relocations on non-default version symbols

in an earlier snapshot of LLD 13.0.0 and fixed them.
The functionality of the LLD linked libc.so and ld.so looks pretty good.

Fangrui Song (3):
  elf: Replace .tls_common with .tbss definition [BZ #28152]
  elf: Skip tst-auditlogmod-* if the linker doesn't support --depaudit
    [BZ #28151]
  configure: Allow LD to be LLD 13.0.0 or above [BZ #26558]

 configure        | 111 +++++++++++++++++++++++++++++++++++++++++++++--
 configure.ac     |  24 +++++++---
 elf/Makefile     |   4 +-
 elf/tls-macros.h |   6 ++-
 4 files changed, 134 insertions(+), 11 deletions(-)

-- 
2.32.0.605.g8dce9f2422-goog


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-08-31 21:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 16:25 [PATCH v2 0/3] Allow LLD 13.0.0 and improve compatibility with gold and clang Fangrui Song
2021-08-05 16:25 ` [PATCH v2 1/3] elf: Replace .tls_common with .tbss definition [BZ #28152] Fangrui Song
2021-08-05 16:26 ` [PATCH v2 2/3] elf: Skip tst-auditlogmod-* if the linker doesn't support --depaudit [BZ #28151] Fangrui Song
2021-08-16  4:59   ` Fāng-ruì Sòng
2021-08-24  3:56     ` Fāng-ruì Sòng
2021-08-24 12:04   ` Adhemerval Zanella
2021-08-05 16:26 ` [PATCH v2 3/3] configure: Allow LD to be LLD 13.0.0 or above [BZ #26558] Fangrui Song
2021-08-05 16:34   ` H.J. Lu
2021-08-05 16:43     ` Fāng-ruì Sòng
2021-08-05 17:04       ` H.J. Lu
2021-08-07  0:47         ` Fāng-ruì Sòng
2021-08-07 13:15           ` H.J. Lu
2021-08-08  4:17             ` Fāng-ruì Sòng
2021-08-09 17:58               ` H.J. Lu
2021-08-09 19:58                 ` Fāng-ruì Sòng
2021-08-10 14:38                   ` H.J. Lu
2021-08-10 17:42                     ` Fāng-ruì Sòng
2021-08-10 22:19   ` Fangrui Song
2021-08-23  3:18     ` Fāng-ruì Sòng
2021-08-24 17:05       ` Fāng-ruì Sòng
2021-08-30 19:52         ` Fāng-ruì Sòng
2021-08-30 20:01           ` Adhemerval Zanella
2021-08-31 21:24             ` Fāng-ruì Sòng

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