[uClinux-dev] relocs problems with arm

Greg Ungerer gerg at snapgear.com
Fri Nov 30 02:29:54 EST 2001


Hi Fabrice,

Fabrice Gautier wrote:
> It seems better indeed (flat_dump no report relocs) but it's not yet good.
> 
> I think i have an endianness problem.
> 
> Once loaded the relocation entries contain 0xa6530040 while the offset of
> the data is 0x46a4,
> and the base offset is 0x020d0000.

How did you display these values?
(I assume you mean a PC utility dumped the hex, thus intrepreting
the data in the binary as little endian).

That elf2flt I pointed to does generate a file with big endian
data (opposit a norma x86 PC).


> If i do 0x20d0000 + 0xa4460000 (0x46a4 swapped) + 0x40 (size of the header)
> i get 0xa6530040
> so there must something bad in the endiannes.
> 
> My host is a pc and the offset seems to be coded like on a pc (big-endian, i
> guess we call that).  Wheras my target may be little endian.

If your target is little endian then your generated elf2flt
files aren't going to work :-)


> I guess that i should correct either elf2flt or the kernel loader, but i'm
> not sure which or how? I woudl say its more likely elf2flt but who knows...
> 
> Any thoughts?

I think you need to change elf2flt to generate little endian
binaries if that is what your target needs.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
SnapGear                                       PHONE:    +61 7 3435 2888
825 Stanley St,                                  FAX:    +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia              WEB:   www.snapgear.com
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list