This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Add dynamic list to version script
- From: Michael Matz <matz at suse dot de>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: "H. J. Lu" <hjl at lucon dot org>, binutils at sources dot redhat dot com
- Date: Wed, 9 Aug 2006 16:45:42 +0200 (CEST)
- Subject: Re: RFC: Add dynamic list to version script
- References: <20060724221020.GA22024@lucon.org> <Pine.LNX.4.64.0607261822590.25141@wotan.suse.de> <20060727171133.GA14609@lucon.org> <Pine.LNX.4.64.0607281452000.25141@wotan.suse.de> <20060728174040.GA24620@lucon.org> <20060808165950.GA27903@lucon.org> <20060809012831.GC6370@bubble.grove.modra.org>
Hi,
On Wed, 9 Aug 2006, Alan Modra wrote:
> On Tue, Aug 08, 2006 at 09:59:50AM -0700, H. J. Lu wrote:
> > + binding_stays_local_p = (info->executable
> > + || info->symbolic
> > + || (info->dynamic && !h->dynamic));
>
> > +@kindex --dynamic-list=@var{dynamic-list-file}
> > +@item --dynamic-list=@var{dynamic-list-file}
> > +Specify the name of a dynamic list file to the linker. This is
> > +typically used when creating shared libraries to specify a list of
> > +global symbols whose references shouldn't be bound to the definition
> > +within the shared library, or creating dynamically linked executables
> > +to specify a list of symbols which should be added to the symbol table
> > +in the executable. This option is only meaningful on ELF platforms
> > +which support shared libraries.
>
> Your documentation doesn't agree with what the patch does. In a
> previous email you said
>
> > It will bind all symbols locally except for those on the dynamic list.
>
> which is quite different to the description in ld.texinfo. Please fix.
> Also, if you really mean that if --dynamic-list is specified then all
> symbols not on the dynamic list will be local, please rewrite the patch
> to use forced_local rather than adding a new field to
> elf_link_hash_entry.
I don't know what forced_local semantics are exactly, so forgive me if I'm
spelling out the obvious: the symbols not specified as dynamic symbols
should be bound locally, but they should still be exported, for others to
link against. If that is what forced_local does, nice, but from what I
read in elflink.c it seems that it's doing something more?
Ciao,
Michael.