[U-Boot] lookup tables: how can i manage them?

Hi ML,
in my code (for now a stupid SMI interface) I'm using a jump table like this:
struct reg:{ callback_1 c1, callback_2 c2, ... };
struct reg mytable[100]={ ......... }
c1 and c2 are pointer to functions.
My problem is that U-boot relocates itself into ram and these pointers are calculated at linking time.
Which is the best practice (into u.boot) to manage these loolup tables/jmps tables? is there a suggest way or a common place to put the needed relocation code (adding the gd->reloc_off to the pointers)?
I'm working on mips, but I thinks that this is a general question.
thanks in advance.
best regards,
luigi
PS.: I made a stupid driver to manage smi interface, that is a "theme variation" on mii bus, to manage a tantos switch. I can send the code if there is interest.
participants (1)
-
Luigi 'Comio' Mantellini