
On Thu, 2008-07-24 at 11:26 -0700, vb wrote:
On Thu, Jul 24, 2008 at 11:09 AM, Kenneth Johansson kenneth@southpole.se wrote:
I have run u-boot with everything compiled with -mrelocatable and normal relocation fixup code removed so I know it works fine. So consider it proven. But since it apparently is a problem in some situation the best is probably to make it a configuration option.
From what I saw in my limited experiment, there is no code (as in CPU instructions) generated by gcc, just a data section containing offsets.
Maybe the linker is supposed to add some code to the startup file to handle that section in case it is invoked with -mrelocatable (on't know if it would recognize this an option) or detects .fixup section in the .o files being linked. It is a mute point for embedded development anyways.
I think the code exist in libgcc __eabi_convert() but code already exist in u-boot at least in several start.S files.
I *think* the only thing missing is a simple function to scan the .fixup table and fix the pointers after relocation.
The code should be there find . -name "*.S" | xargs grep FIXUP_TABLE