From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JlXN6-0004Ht-Rd for mharc-grub-devel@gnu.org; Mon, 14 Apr 2008 18:41:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlXN5-0004Gj-97 for grub-devel@gnu.org; Mon, 14 Apr 2008 18:41:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlXN4-0004G3-Ie for grub-devel@gnu.org; Mon, 14 Apr 2008 18:41:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlXN4-0004Fr-CR for grub-devel@gnu.org; Mon, 14 Apr 2008 18:41:54 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JlXN4-0002iH-1Y for grub-devel@gnu.org; Mon, 14 Apr 2008 18:41:54 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m3EMfro4022801 for ; Mon, 14 Apr 2008 18:41:53 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3EMfprH030671 for ; Mon, 14 Apr 2008 18:41:52 -0400 Received: from [10.34.1.17] (gopher.brq.redhat.com [10.34.1.17]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m3EMfp8Y001509 for ; Mon, 14 Apr 2008 18:41:51 -0400 From: Lubomir Kundrak To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-v3h06rXZ54CYetEqYdhu" Organization: Red Hat Inc. Date: Tue, 15 Apr 2008 00:41:50 +0200 Message-Id: <1208212910.3971.53.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Preserve build IDs 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, 14 Apr 2008 22:41:55 -0000 --=-v3h06rXZ54CYetEqYdhu Content-Type: text/plain Content-Transfer-Encoding: 7bit This will make Fedora packagers have good sleep. I think we discussed this already on the list. Rationale behind disabling build-ids completely was that it caused images to grow a lot. Correct solution is to disable it from images only and let it exists in elf files for debugging purposes. 2008-04-15 Lubomir Kundrak * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text section into account, newer toolchains generate unique build ids * configure.ac: remove the test for --build-id=none acceptance, we want build ids to bre preserved * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id far from other sections don't cause the raw binary images grow size -- Lubomir Kundrak (Red Hat Security Response Team) --=-v3h06rXZ54CYetEqYdhu Content-Disposition: attachment; filename=grub-1.95-buildid.patch Content-Type: text/x-patch; name=grub-1.95-buildid.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -urp grub-1.96.orig/aclocal.m4 grub-1.96/aclocal.m4 --- grub-1.96.orig/aclocal.m4 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/aclocal.m4 2008-04-15 00:15:04.000000000 +0200 @@ -61,7 +61,7 @@ for link_addr in 2000 8000 7C00; do else AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) fi - if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then : + if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then : else AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files]) fi diff -urp grub-1.96.orig/configure.ac grub-1.96/configure.ac --- grub-1.96.orig/configure.ac 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/configure.ac 2008-04-15 00:33:20.000000000 +0200 @@ -237,16 +237,6 @@ if test "x$target_m32" = x1; then TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" fi -AC_MSG_CHECKING([whether the linker accepts `--build-id=none']) -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -Wl,--build-id=none" -AC_TRY_LINK(, , build_id_flag=yes, build_id_flag=no) -AC_MSG_RESULT([$build_id_flag]) -LDFLAGS="$save_LDFLAGS" -if test "x$build_id_flag" = xyes; then - TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none" -fi - # # Compiler features. # diff -urp grub-1.96.orig/genmk.rb grub-1.96/genmk.rb --- grub-1.96.orig/genmk.rb 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/genmk.rb 2008-04-15 00:15:04.000000000 +0200 @@ -57,7 +57,7 @@ class Image MOSTLYCLEANFILES += #{deps_str} #{@name}: #{exe} - $(OBJCOPY) -O binary -R .note -R .comment $< $@ + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ #{exe}: #{objs_str} $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS) --=-v3h06rXZ54CYetEqYdhu--