This is the mail archive of the binutils@sources.redhat.com 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: --defsym foo=bar when bar is in libc


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


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