Bug 26558 - [meta] Build glibc with LLD
Summary: [meta] Build glibc with LLD
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 26559
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-31 23:19 UTC by Fangrui Song
Modified: 2020-09-01 14:25 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2020-09-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2020-08-31 23:19:30 UTC
Some known issues:

* elf/librtld.map.o uses a subtle property of --defsym: https://sourceware.org/pipermail/libc-alpha/2020-April/112732.html
* ld.lld --verbose does not print a linker script and ld.lld --print-output-format is not supported: https://sourceware.org/pipermail/libc-alpha/2020-April/112733.html
* Neither clang nor LLD may support the semantics of .tls_common https://sourceware.org/pipermail/libc-alpha/2020-April/112734.html
Comment 1 H.J. Lu 2020-09-01 12:41:11 UTC
(In reply to Fangrui Song from comment #0)
> Some known issues:
> 
> * elf/librtld.map.o uses a subtle property of --defsym:
> https://sourceware.org/pipermail/libc-alpha/2020-April/112732.html

Since --defsym in ldd is incompatible with glibc build, --defsym should be
poisoned for glibc build.

> * ld.lld --verbose does not print a linker script and ld.lld
> --print-output-format is not supported:
> https://sourceware.org/pipermail/libc-alpha/2020-April/112733.html
> * Neither clang nor LLD may support the semantics of .tls_common
> https://sourceware.org/pipermail/libc-alpha/2020-April/112734.html

This is used to implement STT_COMMON.  Do clang/LLD support STT_COMMON?
Comment 2 H.J. Lu 2020-09-01 13:08:10 UTC
I think you should make your glibc branch for lld available so that people
can give it a try.
Comment 3 H.J. Lu 2020-09-01 14:25:25 UTC
Before lld can be accepted for glibc build, it must generate the same set
of failures in glibc testsuite with binutils 2.35 at least on i686 and x86-64.