This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
AW: ARM SDT2.51 vs arm-elf-gcc
- From: "Hr. Backhaus" <w dot backhaus at newage-avkseg dot com>
- To: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 24 Apr 2002 16:24:10 +0200
- Subject: AW: [ECOS] ARM SDT2.51 vs arm-elf-gcc
- Organization: SEG -Kempen
hello,
> BTW, I have linked successfully, but can't get subroutine call's address
>correctly(offset 2 instructions) which I post before, does these functions
>affect linking results?
there is a difference between the ELF object types generated by armcc and
gcc, the operating System/ABI version ( ABI - Aplications Binary
Interface).
this information is set by gcc in an ELF object file in the 8th byte of the
e_ident field of the ELF Header. this is actually the 8th byte in the ELF
Object file.
gcc sets this byte to 0x61 (ELFOSABI_ARM).
armcc considers this byte as the first unused byte in the header of an ELF
object, and sets to 0.
when relocating, the linker calculates the target address for B/BL
instructions. here it checks the ABI indication and if this is 0, it's
substract 8 from the computed branch address. it does this, for
compatibility to older versions.
for a quick and dirty solution, write a 0x61 in the 8th byte of the object
file generated with ADS.
Regards,
Willy
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss