Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [06-2003 Date Index] [Date Next] || [Thread Prev] [06-2003 Thread Index] [Thread Next]

[openbeosnetteam] Re: libnet fix

  • From: "Marcus Overhagen" <ml@xxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Wed, 18 Jun 2003 23:34:35 GMT
> On Wed, 18 Jun 2003 21:07:58 +0200 "Niels Reedijk" <n.reedijk@xxxxxxxxx
> > wrote:
> > 
> > The symbol is in the R5 libnet.so. This is getting fishy. Ingo, is 
> > there
> > perhaps something wrong with the link rule?
> 
> Do you by any chance use an outdated version of Jam? IIRC the original 
> port of Jam did for any reason link everything against libnet.so.
> 
> BTW, you can pass `-d2' to jam to make it print the invoked commands, 
> which should help to solve the problem.

While the rename of the _res symbol might fix this issue, I would
prefere to know why this is necessary.

The BeOS R5 libnet.so has a "D" type (don't know what "D" means, but "T" is 
export, and "U" is import)
 symbol called _res, while our libnet.so only has a "U", that's why the symbol 
is missing when applications
are run (type should be "T").

I don't know why the ld decides to make the symbol "U" instead of "T".

$ ld --version
GNU ld 2.11
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   elf_i386_be
$ 
$ /boot/home/config/bin/ld --version
GNU ld 2.11
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   elf_i386_be
$ 
$ nm  /boot/develop/lib/x86/libnet.so | grep _res
0000cef4 T __resp
00014bc0 D _res
00014b3c D _res_opcodes
00014b7c D _res_resultcodes
00014d40 d _resi
$ nm  
/boot/home/develop/openbeos/current/distro/x86.R1/beos/system/lib/libnet.so | 
grep _res
0000af48 T __fp_resstat
000102d4 T __res_close
0000a604 T __res_dnok
0000a4d8 T __res_hnok
0000f700 T __res_isourserver
0000a590 T __res_mailok
0000f798 T __res_nameinquery
0000eb38 T __res_opt
0000a554 T __res_ownok
0000f884 T __res_queriesmatch
0000f58c T __res_randomid
0000f988 T __res_send
         U _res
000125d0 D _res_opcodes
00012610 D _res_resultcodes
0001e630 b ru_reseed
$  

Link distro/x86.R1/beos/system/lib/libnet.so

gcc  -nostart -Xlinker -soname="libnet.so"  -o 
"distro/x86.R1/beos/system/lib/libnet.so"   
"objects/x86.R1/kits/network/libnet/socket.o" 
"objects/x86.R1/kits/network/libnet/select.o" 
"objects/x86.R1/kits/network/libnet/poll.o" 
"objects/x86.R1/kits/network/libnet/compat.o" 
"objects/x86.R1/kits/network/libnet/arc4random.o" 
"objects/x86.R1/kits/network/libnet/base64.o" 
"objects/x86.R1/kits/network/libnet/ethers.o" 
"objects/x86.R1/kits/network/libnet/freeaddrinfo.o" 
"objects/x86.R1/kits/network/libnet/inet_addr.o" 
"objects/x86.R1/kits/network/libnet/inet_ntoa.o" 
"objects/x86.R1/kits/network/libnet/inet_neta.o" 
"objects/x86.R1/kits/network/libnet/inet_netof.o" 
"objects/x86.R1/kits/network/libnet/inet_lnaof.o" 
"objects/x86.R1/kits/network/libnet/inet_network.o" 
"objects/x86.R1/kits/network/libnet/inet_pton.o" 
"objects/x86.R1/kits/network/libnet/inet_ntop.o" 
"objects/x86.R1/kits/network/libnet/getaddrinfo.o" 
"objects/x86.R1/kits/network/libnet/gethostnamadr.o" "ob!
 jects/x86.R1/kits/network/libnet/getnameinfo.o" 
"objects/x86.R1/kits/network/libnet/getnetbyaddr.o" 
"objects/x86.R1/kits/network/libnet/getnetbyname.o" 
"objects/x86.R1/kits/network/libnet/getnetnamadr.o" 
"objects/x86.R1/kits/network/libnet/getprotoname.o" 
"objects/x86.R1/kits/network/libnet/getnetent.o" 
"objects/x86.R1/kits/network/libnet/getproto.o" 
"objects/x86.R1/kits/network/libnet/getprotoent.o" 
"objects/x86.R1/kits/network/libnet/getservent.o" 
"objects/x86.R1/kits/network/libnet/getservbyname.o" 
"objects/x86.R1/kits/network/libnet/getservbyport.o" 
"objects/x86.R1/kits/network/libnet/linkaddr.o" 
"objects/x86.R1/kits/network/libnet/res_comp.o" 
"objects/x86.R1/kits/network/libnet/res_data.o" 
"objects/x86.R1/kits/network/libnet/res_debug.o" 
"objects/x86.R1/kits/network/libnet/res_init.o" 
"objects/x86.R1/kits/network/libnet/res_mkquery.o" 
"objects/x86.R1/kits/network/libnet/res_query.o" 
"objects/x86.R1/kits/network/libnet/res_random.o" "objects/x86.R1/kits/ne!
 twork/libnet/res_send.o" "objects/x86.R1/kits/network/libnet/sethost
ent.o"    ;

/boot/home/config/bin/ld: Warning: size of symbol `_res' changed from 512 to 
376 in /boot/develop/lib/x86/libnet.so


very strange.
Marcus







[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.