public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* About ld scirpts and genscripts.sh
@ 2004-12-26 22:59 Paul Chavent
  2004-12-28  2:11 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Chavent @ 2004-12-26 22:59 UTC (permalink / raw)
  To: binutils

Hello.
I would like to build a cross development toolchain. I have an 
'emulparams', an 'emultempl' and a  'scripttempl' file.
I would like to know the diference between :
- Insert them in the source tree of ld before compiling binutils (so it 
compile ld with the .c generated file).
- Simply use my ld script with the option -T of ld.

Or in other words, what does the *.c generated file do ?

A last question :
If i specify a emulation with no 'emultempl' script, is there any sense 
? Do i need to modify the source tree of ld or can i simply use my ld 
script with the option -T of ld ?

Thanks a lot.

Cordialement.
Paul.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: About ld scirpts and genscripts.sh
  2004-12-26 22:59 About ld scirpts and genscripts.sh Paul Chavent
@ 2004-12-28  2:11 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2004-12-28  2:11 UTC (permalink / raw)
  To: Paul Chavent; +Cc: binutils

Paul Chavent <paul.chavent@fnac.net> writes:

> I would like to build a cross development toolchain. I have an
> 'emulparams', an 'emultempl' and a  'scripttempl' file.
> I would like to know the diference between :
> - Insert them in the source tree of ld before compiling binutils (so
> it compile ld with the .c generated file).
> - Simply use my ld script with the option -T of ld.
> 
> Or in other words, what does the *.c generated file do ?

There is no difference.  At least, there is no difference other than
the fact that when the linker uses a builtin script it will work as a
standalone binary--it will not have to locate the script in the
filesystem somewhere.

I should also mention what you probably already know, that a
scripttempl file normally generates a set of different linker scripts
which are used in different scenarios.

> A last question :
> If i specify a emulation with no 'emultempl' script, is there any
> sense ? Do i need to modify the source tree of ld or can i simply use
> my ld script with the option -T of ld ?

The -T option selects a linker script, and more or less corresponds to
a scripttempl file.  The -m option selects an emulation, which fairly
directly corresponds to an emulparams file.  The emulparams file
selects an emultempl file via the TEMPLATE_NAME variable; if
TEMPLATE_NAME is not specific, "generic" is used.

So, specifying an emulation always implies an emultempl file, via the
emulparams file.  Note that the emulation is more than just the linker
script.  For example, the linker will not do correct ELF linking if
you do not use the elf32.em emultempl file (or something with
equivalent functionality) no matter what linker script you use.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-28  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-26 22:59 About ld scirpts and genscripts.sh Paul Chavent
2004-12-28  2:11 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).