This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Significance of "Target.ld" file in eCos application building


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]