public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Michael Matz <matz@suse.de>
Cc: Alan Modra <amodra@bigpond.net.au>, binutils@sources.redhat.com
Subject: Re: RFC: Add dynamic list to version script
Date: Wed, 09 Aug 2006 16:25:00 -0000	[thread overview]
Message-ID: <20060809161929.GA4065@lucon.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0608091639110.25141@wotan.suse.de>

On Wed, Aug 09, 2006 at 04:45:42PM +0200, Michael Matz wrote:
> 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 

It should be:

The symbols not specified as dynamic symbols should be bound locally,
But the symbols specified as dynamic symbols, exported for others to 
link against, can be bound locally or dynamically.

> read in elflink.c it seems that it's doing something more?

We have 2 things going on here:

1. If a symbol should be visible to outside. That affects
dynamic symbol table.
2. If a symbol should be bound locally. That affects dynamic
relocation.

--verion-script will decide #1 for shared library.
--dynamic-list will decide #1 for executable and #2 for
shared library.


H.J.

      parent reply	other threads:[~2006-08-09 16:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 22:27 H. J. Lu
2006-07-25 12:53 ` Ulrich Drepper
2006-07-25 13:49   ` H. J. Lu
2006-07-25 14:04     ` Ulrich Drepper
2006-07-25 14:36       ` H. J. Lu
2006-07-25 14:49         ` Ulrich Drepper
2006-07-26 16:42 ` Michael Matz
2006-07-27 17:11   ` H. J. Lu
2006-07-28 13:14     ` Michael Matz
2006-07-28 17:40       ` H. J. Lu
2006-07-28 17:59         ` Ulrich Drepper
2006-07-28 18:05           ` H. J. Lu
2006-08-08 17:22         ` H. J. Lu
2006-08-08 18:49           ` Michael Matz
2006-08-09 20:36             ` PATCH: Add --dynamic-list to ld H. J. Lu
2006-09-07 15:28               ` Nick Clifton
2006-09-07 19:41                 ` H. J. Lu
2006-09-08  8:17                   ` Nick Clifton
2006-10-10 15:50                 ` [PATCH] Fix --dynamic-list Jakub Jelinek
2006-10-11 15:39                   ` Nick Clifton
2006-10-16 22:45                     ` H. J. Lu
2006-10-18 18:19                       ` Nick Clifton
2006-08-09  2:02           ` RFC: Add dynamic list to version script Alan Modra
2006-08-09 16:05             ` Michael Matz
2006-08-09 16:19               ` Alan Modra
2006-08-09 17:40                 ` H. J. Lu
2006-08-09 16:25               ` H. J. Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060809161929.GA4065@lucon.org \
    --to=hjl@lucon.org \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=matz@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).