Compiled shared uClibc with another shared lib
Jate Sujjavanich
jsujjavanich at syntech-fuelmaster.com
Thu Jan 29 23:34:01 UTC 2009
I am attempting to generate a shared library using a custom compiled
uClibc.
I extracted the uClibc source from the CodeSourcery 4.2-153 archive, and
I was able to compile using a config file from the build script.
m68k-uclinux-gcc -nostdlib -mid-shared-library -mshared-library-id=3 -o
lib3.so \
$(ROOTDIR)/uClibc/lib/Scrt1.o $(ROOTDIR)/uClibc/lib/crti.o \
-Wl,--whole-archive ${OBJECTS} -Wl,--no-whole-archive \
-Wl,-R,$(ROOTDIR)/uClibc/lib/libc.gdb \
-lpthread -lgcc $(ROOTDIR)/uClibc/lib/crtn.o
The linker errors out with the following:
...uClibc/lib/Scrt1.o: In function `lib_main':
(.text+0x8): undefined reference to `__shared_flat_add_library'
Collect2: ld returned 1 exit status
The linker doesn't seem to know about the information from libc.gdb.
The previous way I've linked is with the builtin shared libc. That
method is successful.
- Jate S.
More information about the coldfire-gnu-discuss
mailing list