
Dear Reinhard Meyer,
In message 4CA79896.2010606@emk-elektronik.de you wrote:
I agree here. _If_ relocation, it should work without hand-adding fixup stuff to all functions using initialized data with pointers. Even Wolfgang forgot to fixup his 2nd level command table in cmd_nvedit.c ;)
I didn't forget it - at least not in the sensse that I think this is something that needs to be done.
This works fine on PPC with relocation, and we should make it work the same on other arches.
And, for space concerns in flash, relocation should always be an option on a board by board basis...
NAK.
And as an idea, if position independent code is used, only pointers in initialized data need adjustment. Cannot the linker emit a table of addresses that need fixing?
It does. That's the GOT.
Best regards,
Wolfgang Denk