[openbeosnetteam] Re: libnet fix

  • From: "Philippe Houdoin" <philippe.houdoin@xxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Wed, 18 Jun 2003 18:44:21 GMT

> Like many other people, I too had a problem with the _res missing
> symbol. I traced it to the point that it was redefined by libnet, in
> resolv.conf, 

You mean he's defined by current/headers/posix/resolv.h, and 
declared in current/src/kits/network/libnet/res_init.c, right?

> and I have the feeling that it clashed with a definition
> outside libnet (probably the BeOS R5 libroot, I haven't looked at it
> yet, because I only thought of it now). 

Sorry, I'm slow, but in a previous message, you report this linker 
error message:
---- 8< ---------------------
/boot/develop/tools/gnupro/bin/ld: Warning: size of symbol `_res'
changed from 512 to 376 in /boot/develop/lib/x86/libnet.so     
---- 8< ---------------------

Can you tell me on which target this error, well, warning, raise?

I suspect that, for strange(s) reason(s), the bin tools seems to be 
linked against 
the BeOS R5 libnet.so (net_server's) instead of *our* libnet.so.
I don't have this link error here, but I build on a BONE system, where 
your system is net_server based, right?
_res symbol is an internal symbol, unless libroot.so need him for 
hostname()?

It's obvious our resolver implementation, coming from BSD, is different 
from BeOS R5 one.
It's no suprise that our _res data size is different than R5 libnet.so 
one...
Under a BONE system, his libnet.so don't export a _res symbol, which 
explain why I don't get clash link error I guess.

Anyway, our net apps shoudl link against *our* libnet.so, not the BeOS 
one...

Last, '_res' is an internal symbol, only used by the resolver 
functions, which all are in libnet.so (except under BONE, where they're 
in libbind.so, but we don't want to reproduce that), so I don't see why 
large numbers of apps 
expect to find him in libnet.so!
Anyone having an explanation here?

> Anyway, I've changed all the
> _res in the libnet source to the more meaningful (and less probable 
> of
> clashing) name _resolver_configuration. Now all the utilities work, 
> and
> when it doesn't work now, it's a real bug! May I commit?  

Go, it should not hurt.

BTW, congratulations for fixing your read errors in your rtl8139 
driver.
When you'll feel ready, tell me, I'll post a news to annouce this 
driver on OpenBeOS web site...

 
-Philippe

--
Fortune Cookie Says:

i'm living so far beyond my income that we may almost be said to be
living apart.
                -- e. e. cummings


Other related posts: