Subject: Re: creating dynamic binaries
To: Ferry Sutanto <fsutanto@yahoo.com>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-help
Date: 02/23/2001 20:07:24
> This may not the appropriate place, but I want to
> compile my NetBSD binaries with dynamic linking. I
> have done the obvious thing like set LINKAGE=dynamic.
> But, when I 'ldd' the binaries, it still says that my
> binary still not a dynamic executable.

What binaries are you talking about, exactly? Where did you se
LINKAGE=dynamic?  What documentation are you following?

NetBSD binaries in /bin, /usr/bin, etc should contain (must contain)
statically linked binaries, and /usr/bin et al may contain dynamically
linked binaries, which is the default:

$ file /usr/bin/vi
/usr/bin/vi: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), stripped
$ file /bin/sync
/bin/sync: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, stripped

Binaries built outside the NetBSD source tree are by default
dynamically linked:

$ cat hello.c
#include <stdio.h>

int
main()
{
    printf("Hello, world\n");
    return 0;
}
$ cc -Wall -o hello hello.c
$ file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), not stripped
$ ./hello
Hello, world

> Any clue ??

Don't know the question yet ...

Regards,

Giles