[gccsdk] Cross compiling shared libraries

Lee Noar leenoar at sky.com
Wed Dec 3 11:08:56 PST 2008

alan buckley wrote:


> The zlib makefile creates the shared library with:
> /home/riscos/cross/bin/arm-unknown-riscos-gcc -shared
>  -o libz.so. adler32.lo compress.lo crc32.lo gzio.lo
>  uncompr.lo deflate.lo trees.lo zutil.lo inflate.lo infback.lo
>  inftrees.lo inffast.lo -lc
> (all on one line)
> I then built the minigzipsh test program for testing.
> I copied the resulting libz.so. to SharedLibs:lib and
> created the symbolic links by hand with:
> ln -s libz/so/1/2/3/3 libz/so
> ln -s libz/so/1/2/3/3 libz/so/1
> When it tried to run the program I get:
> minigzipsh: 'SharedLibs:lib.libz/so' is missing the som___got symbol
> minigzipsh: can't load library 'libz.so'
> What have I done wrong/missed out?

You're using an out of date version of the dynamic loader 
(gcc4/riscos/soloader/dynamic/ld.so-1.9.9). GCC no longer generates the 
som___got symbol as the latest version of the dynamic loader doesn't 
need it any more. Rebuild the dynamic loader and copy it across to 


More information about the gcc mailing list