> On 18 Nov 2021, at 23:27, Fangrui Song wrote: > > (For newly CCed Linux distro folks, sorry for hijacking you here. Scroll > to the end for my request from you.) > > [snip] > CCed a bunch of Linux distro folks (Arch/Debian/Gentoo/Void). > > * ld.lld is not a default linker on most Linux distros. > * ld.lld --pack-dyn-relocs=relr is an opt-in feature. > * --pack-dyn-relocs=relr is difficult to misuse because GNU ld doesn't support it. > * binutils may get relr support one day, but may take several releases. > * Nobody will switch the GCC/Clang default any time soon. > * Coping the new executable to an old glibc system is unsupported. > > By enabling DT_RELR in upstream glibc, the Linux distros will get the > glibc feature with ZERO overhead in their downstream packaging. Then, a > user opting in ld.lld --pack-dyn-relocs=relr will have smaller > executables. When GNU ld finally gets the feature, the benefit will > reach more users. So why not having the feature to make the future > feature enablement smoother? FWIW, from our perspective in Gentoo (but it should apply to most/all Linux distros), there's really no difference as long as the default isn't changed yet. People are, as always, free to use custom flags and must understand their implications, but they need to be careful when building on _any_ distro in _any_ environment anyway: obviously building with newer glibc affects one's ability to run binaries on older targets with an older glibc. It's not a new issue in that regard. best, sam