Issue: save this empty program to main.c:
int main() { return 0; }
And build with:
clang main.c -fuse-ld=lld -o main1
and
clang main.c -fuse-ld=lld -o main2 -lX11
main1 will not have _end or _edata, but main2 will because
libX11.so.6 defines _end and _edata.
With this change, lld only defines _end and _edata if
they're actually used.