[uClinux-dev] relocs problems with arm

Fabrice Gautier Fabrice_Gautier at sdesigns.com
Fri Nov 30 21:12:54 EST 2001


A quick update on the endianness problem for thebinary flat format.

I don't think there is anything like a "standard" for this format but as per
this chunk of kernel code:

rp = (unsigned long *) calc_reloc(ntohl(reloc[i]), text_len);
/* Get the pointer's value.  */
addr = get_unaligned (rp);
if (addr != 0) {
  /* Do the relocation.  */
  addr = calc_reloc (ntohl (addr), text_len);
  /* Write back the relocated pointer.  */
  put_unaligned (addr, rp);
}


It seems that the kernel expect to have everything in network format (that
is big endian if i got it right)

So i don't know what the elf format spec says and what the binutils does,
but at least i think i know what the kernel expect.
-- 
Fabrice Gautier, 
Fabrice_Gautier at sdesigns.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