Subject: trouble building libc
To: None <port-arm32@netbsd.org>
From: Stefan Voss <voss@yoda.in-berlin.de>
List: port-arm32
Date: 12/13/1998 18:56:23
Hi folks,

I'm trying to build libc from current. The static version (libc.a)
builds fine but when buiding the shared version (libc.so.12.34) I get
the following output:

yoda:/usr/src/lib # make
all ===> libc
building shared c library (version 12.34)
ld -x -shared  -o libc.so.12.34    --whole-archive libc_pic.a --no-whole-archive   
ld: libc_pic.a(brk.so): relocation for internal symbol expected at 0x40
ld: libc_pic.a(sbrk.so): relocation for internal symbol expected at 0x38
glob.so: warning: reference to compatibility lstat(); include <sys/stat.h> to generate correct reference
glob.so: warning: reference to compatibility stat(); include <sys/stat.h> to generate correct reference
fts.so: warning: reference to compatibility stat(); include <sys/stat.h> to generate correct reference
fts.so: warning: reference to compatibility lstat(); include <sys/stat.h> to generate correct reference
ld: internal error: libc_pic.a(brk.so): claim_rrs_internal_gotslot at 0x40: no reservation
*** Error code 1

I noticed that brk.S and srbk.S were built as follows:

cc -D_LIBC -DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
-I/usr/src/lib/libc/include -DSOFTFLOAT -D__DBINTERFACE_PRIVATE
-DRESOLVSORT -DPOSIX_MISTAKE -DFLOATING_POINT -c -traditional-cpp
-DPIC -fpic -DPIC -DALL_STATE -I/usr/src/lib/libc/arch/arm32
/usr/src/lib/libc/arch/arm32/sys/sbrk.S -o sbrk.so 

This looks ok to me. -DPIC is used so why does the link fail?

Regards,
   Stefan

-- 
Stefan Voss
(voss@yoda.in-berlin.de)