
Hello,
in message 4549B883.7050309@aotek.es you wrote:
Looking into the sources we have found some places where the fixup elements seem to be relocated manually, i.e.:
Yes, all statically initialized pointers need to be relocated manually.
Is there any reason to leave the FIXUP section empty in U-Boot? Is it a bug?.
This is probably a side-effect of my limited untestanding of the linker magic. Please feel free to call it a bug.
Checking the u-boot.lds file for the IceCube board we have found that fhe fixup section is included in the TEXT section and in the RELOC section, but the linker generate code only for the TEXT section. If we put it only in the RELOC section the FIXUP is not empty, the pointers adjustement in the start.S seems to work properly and the malloc_bin_reloc() function would be not necessary. Does anynone know if I'am missing something?
Most probably you know more about these things than me, so any fix to make relocation simpler and more reliable are welcome.
Best regards,
Wolfgang Denk