home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / unix / amiga / 823 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.8 KB  |  51 lines

  1. Newsgroups: comp.unix.amiga
  2. Path: yak.nstn.ns.ca!ecicrl!dingus!news
  3. From: hamish@border.ocunix.on.ca (Hamish Macdonald)
  4. Subject: Re: dynamic linking under Linux/68k
  5. X-Newsreader: Gnus v5.0.9
  6. Sender: hamish@dingus.border.ocunix.on.ca
  7. Organization: The Linux Border 
  8. Message-ID: <x6n34j3sca.fsf@dingus.border.ocunix.on.ca>
  9. References: <4kdrhl$346@mirv.unsw.edu.au>
  10. In-Reply-To: lester@cse.unsw.edu.au's message of 9 Apr 1996 14:17:25 GMT
  11. X-Nntp-Posting-Host: dingus.border.ocunix.on.ca
  12. Date: Thu, 11 Apr 1996 11:36:37 GMT
  13.  
  14. >>>>> On 9 Apr 1996 14:17:25 GMT,
  15. >>>>> In message <4kdrhl$346@mirv.unsw.edu.au>,
  16. >>>>> lester@cse.unsw.edu.au (Lester Gock-Young) wrote:
  17.  
  18. Lester> I'm using binutils-2.6, gcc-2.7.2, ld.so-1.7.12, libc-5.0.9
  19. Lester> installed over watchtower-fs.
  20.  
  21. Lester> ld seems to insist on linking my hello world program against
  22. Lester> libc.a rather than libc.so.5, causing it to be 50-odd K
  23. Lester> stripped. In contrast, the same piece of code is 2.5K stripped
  24. Lester> under Linux/i386!! Intel code is not *that* much more
  25. Lester> efficient that Motorola code, surely ...
  26.  
  27. Do you have a symbolic link called libc.so pointing to libc.so.5?
  28. This is required by the newer binutils (well, a link called libc.so to
  29. the library is required; whether it points to the library itself or
  30. the libc.so.5 link is your option).
  31.  
  32. bash$ ls -l /usr/lib/libc.so*
  33. lrwxrwxrwx   1 root     root           24 Dec 31 13:48 /usr/lib/libc.so -> ../../lib/libc.so.5
  34.  
  35. Lester> I then ran
  36.  
  37. Lester> strings -a hello | grep lib
  38.  
  39. Lester> and found no references to libc.so.5 or any other shared
  40. Lester> library. The Linux/i386 code had a reference to libc.so.5.
  41.  
  42. You know, "ldd hello" is a lot better test:
  43.  
  44. bash$ ldd /bin/sync /bin/bash
  45. /bin/sync:
  46.     statically linked (ELF)
  47. /bin/bash:
  48.     libncurses.so.3.0 => /lib/libncurses.so.3.0
  49.     libc.so.5 => /lib/libc.so.5.2.18
  50.  
  51.