[U-Boot-Users] -mrelocatable

Hello,
I'm currently upgrading a custom PPCBoot 1.1.5 port to U-Boot 1.0.0 for a custom 405GP-based board. At the same time, I thought it would be a good idea to upgrade my development system to SuSE 9.0 and tool chain to ELDK 3.0.
When I build U-Boot I get the following error when zlib.c is being compiled:
ppc_4xx-gcc -g -Os -mrelocatable -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE= 0xFFF80000 -I/home/ejf/u-boot/include -fno-builtin -ffreestanding -nostdinc -isy stem /home/ejf/eldk/usr/bin/../lib/gcc-lib/ppc-linux/3.2.2/include -pipe -DCONF IG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcp u=405 -msoft-float -Wall -Wstrict-prototypes -c -o zlib.o zlib.c {standard input}: Assembler messages: {standard input}:4998: Error: Relocation cannot be done when using -mrelocatable {standard input}:4999: Error: Relocation cannot be done when using -mrelocatable {standard input}:5000: Error: Relocation cannot be done when using -mrelocatable {standard input}:5001: Error: Relocation cannot be done when using -mrelocatable {standard input}:5002: Error: Relocation cannot be done when using -mrelocatable {standard input}:5003: Error: Relocation cannot be done when using -mrelocatable {standard input}:5004: Error: Relocation cannot be done when using -mrelocatable {standard input}:5005: Error: Relocation cannot be done when using -mrelocatable {standard input}:4969: Error: Relocation cannot be done when using -mrelocatable make[1]: *** [zlib.o] Error 1 make[1]: Leaving directory `/home/ejf/u-boot/lib_generic' make: *** [subdirs] Error 1
After doing a couple of quick Google searches, it appears that there might be some sort of bug in GCC. Does anyone know what the solution to this problem is?
I can build without the -mrelocatable flag. The board boots up but when it's time to run from RAM it crashes, probably because the resulting code is not relocatable.
Thanks for you help.
Eric
Eric FORSLIN P: 919-573-1353 E: eforslin@thalescomputers.com THALES Computers F: 919-231-8001 W: www.thalescomputers.com

In message 2A79E2756786D31182670000D11BFFBCC3405C@matrix2.thalescomputers.com you wrote:
I'm currently upgrading a custom PPCBoot 1.1.5 port to U-Boot 1.0.0 for a custom 405GP-based board. At the same time, I thought it would be a good idea to upgrade my development system to SuSE 9.0 and tool chain to ELDK 3.0.
When I build U-Boot I get the following error when zlib.c is being compiled:
This is a FAQ. Please see http://www.denx.de/twiki/bin/view/DULG/RelocationCannotBeDoneWhenUsingMreloc...
After doing a couple of quick Google searches, it appears that there might be some sort of bug in GCC. Does anyone know what the solution to this
This is NOT a GCC bug, it is an incompatibility witholder versions which has been fixed in current versions of U-Boot.
problem is?
The problem is your version of U-boot: it's too old.
I can build without the -mrelocatable flag. The board boots up but when it's time to run from RAM it crashes, probably because the resulting code is not relocatable.
Indeed.
Best regards,
Wolfgang Denk

--On Wednesday, April 07, 2004 4:17 PM -0400 "Forslin, Eric" eforslin@thalescomputers.com wrote:
Hello,
I'm currently upgrading a custom PPCBoot 1.1.5 port to U-Boot 1.0.0 for a custom 405GP-based board. At the same time, I thought it would be a good idea to upgrade my development system to SuSE 9.0 and tool chain to ELDK 3.0.
When I build U-Boot I get the following error when zlib.c is being compiled:
ppc_4xx-gcc -g -Os -mrelocatable -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE= 0xFFF80000 -I/home/ejf/u-boot/include -fno-builtin -ffreestanding -nostdinc -isy stem /home/ejf/eldk/usr/bin/../lib/gcc-lib/ppc-linux/3.2.2/include -pipe -DCONF IG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcp u=405 -msoft-float -Wall -Wstrict-prototypes -c -o zlib.o zlib.c {standard input}: Assembler messages: {standard input}:4998: Error: Relocation cannot be done when using -mrelocatable
Wolfgang posted a couple days ago that you can't build the latest U-Boot with old gcc tools. Perhaps you're not really using the latest compiler when you rebuild U-Boot? I see you have the latest toolchain, so make sure that your PATH is set up to actually use those new tools and U-Boot will build fine.
Jeff

In message <169996251.1081357990@[192.168.0.230]> you wrote:
Wolfgang posted a couple days ago that you can't build the latest U-Boot with old gcc tools. Perhaps you're not really using the latest compiler
This is WRONG.
It's vice versa: You cannot build OLD U-Boot sources with latest GCC.
Best regards,
Wolfgang Denk
participants (3)
-
Forslin, Eric
-
Jeff Tucker
-
Wolfgang Denk