FW: GCC ARM Cross Linker Problem

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

Hi Vinayak,
Kindly refer to below mail. I am already using this following method but it is not working.


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Vinayak Bhalkar
Sent: Tuesday, August 29, 2006 5:42 PM
To: kanwalpreet.singh@st.com
Cc: gcc-help@gcc.gnu.org; crossgcc@sources.redhat.com
Subject: Re: FW: GCC ARM Cross Linker Problem

Try following-

MaskInterrupt	=	0x00c008f9; 


--- kanwalpreet.singh@st.com wrote:

From: Kanwal Preet Singh CHANANA <kanwalpreet.singh@st.com>
To: <gcc-help@gcc.gnu.org>, <crossgcc@sources.redhat.com>
Subject: FW: GCC ARM Cross Linker Problem
Date: Tue, 29 Aug 2006 14:59:35 +0530

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.

-----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 ?


Get your free web-based e-mail account from http://www.Math.net Your online tourguide of Mathematics, with books, links, news, message boards, and much more!

More information about the Gcc-help mailing list