linkcmds file

Lu Chih Wen rudolph at
Wed Oct 7 11:08:35 UTC 2009


Try this syntax you can ignore the path but make sure task3.o was the unique
In your project (Ex: It only has one task3.c in your project).

* (EXCLUDE_FILE (*task3.o) .text);	

-----Original Message-----
From: rtems-users-bounces at [mailto:rtems-users-bounces at]
On Behalf Of Teng Chee Wan Philip
Sent: Wednesday, October 07, 2009 2:50 PM
To: Chris Johns
Cc: rtems-users at
Subject: RE: linkcmds file

I have looked at that linker script documentation, and tried several things,
but it does not seems to work.  It seems like the *(.text*) was overriding
all the rest of the input section description.  I tried using EXCLUDE_FILE
but there was no effect.  The other issue seems to be that the object code
was stored in /o-optimize/ directory.  I am not sure how to include that
path into the EXCLUDE_FILE keyword to instruct the linker to ignore the
application object code when setting the address for the rest.

I was hoping that someone can show me the proper way to modify this file.

In my application, most of the time the binary image changes because of the
application code, rather than the operating system code.  By separating the
operating systems code from the application, the static address of the
operating system function calls will not change.  Indirectly, there will be
"minimal" change in the binary image, when you re-compile the application+OS
image.  And I can perform a binary patch, with a smaller patch file.  The
other alternative is to move the operating system .text section up, before
the application code .text.  I am not sure how to do that too.  Any ideas?



-----Original Message-----
From: Chris Johns [mailto:chrisj at] 
Sent: Wednesday, October 07, 2009 12:04 PM
To: Teng Chee Wan Philip
Cc: rtems-users at
Subject: Re: linkcmds file

Teng Chee Wan Philip wrote:
> Hi,
> I need some help here.  I am thinking of locating my application .text
section to a different location from the operating system .text. Currently,
in the linkcmds file, all the .text sections are located together because of
the *(.text*) input section description.  The envisaged memory map goes like
> .text (operating system)		0x02000000
> .text (applications, xx.o, yy.o)	0x02080000
> .data (os + apps)		following .text 
> .bss				0x02100000
> Does anyone know how I can modify the linkcmds file to achieve that?  Any
help will be greatly appreciated. Thanks.

Take a look at this page:

and specifically the part on including sections for a specific file. 
Maybe that can help. The complication comes with other data in the flash 
or ROM memory that is part of the application but not at the separated 

Why do want to keep the application code separate ?

rtems-users mailing list
rtems-users at

More information about the users mailing list