This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Significance of "Target.ld" file in eCos application building
- From: Rafael Rodríguez Velilla <rrv at tid dot es>
- To: ecos <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 27 Dec 2001 14:40:36 +0100
- Subject: Re: [ECOS] Significance of "Target.ld" file in eCos application building
- Organization: Telefónica I+D
- References: <01C18EFA.B889EEA0.subodhk@bsil.com>
Subodh wrote:
> Hi,
>
> While compiling and linking an application file (say "hello.c") on eCos
> on a pc running linux, we give the following command.
>
> gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
>
> What does the file target.ld file contain and what is its significance ? I just think that its used in linking but
> exactly how ?
Target.ld is a file that tells ld how to link the application, it
says where are the different sections linked. It is
called a linker script. You can read further on linker scripts in the
documentation of the GNUPro Toolkit (for example),
concretely read the chapter for linker scripts in the document "GNUPro
Toolkit, GNUPro Development Tools":
www.redhat.com/docs/manuals/gnupro
eCos prepares its own linker script depending on the booting scheme that
you have selected with the CYG_HAL_STARTUP
option.
--
Rafael Rodríguez Velilla rrv@tid.es
Telefónica I+D http://www.tid.es
Telf: +34 - 91 337 4270