This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Add dynamic list to version script


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.  Extra fields unnecessarily complicate the code and
in this case increase the size of the struct.  I'm almost certain you
haven't found all places that will need to deal with your new field.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]