
Dear Peter Tyser,
In message 1254872619.24664.3159.camel@localhost.localdomain you wrote:
Right, that's the current situation.
My suggestion was NOT to put the bss at a fixed _offset_ to the U-Boot image, but to a fixed absolute address. My hope is that this might simplify the linker scripts at the cost of adding a little code to the relocation routine - for addresses in the bss we would have to add a different relocation offset.
I think I see what you're getting at. If we have a bss-specific fixup routine I don't give a hoot where the bss is located at link time. Its just that that bss-aware fixup routine doesn't exist right now:)
Right!!! Now you got it. Ufff...
It seems like a clean solution. Adding a bss-aware fixup routine or putting the bss after the U-Boot image both seem good to me. The bss-aware fixup routine has a clearer readelf output and slightly more complicated code while the bss-after-uboot change has a misleading readelf output and simpler code. In any case I'd give a thumbs up to either of them.
My vote is for the first, because otherwise we will run into situations again and again where users and/or the linker get confused about overlapping sections and/or sections wrapping around the physical end of address space.
Best regards,
Wolfgang Denk