
--- a/cpu/mpc85xx/u-boot.lds.S +++ b/cpu/mpc85xx/u-boot.lds.S @@ -131,6 +131,14 @@ SECTIONS
. = RESET_VECTOR_ADDRESS + 0x4;
- /*
- Make sure that the bss segment doesn't start at 0x0, otherwise its
- address won't be updated during relocation fixups
- */
+#if !((RESET_VECTOR_ADDRESS + 0x4) & 0xffffffff)
This seems to be a pretty complicated way of writing
#if (RESET_VECTOR_ADDRESS == 0xFFFFFFFC)
?
Good point.
- . |= 0x10;
I'm not sure if all this is always doing what we want, or if it's always working the same way. When building on 32 bit machines, dot will wrap around for "0xFFFFFFFC + 4" and result in 0; ". |= 0x10" makes it 0x10 then.
When built using a 64 bit host, 0xFFFFFFFC + 4 = 0x100000000, and the OR makes it 0x100000010. But here this OR was not needed.
The 64-bit addresses will need to be truncated to 32-bits when the u-boot ELF is actually generated, so I think we'd get 0x10 when building on a 32 or 64 bit machine. I'll verify.
Best, Peter