[U-Boot] Instructions in TEXT section can not load data from other section

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Mar 16 09:50:42 CET 2010


>
> Hi, everyone.
>
>  I have got a problem when I porting U-BOOT to my board
>
> with MPC8247. My configuration file is based on the MPC8260ADS_config.
>
> The problem is : The instruction in TEXT section can not load data in
>
> other (DATA) sections. It seems there is a relocation to the data section .
>
> For example:   If I use
>
>     for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
>         if ((*init_fnc_ptr) () != 0) {
>             hang ();
>         }
>     }
>
> I can't jump to functions in  init_sequence[]  ;
>
> If I called functions such as    get_clocks()  in board_init_f  , it works fine.
>
> So the code in board_init_f can not load address in init_sequence[] , because
>
> init_sequence[]  is out of TEXT section.
>
> The same thing happens with iop_conf_tab[][], and strings used by "puts".
>
> Anyone there has the same problem? Or know the point? Pls help!

Yes, that is a relocation problem. Do you compile with -mrelocatable?
If so, you might have a broken toolchain that don't produce .fixups

    jocke



More information about the U-Boot mailing list