[U-Boot] FPGA relocation/C environment

Joakim Tjernlund
2009-10-29T15:47:16Z

wolfgang at leila.ping.de (Wolfgang Wegner) wrote on 29/10/2009 16:00:04:
>
> On Thu, Oct 29, 2009 at 03:22:24PM +0100, Joakim Tjernlund wrote:
> >
> > It seems like you don't have any relocation data as both __got2_entries and
> > __fixup_entries are zero. Something seems broken in general, perhaps your
> linker script
> > is bust?
>
> I took board/freescale/m5373evb/u-boot.lds without modifications first.
> After noticing that the PPC linker scripts do not have this entry (at this
> place), I removed "*(.fixup)" in the .text section, but this did not change
> anything.
> However, in my u-boot.map, I have some .data.rel entries which look as
> if they would belong into the .fixup section?!
> [...]
> .data.rel 0x00026eb4 0x30 lib_m68k/libm68k.a(board.o)
> 0x00026eb4 init_sequence
> .data.rel 0x00026ee4 0x4c common/libcommon.a(cmd_bootm.o)
> 0x00026ee4 boot_os
> .data.rel 0x00026f30 0x24 common/libcommon.a(cmd_mii.o)
> 0x00026f30 desc_and_len_tbl
> .data.rel 0x00026f54 0x88 board/astro/mcf5373l/libmcf5373l.a(fpga.o)
> 0x00026f88 xilinx_fns
> 0x00026fa8 xilinx_qspi_fns
> 0x00026f70 altera_fpga
> 0x00026f54 altera_fns
> 0x00026fc8 xilinx_fpga
> 0x00026fdc . = .
> 0x00026fdc __u_boot_cmd_start = .

Compile one small file into asm (use -S to gcc) with and without -fPIC
then compare where the relocation data goes. Normally
they will be in .got2 but perhaps your compiler does something else?