[ECOS] Significance of "Target.ld" file in eCos application building

Rafael Rodríguez Velilla rrv@tid.es
Thu Dec 27 06:12:00 GMT 2001


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



More information about the Ecos-discuss mailing list