Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Len9b-0007Jv-HP for mharc-grub-devel@gnu.org; Wed, 04 Mar 2009 04:12:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Len9Z-0007HN-4T for grub-devel@gnu.org; Wed, 04 Mar 2009 04:12:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Len9Y-0007Gh-DR for grub-devel@gnu.org; Wed, 04 Mar 2009 04:12:36 -0500 Received: from [199.232.76.173] (port=52181 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Len9X-0007GV-RH for grub-devel@gnu.org; Wed, 04 Mar 2009 04:12:35 -0500 Received: from [74.93.104.97] (port=33596 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Len9X-0004iH-9U for grub-devel@gnu.org; Wed, 04 Mar 2009 04:12:35 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 5C2E235C04E for ; Wed, 4 Mar 2009 01:12:21 -0800 (PST) Date: Wed, 04 Mar 2009 01:12:21 -0800 (PST) Message-Id: <20090304.011221.191351907.davem@davemloft.net> To: grub-devel@gnu.org From: David Miller X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH]: Strip boot block built objects. 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: Wed, 04 Mar 2009 09:12:37 -0000 In order for the boot block images for sparc to work properly, we have to strip them out before doing the objcopy. This is harmless on i386-pc and some other future grub targets might need this too, so do it universally. 2009-03-04 David S. Miller * genmk.rb: Strip object files built for boot images. * conf/i386-pc.mk: Rebuilt. * conf/sparc64-ieee1275.mk: Likewise. --- conf/i386-pc.mk | 6 ++++++ conf/sparc64-ieee1275.mk | 2 ++ genmk.rb | 1 + 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/conf/i386-pc.mk b/conf/i386-pc.mk index 98dcbd2..dab7d40 100644 --- a/conf/i386-pc.mk +++ b/conf/i386-pc.mk @@ -25,6 +25,7 @@ boot.img: boot.exec boot.exec: boot_img-boot_i386_pc_boot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(boot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ boot_img-boot_i386_pc_boot.o: boot/i386/pc/boot.S $(boot/i386/pc/boot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(boot_img_ASFLAGS) -MD -c -o $@ $< @@ -43,6 +44,7 @@ pxeboot.img: pxeboot.exec pxeboot.exec: pxeboot_img-boot_i386_pc_pxeboot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(pxeboot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ pxeboot_img-boot_i386_pc_pxeboot.o: boot/i386/pc/pxeboot.S $(boot/i386/pc/pxeboot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(pxeboot_img_ASFLAGS) -MD -c -o $@ $< @@ -61,6 +63,7 @@ diskboot.img: diskboot.exec diskboot.exec: diskboot_img-boot_i386_pc_diskboot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(diskboot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ diskboot_img-boot_i386_pc_diskboot.o: boot/i386/pc/diskboot.S $(boot/i386/pc/diskboot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(diskboot_img_ASFLAGS) -MD -c -o $@ $< @@ -79,6 +82,7 @@ lnxboot.img: lnxboot.exec lnxboot.exec: lnxboot_img-boot_i386_pc_lnxboot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(lnxboot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ lnxboot_img-boot_i386_pc_lnxboot.o: boot/i386/pc/lnxboot.S $(boot/i386/pc/lnxboot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(lnxboot_img_ASFLAGS) -MD -c -o $@ $< @@ -97,6 +101,7 @@ cdboot.img: cdboot.exec cdboot.exec: cdboot_img-boot_i386_pc_cdboot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(cdboot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ cdboot_img-boot_i386_pc_cdboot.o: boot/i386/pc/cdboot.S $(boot/i386/pc/cdboot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(cdboot_img_ASFLAGS) -MD -c -o $@ $< @@ -126,6 +131,7 @@ kernel.img: kernel.exec kernel.exec: kernel_img-kern_i386_pc_startup.o kernel_img-kern_main.o kernel_img-kern_device.o kernel_img-kern_disk.o kernel_img-kern_dl.o kernel_img-kern_file.o kernel_img-kern_fs.o kernel_img-kern_err.o kernel_img-kern_misc.o kernel_img-kern_mm.o kernel_img-kern_loader.o kernel_img-kern_rescue.o kernel_img-kern_term.o kernel_img-kern_time.o kernel_img-kern_list.o kernel_img-kern_handler.o kernel_img-kern_i386_dl.o kernel_img-kern_i386_pc_init.o kernel_img-kern_i386_pc_mmap.o kernel_img-kern_parser.o kernel_img-kern_partition.o kernel_img-kern_i386_tsc.o kernel_img-kern_i386_pit.o kernel_img-kern_generic_rtc_get_time_ms.o kernel_img-kern_generic_millisleep.o kernel_img-kern_env.o kernel_img-term_i386_pc_console.o kernel_img-term_i386_vga_common.o kernel_img-symlist.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(kernel_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ kernel_img-kern_i386_pc_startup.o: kern/i386/pc/startup.S $(kern/i386/pc/startup.S_DEPENDENCIES) $(TARGET_CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(kernel_img_ASFLAGS) -MD -c -o $@ $< diff --git a/conf/sparc64-ieee1275.mk b/conf/sparc64-ieee1275.mk index 0d69eac..3d9c400 100644 --- a/conf/sparc64-ieee1275.mk +++ b/conf/sparc64-ieee1275.mk @@ -23,6 +23,7 @@ boot.img: boot.exec boot.exec: boot_img-boot_sparc_ieee1275_boot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(boot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ boot_img-boot_sparc_ieee1275_boot.o: boot/sparc/ieee1275/boot.S $(boot/sparc/ieee1275/boot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/sparc/ieee1275 -I$(srcdir)/boot/sparc/ieee1275 $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(boot_img_ASFLAGS) -MD -c -o $@ $< @@ -41,6 +42,7 @@ diskboot.img: diskboot.exec diskboot.exec: diskboot_img-boot_sparc_ieee1275_diskboot.o $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(diskboot_img_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ diskboot_img-boot_sparc_ieee1275_diskboot.o: boot/sparc/ieee1275/diskboot.S $(boot/sparc/ieee1275/diskboot.S_DEPENDENCIES) $(TARGET_CC) -Iboot/sparc/ieee1275 -I$(srcdir)/boot/sparc/ieee1275 $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(diskboot_img_ASFLAGS) -MD -c -o $@ $< diff --git a/genmk.rb b/genmk.rb index fe022cd..83ef639 100644 --- a/genmk.rb +++ b/genmk.rb @@ -61,6 +61,7 @@ MOSTLYCLEANFILES += #{deps_str} #{exe}: #{objs_str} $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS) + $(STRIP) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id $@ " + objs.collect_with_index do |obj, i| src = sources[i] -- 1.6.1.2.253.ga34a