This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 0/2] Define _edata, __bss_start, and _end only for executables
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 5 Jun 2018 19:21:21 -0700
- Subject: Re: [PATCH 0/2] Define _edata, __bss_start, and _end only for executables
- References: <20180605124807.22990-1-hjl.tools@gmail.com>
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.