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: ld -e number makes an entry in symbol table


On Thu, Sep 10, 2009 at 06:28:40AM -0700, H.J. Lu wrote:
> On Wed, Sep 9, 2009 at 8:41 PM, Alan Modra<amodra@bigpond.net.au> wrote:
> > On Wed, Sep 09, 2009 at 08:50:23AM -0700, H.J. Lu wrote:
> >> On Wed, Sep 9, 2009 at 8:23 AM, Andreas Schwab<schwab@redhat.com> wrote:
> >> > This was broken by the patch for PR ld/6766.
> >>
> >> Here is a patch. ?OK to install?
> >
> > I obviously gave the OK for your PR6766 patch too quickly. ?I'm
> > inclined to think the whole patch should be reverted.
> >
> > Why should -e be any different from ENTRY() in a script?
> >
> 
> 1. You can only use symbol with ENTRY ().

Yes, that's a difference but I meant in the context of your PR6766
change.

> 2. "-e" is specified by user as the start address.

A user can supply a script with ENTRY.

> 3. "-e" overrides ENTRY ().

And -e overrides a previous -e.

My question was regarding -e implying -u.  If -e implies -u, then
shouldn't ENTRY imply EXTERN in a script?  If not, why not?
Because the default scripts have ENTRY, and these scripts are not user
input, but a command line switch is user input?  Ah, but ld is often
invoked by other tools, eg. gcc, passing all sorts of options that a
naive user never sees.  If gcc passes -e to ld is it still user input?
What if some IDE passes -e to ld?

-- 
Alan Modra
Australia Development Lab, IBM


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