Subject: Can't build static binary with new crt* stuff
To: None <tech-toolchain@netbsd.org>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-toolchain
Date: 11/30/2002 00:47:18
Hi,

I have problem with building ldd_elf as a static binary:

$ cd /usr/src/usr.bin/ldd/ldd_elf
$ make MKDYNAMICROOT=no
...
/usr/src/tools/obj/tools.NetBSD-1.6K-i386/bin/i386--netbsdelf-gcc  -static -o ldd -nostdlib  /usr/lib/crt0.o /usr/lib/crtbegin.o ldd.o xmalloc.o debug.o map_object.o load.o search.o headers.o paths.o  -L/usr/lib  -lgcc -lc -lgcc /usr/lib/crtend.o
/usr/lib/crt0.o: In function `___start':
/usr/lib/crt0.o(.text+0x97): undefined reference to `_fini'
/usr/lib/crt0.o(.text+0xa1): undefined reference to `_init'
collect2: ld returned 1 exit status
*** Error code 1

Stop.
make: stopped in /usr/src/usr.bin/ldd/ldd_elf

Any clues?

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>