Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-compile problem (continued)



Ken Yap wrote:

> >$ nm /lib/libc.so | grep inet_ntoa
> >00030544 T inet_ntoa
> >
> >So where is it getting __inet_ntoa from (with two leading
> underscores)?
> >Also, how can I check whether 'libc.so' is being linked in?
>
> Do you perhaps have a mix of a.out and ELF libraries? Check the output
>
> of ldconfig -p.

Okay, I'll try that.

Nope, all ELF libraries.

Does anyone know why it's attempting to link in the inet_ntoa with two
leading underscores. I seem to remember something about using two
leading underscores on assembler subroutines that are to be called from
C programs, from when I used to do DOS development. The reason was that
when the object files are created from the C compiler, all functions are
automatically prefixed with two leading underscores. Is this the same
case under Unix?

Is the actual problem to do with the linker not actually finding/using
'libc' for some reason? How would you find out?

Apologies for asking so many questions, but I find all this
assembler/compiler/linker stuff interesting, and am learning a lot from
playing around. As I am always building packages from source, it would
be nice to think I might be able to put some help back in, one day, when
things go wrong for someone else.

TIA,

--
Ross Golder
Technical Dept
CPD Ltd, Whetstone, London, N20 9LD.
Tel: +44 (0) 973 897671
mailto:rossg@cpd.co.uk (Work)
http://www.cpd.co.uk/~rossg




For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.