[PATCH 0/2] Define _edata, __bss_start, and _end only for executables
H.J. Lu
hjl.tools@gmail.com
Wed Jun 6 02:21:00 GMT 2018
On Tue, Jun 5, 2018 at 5:48 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> _edata, __bss_start, and _end are defined for executables. FreeBSD's
> libc.so uses executable's _end to initialize curbrk. But there is no
> good reason to access values of _edata, __bss_start, and _end defined
> in shared libraries. We should define _edata, __bss_start, and _end
> only for executables. To exclude _edata, __bss_start, _end and end
> from shared libraries, EXCLUDE_SHLIB_SYMBOLS should be set.
>
> This series of patches sets EXCLUDE_SHLIB_SYMBOLS for x86 ELF targets.
> There are no regressions on
>
> aarch64-linux
I withdrew this series of patches since in glibc, ld.so has
/* These defined magically in the linker script. */
extern char _begin[] attribute_hidden;
extern char _etext[] attribute_hidden;
extern char _end[] attribute_hidden;
it can't reference _end defined in executables.
--
H.J.
More information about the Binutils
mailing list