
Hello Ciaran,
You can search the mailing list archve for "libbfd" problems. The problem was seen on Debian systems too some time ago....
I am a student trying to get u-boot0.4.0 up and running on an
MPC8266ADS board using ELDK as a cross compiler. I managed to get the ELDK installed what seems to be problem free. I am trying to cross compile u-boot0.4.0 for the MPC8266ADS development board. I have a Host PC running Mandrake 9.1 which I notice is about the only distribution that eldk has not been tested with. Has anyone managed to get u-boot0.4.0 compiled on Mandrake or can anyone tell me what the problem is in the astest.o symbol at the end of the Makefile output below? There seems to be some problem with the /opt/eldk/ppc_82xx/usr/lib/libbfd.so. Previously I have used a hardhat cross-compiler and noticed that it was using /libbfd.a as opposed to /libbfd.so. Do I need to export the symbols from libbfd.so? Any help would be greatly appreciated...
HOSTARCH := ppc
ifndef CROSS_COMPILE ifeq ($(HOSTARCH),ppc) CROSS_COMPILE = /opt/eldk/usr/bin/ppc_82xx- else ifeq ($(ARCH),ppc) CROSS_COMPILE = ppc_8xx- endif
Huh, this means that if your _host_ is a PowerPC system and your want to compile code for PowerPC _target_ systems you use a cross-compiler? I don't think that's what you wanted to do.....
And in the ./tools/gdb/Makefile I have updated the path as follows:
astest: astest.o error.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ -L$(BFD_ROOT_DIR)/lib -L /opt/eldk/ppc_82xx/usr/lib -lbfd -liberty
[...]
gcc -Wall -pedantic -O -I/opt/eldk/ppc_82xx/include -I /opt/eldk/ppc_82xx/lib -o astest astest.o error.o -L/opt/eldk/ppc_82xx/lib -L /opt/eldk/ppc_82xx/usr/lib -lbfd -liberty /opt/eldk/ppc_82xx/usr/lib/libbfd.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status
AS you see, you are using the native compiler to compile astest.c while you want to use the library from the ELDK cross-compiler. Use the correct library or simply "touch tools/gdb/astest" as you're not likely to use this tool anyway.
Cheers Detlev