From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24636 invoked by alias); 28 Dec 2004 02:11:22 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 24573 invoked from network); 28 Dec 2004 02:11:15 -0000 Received: from unknown (205.217.158.180) by sourceware.org with QMTP; 28 Dec 2004 02:11:15 -0000 Received: (qmail 10569 invoked by uid 10); 28 Dec 2004 02:11:14 -0000 Received: (qmail 7620 invoked by uid 500); 28 Dec 2004 02:11:04 -0000 Mail-Followup-To: binutils@sources.redhat.com, paul.chavent@fnac.net To: Paul Chavent Cc: binutils@sources.redhat.com Subject: Re: About ld scirpts and genscripts.sh References: <41CF41D2.3010505@fnac.net> From: Ian Lance Taylor Date: Tue, 28 Dec 2004 02:11:00 -0000 In-Reply-To: <41CF41D2.3010505@fnac.net> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-12/txt/msg00313.txt.bz2 Paul Chavent 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