[U-Boot] FPGA relocation/C environment

Wolfgang Wegner
2009-10-29T15:00:04Z

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 = .
[...]

(From fpga.c:
[...]
Xilinx_Spartan3_Slave_Serial_fns xilinx_fns = {
xilinx_pre_config_fn,
xilinx_pgm_fn,
xilinx_clk_fn,
xilinx_init_fn,
xilinx_done_fn,
xilinx_wr_fn,
0,
xilinx_fastwr_fn
};

Xilinx_desc xilinx_fpga[CONFIG_FPGA_COUNT] = {
{Xilinx_Spartan3,
slave_serial,
XILINX_XC3S4000_SIZE,
#if FPGA_QSPI
(void *) &xilinx_qspi_fns,
#else
(void *) &xilinx_fns,
#endif
0}
};
[...]
)

I did not find a special entry for .data.rel (or .data.*) in the
PPC u-boot.lds either, so maybe this is something the linker should
do automatically?

Regards,
Wolfgang