NKEs and Static Libs
NKEs and Static Libs
- Subject: NKEs and Static Libs
- From: Michael Cashwell <email@hidden>
- Date: Fri, 20 Sep 2002 15:00:36 -0400
Greetings everyone,
Suspecting that my problem is a tools issue (either a bug or incorrect
usage) I first went to the PB list. But it seems the NKE's special
needs are apparently significant and someone with more knowledge of
that is required. So now I'm trying on this list.
For reasons of code factoring (and limiting the distribution of some
sensitive source code) I'm trying to build an NKE with a portion of it
coming from a static library. After some difficulty I think I have the
library (done via Project Builder's new Library target assistant)
building correctly. But the final link of the NKE is failing with a
strange error message. The error initially was:
ld:
/Users/cashwell/Documents/dev/Drop5/odShimMac4/bin/Debug/darwin/
libnetShim.a(init.o) incompatible, file contains unsupported type of
section 6 (__TEXT,__picsymbol_stub) in load command 0 (must specify
"-dynamic" to be used)
/usr/bin/g++3 -o
"/Users/cashwell/Documents/dev/Drop5/odShimMac4/netShim/../bin/Debug/
darwin/netShim.kext/Contents/MacOS/netShim"
"-L/Users/cashwell/Documents/dev/Drop5/odShimMac4/netShim/../bin"
"-L/Users/cashwell/Documents/dev/Drop5/odShimMac4/bin/Debug/darwin"
"-F/Users/cashwell/Documents/dev/Drop5/odShimMac4/netShim/../bin"
-filelist
"/Users/cashwell/Documents/dev/Drop5/odShimMac4/netShim/../bin/_tmp/
00netShim.build/netShim.build/Objects-normal/LinkFileList" "-lnetShim"
"-arch" "ppc" "-static" "-nostdlib" "-r" "-lkmodc++" "-lkmod"
"-lcc_kext"
Seeing the "pic" reference in the error, on a lark I added "-fno-pic"
to the library. With that the error becomes:
ld:
/Users/cashwell/Documents/dev/Drop5/odShimMac4/bin/Debug/darwin/
libnetShim.a(init.o) incompatible, file contains unsupported type of
section 5 (__DATA,__nl_symbol_ptr) in load command 0 (must specify
"-dynamic" to be used)
I'm at a loss here. Can someone point me to the problem? I just want to
link a static library into an NKE.
Thanks,
Mike
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.