This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: changing the entry point
On Thu, Oct 19, 2006 at 10:07:40AM -0400, Yannick Cote wrote:
> Hi there,
>
> I am trying to find an explaination on why "ld -e myfunc ..." works if
> "myfunc" is in a .o file but will fail when the function is in an
> archive .a file.
>
> The ld output will look like this (in the case of linking against an
> archive .a file):
>
> ld: warning: cannot find entry symbol myfunc; defaulting to 00010000
Try "-e myfunc -u myfunc", which will force the symbol to be pulled in
to the binary. Symbols from archives are only selected if there is an
undefined reference to them.
Generally, perhaps -e ought to imply -u...
--
Daniel Jacobowitz
CodeSourcery