[U-Boot] FPGA relocation/C environment

Wolfgang Wegner wolfgang at leila.ping.de
Thu Oct 29 16:44:55 CET 2009


Hi,

although I have to leave for now, just some questions to see if
there is anything I understood correctly until now...

- in the PPC startup (assembly) files, the section .got2 is explicitely
  created using START_GOT etc.
- .got2 contains some vital pointers (vectors) as well as data
  pointers like a pointer to .fixup and a pointer to itself (?!)
- the ppc linker automatically puts .data.rel (and other relocatable
  sections?) into .fixup (which seems not the case with my m68k linker)
- the ppc startup code uses some obfuscated assembly code ;-) to
  relocate both the global relocation table (.got) as well as the
  sections .got2 and .fixup (.got seems to be implicitly mentioned:
  "/* First our own GOT */
	add	r14, r14, r15
	/* then the one used by the C code */
	add	r30, r30, r15"
  but I can not see where it is actually relocated...)

Is this correct so far? I am not sure because it seems more complicated
than necessary to me (especially the algorithm to relocate .got2 and
.fixup - or is this all about the possibility to do multiple relocations?),
so maybe I still have a misunderstanding here. Furthermore, the special
handling of r14 (-ffixed-r14 in config.mk) still puzzles me.

Thank you and best regards,
Wolfgang



More information about the U-Boot mailing list