This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld -e number makes an entry in symbol table
On Thu, Sep 10, 2009 at 08:37:20AM -0700, H.J. Lu wrote:
> By "user", I meant the user of linker, like programmer, compiler, .....
>
> When "-e SYMBOL" is passed to linker, SYMBOL should be used
> as the entry point. If SYMBOL doesn't exist, something is wrong.
> ENTRY is defined in the linker scripts, which may be independent
> of the user.
IMO, if your linker script has an entry point that your application
doesn't, you've done something wrong. Are there any known widespread
cases of this problem?
I'd suggest that, rather than ENTRY implying EXTERN, the finally
selected entry point is treated as an extern. So if the linker script
says ENTRY(foo) and the command line says -e bar, we don't need foo.
--
Daniel Jacobowitz
CodeSourcery