Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1L7C04-0006rZ-VN for mharc-grub-devel@gnu.org; Mon, 01 Dec 2008 11:51:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7C01-0006rE-RY for grub-devel@gnu.org; Mon, 01 Dec 2008 11:51:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7Bzz-0006r2-AS for grub-devel@gnu.org; Mon, 01 Dec 2008 11:51:52 -0500 Received: from [199.232.76.173] (port=40699 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7Bzz-0006qz-4G for grub-devel@gnu.org; Mon, 01 Dec 2008 11:51:51 -0500 Received: from igw2.br.ibm.com ([32.104.18.25]:47523) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7Bzy-0004QN-Dr for grub-devel@gnu.org; Mon, 01 Dec 2008 11:51:50 -0500 Received: from d24relay01.br.ibm.com (unknown [9.8.31.16]) by igw2.br.ibm.com (Postfix) with ESMTP id E391417F545 for ; Mon, 1 Dec 2008 13:35:17 -0200 (BRDT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mB1HpIdB3551292 for ; Mon, 1 Dec 2008 14:51:18 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mB1GpgD3001741 for ; Mon, 1 Dec 2008 14:51:42 -0200 Received: from [9.8.11.141] ([9.8.11.141]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id mB1GpdKU001556; Mon, 1 Dec 2008 14:51:39 -0200 From: Manoel Rebelo Abranches To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-6oHPDaxpCHPeQ62ViHnO" Date: Mon, 01 Dec 2008 14:51:33 -0200 Message-Id: <1228150293.7686.9.camel@manoel-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Carlos Roberto do Nascimento Costa Subject: [PATCH] --build-id= none in newer ld versions PowerPC 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: Mon, 01 Dec 2008 16:51:54 -0000 --=-6oHPDaxpCHPeQ62ViHnO Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch add --build-id=none option to newer ld versions when linking kernel.elf. This prevents grub-mkelfimage to behave wrongly. -- Best Regards, Manoel Abranches IBM Linux Technology Center Brazil --=-6oHPDaxpCHPeQ62ViHnO Content-Disposition: attachment; filename="build_id_ld.patch" Content-Type: text/x-patch; name="build_id_ld.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: aclocal.m4 =================================================================== --- aclocal.m4 (revision 1933) +++ aclocal.m4 (working copy) @@ -113,6 +113,7 @@ if test "x$grub_cv_prog_ld_build_id_none" = xyes; then MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none" + PPC_BUILD_ID_FLAG="-Wl,--build-id=none" fi ]) Index: conf/powerpc-ieee1275.rmk =================================================================== --- conf/powerpc-ieee1275.rmk (revision 1933) +++ conf/powerpc-ieee1275.rmk (working copy) @@ -87,7 +87,7 @@ kernel_elf_CFLAGS = $(COMMON_CFLAGS) kernel_elf_ASFLAGS = $(COMMON_ASFLAGS) kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \ - -Wl,-N,-S,-Ttext,0x200000,-Bstatic + -Wl,-N,-S,-Ttext,0x200000,-Bstatic $(PPC_BUILD_ID_FLAG) # Scripts. sbin_SCRIPTS = grub-install Index: configure.ac =================================================================== --- configure.ac (revision 1933) +++ configure.ac (working copy) @@ -330,6 +330,7 @@ AC_SUBST(TARGET_CPPFLAGS) AC_SUBST(TARGET_LDFLAGS) AC_SUBST(MODULE_LDFLAGS) +AC_SUBST(PPC_BUILD_ID_FLAG) # Set them to their new values for the tests below. CC="$TARGET_CC" Index: Makefile.in =================================================================== --- Makefile.in (revision 1933) +++ Makefile.in (working copy) @@ -73,6 +73,7 @@ TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@ TARGET_OBJ2ELF = @TARGET_OBJ2ELF@ MODULE_LDFLAGS = @MODULE_LDFLAGS@ +PPC_BUILD_ID_FLAG = @PPC_BUILD_ID_FLAG@ EXEEXT = @EXEEXT@ OBJCOPY = @OBJCOPY@ STRIP = @STRIP@ Index: ChangeLog =================================================================== --- ChangeLog (revision 1933) +++ ChangeLog (working copy) @@ -1,3 +1,14 @@ +2008-12-01 Manoel R. Abranches + + Add option --build-id=none to ld when linking kernel.elf in powerpc + to prevent creating additional LOAD segments. + Patch made with help from Paulo R. Pinatti . + * aclocal.m4: add --build-id=none to new variable when acceptable by + ld. + * conf/powerpc-ieee1275.rmk: New variable. + * configure.ac: New variable. + * Makefile.in: New variable. + 2008-11-29 Robert Millan * disk/ata.c (grub_ata_pciinit): Handle errors rised by --=-6oHPDaxpCHPeQ62ViHnO--