
Dear Tim Kryger,
In message loom.20110214T194343-739@post.gmane.org you wrote:
My memory map is fixed but my board specific U-Boot code is still under development and if I can't guarantee the address U-Boot is loaded will be exactly the same as the computed address I am in trouble. If it changes ever so slightly, I could find myself in the situation where U-Boot tries to relocate on top of itself which would be much worse than the current inefficient but safe relocation.
Please be careful in the use of terms. It appears you are using "relocating" when you actually mean "copying". Keep in mind that these are two very different operations.
I am considering creating a linker directives script for my board that will align the end of BSS to the next larger power of two from its current address. This doesn't seem like the cleanest solution but it I believe it would allow me to make code changes without too much fear of causing a change to the relocation address. Do you think this would be a reasonable approach to take?
Note that there is no guarantee that such an approach will continue to work in future releases. Also note that you will then have to maintain your own linker script and keep it in sync with all other changes - which just adds maintenance efforts.
Why exactly do you care about this? What is the problem you're trying to address?
Best regards,
Wolfgang Denk