* changing the entry point
@ 2006-10-19 15:14 Yannick Cote
2006-10-19 15:48 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Yannick Cote @ 2006-10-19 15:14 UTC (permalink / raw)
To: binutils
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
I hope this is the right place for that type of question,
Thanks,
- Yan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: changing the entry point
2006-10-19 15:14 changing the entry point Yannick Cote
@ 2006-10-19 15:48 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-10-19 15:48 UTC (permalink / raw)
To: Yannick Cote; +Cc: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-19 14:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19 15:14 changing the entry point Yannick Cote
2006-10-19 15:48 ` Daniel Jacobowitz
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).