Subject: How to build shared libs ? (was: Problems compiling)
To: NetBSD ARM 32 mailinglist <port-arm32@NetBSD.ORG>
From: None <Peter.Berg@ww.tu-freiberg.de>
List: port-arm32
Date: 02/07/1998 10:49:18
> Finally, I went back to something easier and compiled xsysstats. It com=
piles
> and it does work using the 'standard' gcc flags but if I try "-fpic -DP=
IC" or
> "-fPIC" it seems to suffer from the same problems as the Lesstif progra=
ms
> (Segmentation fault)... is -fpic working? =
> ld sometimes reports some "RSS relocation of text" (or something like t=
hat, I
This (I guess) happens if you link static and dynamic libs together to a =
program. I found this too, but if you read the messages carefully you'll =
see =
that always something like
'ld: ./libgFX.a(resize.o): RRS text relocation at 0x2e90 for "___sF"'
is reported, isn't it ?
But this now points me to another problem: How do I build a shared lib ?
The linux style way doesn't seem to work:
cc -s -shared -Wl,-soname,libgFX.so.0 -o libgFX.so.0 $(LOBJS)
it aborts with
ld: libgFX.so.0: No such file or directory
*** Error code 1
Any ideas ?
-- =
/--------------------------------------------------------------------\
| Peter Berg email: Peter.Berg@ww.tu-freiberg.de |
| http://riscbsd.home.ml.org |
\--------------------------------------------------------------------/