FW: GCC ARM Cross Linker Problem

Kanwal Preet Singh CHANANA kanwalpreet.singh@st.com
Tue Aug 29 09:30:00 GMT 2006


Hi all,

I am able to compile & Link my source files with a workaround mentioned below:

The absolute symbols defined in symbols.o are

0x000002a8 D CurTask
0x00c008f8 T MaskInterrupt
Where Curtask is data located in RoM & MaskInterrupt is function in Thumb Mode.

I used following definations in Linker Script

pCurTask		=	0x000002a8; 
MaskInterrupt	=	0x00c008f8; 

With this I am able to link & built Image.axf file. But when running on target,the image crashes at a point when it jumps to MaskInterrupt(shown above) . The reason is that the Linker assumes MaskInterrupt function to be in ARM mode.When it jumps there, it expects 4 byte ARM instruction but the code at this location has 2 Byte Thumb Instruction.

The Thumb Interwork option is enabled in Build options.

Can anyone suggest me a method to Link above symbols in a way so that GCC-ARMv4.0.3 knows whether the symbols is Data or Thumb Function or ARM function?
If there is a way, then Image will run correctly on Target.
Also if anyone needs any help on Project porting from ADS to GCC-ARM,then I can help him out.

Please suggest a wayout to fix the above problem.
Regards,
Kanwal




-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Kanwal Preet Singh CHANANA
Sent: Monday, August 21, 2006 3:48 PM
To: gcc-help@gcc.gnu.org
Subject: GCC ARM Cross Linker Problem


Hi all,

I am porting my project from ADS from ARM to GCC ARM Tool chain. I am able to compile my source files but fail to link. I have a symbols file (symbols.o) with absolute symbols addresses in format 
Symboladdress SymbolType Symbolname e.g

0x000002a8 D CurTask
0x00c008f8 T MaskInterrupt

These symbols are located in ROM( code built with ADS) & project image will be in flash. When I use this same file during build with ARM ADS, it works fine but with GCC ARM tool chain,I get following error message

"./symbols.o: file not recognized: File format not recognized"

Can anybody please tell me the solution to this error? Can I link objects built with ADS with GCC ARM ?

Regards,
Kanwal



--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list