This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Mark __start/__stop symbols as PROTECTED in shared object
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 16 Aug 2017 10:20:01 +0930
- Subject: Re: [PATCH] Mark __start/__stop symbols as PROTECTED in shared object
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOq5vJzAw0-Quy-J_-UZH9tpoxa4jXWdks255nuFoph7zA@mail.gmail.com> <CAMe9rOpT8r7=GAadWc8WewhRcDifQiLeF7o-zNDeL0dhZZjC7g@mail.gmail.com>
On Mon, Aug 14, 2017 at 05:10:02PM -0700, H.J. Lu wrote:
> On Mon, Aug 14, 2017 at 4:53 PM, H.J. Lu <firstname.lastname@example.org> wrote:
> > When building shared objects, mark __start and __stop symbols as
> > PROTECTED and bind them as symbolic to support dlsym. Also override
> > __start, __stop, .startof. and .sizeof. symbols defined in a shared
> > object.
> > OK for master?
> > bfd/
> > PR ld/21964
> > * elf-bfd.h (SYMBOLIC_BIND): TRUE for __start/__stop symbols.
> > * elflink.c (bfd_elf_define_start_stop): Override symbol defined
> > in a shared object. Mark __start/__stop symbols as PROTECTED in
> > shared objects.
> No need to mark them as protected when bind them symbolic.
I think you should be making these symbols protected visibility.
Australia Development Lab, IBM