From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1J3Eqe-0001Wc-65 for mharc-grub-devel@gnu.org; Fri, 14 Dec 2007 13:01:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J3Eqb-0001Qg-Us for grub-devel@gnu.org; Fri, 14 Dec 2007 13:01:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J3EqY-0001IR-SL for grub-devel@gnu.org; Fri, 14 Dec 2007 13:01:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3EqY-0001I5-JH for grub-devel@gnu.org; Fri, 14 Dec 2007 13:01:14 -0500 Received: from mailout03.sul.t-online.de ([194.25.134.81] helo=mailout03.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3EqY-0001jt-7F for grub-devel@gnu.org; Fri, 14 Dec 2007 13:01:14 -0500 Received: from fwd30.aul.t-online.de by mailout03.sul.t-online.com with smtp id 1J3EqV-00089L-02; Fri, 14 Dec 2007 19:01:11 +0100 Received: from [10.3.2.2] (Xd36noZAghjca8-tp5oUJ3ELo2UY047GrNbz2Pj+USE33NhlUS3RCCSaakwtePRgrW@[217.235.254.92]) by fwd30.aul.t-online.de with esmtp id 1J3EqI-2BXBYm0; Fri, 14 Dec 2007 19:00:58 +0100 Message-ID: <4762C4DE.4020309@t-online.de> Date: Fri, 14 Dec 2007 19:01:02 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: The development of GRUB 2 References: <20071214111751.sg14rfb84koksws0@webmail.spamcop.net> In-Reply-To: <20071214111751.sg14rfb84koksws0@webmail.spamcop.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: Xd36noZAghjca8-tp5oUJ3ELo2UY047GrNbz2Pj+USE33NhlUS3RCCSaakwtePRgrW X-TOI-MSGID: fe10d43a-557b-4df6-8a6d-311ce98a3846 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Use linker script to remove unnecessary sections X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2007 18:01:18 -0000 Bean wrote: > ... > diff -u -p -r1.7 aclocal.m4 > --- aclocal.m4 25 Nov 2007 02:01:30 -0000 1.7 > +++ aclocal.m4 14 Dec 2007 11:51:14 -0000 > @@ -57,7 +57,7 @@ else > fi > grub_cv_prog_objcopy_absolute=yes > for link_addr in 2000 8000 7C00; do > - if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N > -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then : > + if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-T > "-Wl,${srcdir}/ldscript" -Wl,-Ttext -Wl,$link_addr conftest.o -o > conftest.exec]); then : > Selecting the builtin "-N" script first has no effect if a custom script is specified later. Therefore, "-Wl,-N" is IMO no longer necessary. Pavel Roskin wrote: > ... > We may want to use architecture specific ld scripts, but that can be > corrected in further patches. See "[PATCH] Build on Cygwin" for a working example on how to select a platform specific linker script in configure.ac. This can be easily extended, e.g. test more specific scripts first: for f in \ ${target_cpu}-${platform}-${target_os} \ ${target_cpu}-${platform} \ ${target_cpu}; do if test -f "${srcdir}/conf/$f-img-ld.sc"; then ... Christian