This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: --defsym foo=bar when bar is in libc
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Shaun Jackman <sjackman at pathwayconnect dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 02 Aug 2003 10:44:20 +0930
- Subject: Re: --defsym foo=bar when bar is in libc
- References: <1059753987.4691.9.camel@bluesteel.pathway>
On Fri, Aug 01, 2003 at 10:06:27AM -0600, Shaun Jackman wrote:
> An object file foo.o has an undefined reference to the symbol foo. I'm
> trying to use --defsym foo=puts to fix the reference. If puts is used
> anywhere else in foo.o this works fine. So, I tried to pull in puts by
> adding '-u puts', but no luck. How do I pull in a symbol from libc for
> use with --defsym?
You can't. Calls to functions in shared libs need special code
inserted by the linker.
--
Alan Modra
IBM OzLabs - Linux Technology Centre