OpenSSH 3.7.1p2 linked libs
Darren Tucker
dtucker at zip.com.au
Sun Feb 15 16:26:00 EST 2004
Damien Miller wrote:
> On Sat, 14 Feb 2004, Georg Schwarz wrote:
>>OpenSSH (at least on IRIX) uses -lgen in LIBS. This is only needed (and
>>thus should only be used) for linking sshd. Using -lgen elsewhere
>>unnecessarily adds code and dependencies.
>>Similarly, -lcrypto is not needed when linking scp.
>
>
> The linker should ignore unnecessary dependancies, shouldn't it?
It doesn't (on Linux anyway, I suspect it's the same on other systems).
That said, it's already tricky to get the library path and link order
right on all supported configurations, and I would not like to see it
made harder by maintaing different ones for different binaries.
Georg, does this cause an actual problem? libgen is part of the base
OS, right? Also, there's no noticable difference in size on Linux.
$ cat hello.c
#include <stdio.h>
int main(void) { puts("Hello, world."); }
$ gcc hello.c -lcrypto
$ ldd a.out
libcrypto.so.4 => /lib/libcrypto.so.4 (0x40028000)
libc.so.6 => /lib/libc.so.6 (0x4011f000)
libdl.so.2 => /lib/libdl.so.2 (0x40246000)
libz.so.1 => /usr/lib/libz.so.1 (0x40249000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list