Date: Mon, 28 May 2018 21:03:07 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 228574] GNU ld doesn't emit _end when linking with lld-linked libc.so Message-ID: <bug-228574-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228574 Bug ID: 228574 Summary: GNU ld doesn't emit _end when linking with lld-linked libc.so Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: markj@FreeBSD.org One difference between a GNU ld-linked libc.so and an lld-linked libc.so is that the former's _end symbol's section index is SHN_ABS, while the latter'= s is that of the bss section. For some reason, GNU ld won't emit an _end symbol = when creating an executable linked with an lld-linked libc. This results in libc= 's internal definition being used for curbrk, which is wrong and breaks brk() = and sbrk(). As an experiment, I hacked lld to emit _end with a section index of SHN_ABS, and used it to link libc.so. Using that, GNU ld behaves as desired. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-228574-227>