llvm-project/lld/test
Fangrui Song 6d2d3bd0a6 [ELF] Default to -z start-stop-gc with a glibc "__libc_" special case
Change the default to facilitate GC for metadata section usage, so that they
don't need SHF_LINK_ORDER or SHF_GROUP just to drop the unhelpful rule (if they
want to be unconditionally retained, use SHF_GNU_RETAIN
(`__attribute__((retain))`) or linker script `KEEP`).

The dropped SHF_GROUP special case makes the behavior of -z start-stop-gc and -z
nostart-stop-gc closer to GNU ld>=2.37 (https://sourceware.org/PR27451).

However, we default to -z start-stop-gc (which actually matches more closely to
GNU ld before 2015-10 https://sourceware.org/PR19167), which is different from
modern GNU ld (which has the unhelpful rule to work around glibc). As a
compensation, we special case `__libc_` sections as a workaround for glibc<2.34
(https://sourceware.org/PR27492).

Since -z start-stop-gc as the default actually matches the traditional GNU ld
behavior, there isn't much to be aware of. There was a systemd usage which has
been fixed by https://github.com/systemd/systemd/pull/19144
2021-04-16 12:18:46 -07:00
..
COFF [COFF] Simplify ICF associated comdat handling 2021-04-14 10:40:16 -07:00
ELF [ELF] Default to -z start-stop-gc with a glibc "__libc_" special case 2021-04-16 12:18:46 -07:00
MachO [lld-macho] Make load relaxation work for arm64_32 2021-04-15 21:16:34 -04:00
MinGW [LLD] [MinGW] Pass the --demangle and --no-demangle options to the COFF linker 2021-01-07 10:02:19 +02:00
Unit Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00
darwin [lld-macho] Switch default to new Darwin backend 2021-03-01 12:30:10 -05:00
mach-o [lld-macho] Switch default to new Darwin backend 2021-03-01 12:30:10 -05:00
wasm [lld][WebAssembly] Rewrite exports test in assembly. NFC 2021-04-05 11:14:12 -07:00
CMakeLists.txt [lld-macho] Sibling N_SO symbols must have the empty string 2021-04-07 12:08:14 -04:00
lit.cfg.py [LLD] Fix probing a MSYS based 'tar' in a Windows Container 2021-03-25 09:45:27 +02:00
lit.site.cfg.py.in [test] Add ability to get error messages from CMake for errc substitution 2021-03-15 20:56:08 +01:00