[coreboot] r798 - in coreboot-v3: . arch/x86 util/xcompile

svn at coreboot.org svn at coreboot.org
Fri Aug 22 03:22:22 CEST 2008


Author: hailfinger
Date: 2008-08-22 03:22:21 +0200 (Fri, 22 Aug 2008)
New Revision: 798

Modified:
   coreboot-v3/Makefile
   coreboot-v3/arch/x86/Makefile
   coreboot-v3/util/xcompile/xcompile
Log:
Add objdump and readelf to xcompile and use the results. This kills a
few hardcodes introduced with my checker.

Tested on Linux and OSX.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


Modified: coreboot-v3/Makefile
===================================================================
--- coreboot-v3/Makefile	2008-08-22 01:19:25 UTC (rev 797)
+++ coreboot-v3/Makefile	2008-08-22 01:22:21 UTC (rev 798)
@@ -96,6 +96,8 @@
 LD := $(LD_$(ARCH))
 NM := $(NM_$(ARCH))
 OBJCOPY := $(OBJCOPY_$(ARCH))
+OBJDUMP := $(OBJDUMP_$(ARCH))
+READELF := $(READELF_$(ARCH))
 AR := $(AR_$(ARCH))
 
 CFLAGS += $(CFLAGS_$(ARCH))

Modified: coreboot-v3/arch/x86/Makefile
===================================================================
--- coreboot-v3/arch/x86/Makefile	2008-08-22 01:19:25 UTC (rev 797)
+++ coreboot-v3/arch/x86/Makefile	2008-08-22 01:22:21 UTC (rev 798)
@@ -145,7 +145,7 @@
 
 	$(Q)# .data and .bss must be empty because they aren't handled
 	$(Q)printf "  CHECK   stage0 (non-empty writable/allocatable sections)\n"
-	$(Q)./util/sectionchecker/sectionchecker objdump readelf $(STAGE0_OBJ)
+	$(Q)./util/sectionchecker/sectionchecker $(OBJDUMP) $(READELF) $(STAGE0_OBJ)
 
 	$(Q)# Note: we invoke gcc (instead of ld directly) here, as we hit
 	$(Q)# strange problems in the past. It seems that only gcc knows how
@@ -271,7 +271,7 @@
 
 	$(Q)# .data and .bss must be empty because they aren't handled
 	$(Q)printf "  CHECK   initram (non-empty writable/allocatable sections)\n"
-	$(Q)./util/sectionchecker/sectionchecker objdump readelf $(obj)/coreboot.initram_partiallylinked.o
+	$(Q)./util/sectionchecker/sectionchecker $(OBJDUMP) $(READELF) $(obj)/coreboot.initram_partiallylinked.o
 
 	$(Q)printf "  WRAP    $(subst $(shell pwd)/,,$(@)) (PIC->non-PIC)\n"
 	$(Q)$(NM) --undefined-only $(obj)/coreboot.initram_partiallylinked.o |\

Modified: coreboot-v3/util/xcompile/xcompile
===================================================================
--- coreboot-v3/util/xcompile/xcompile	2008-08-22 01:19:25 UTC (rev 797)
+++ coreboot-v3/util/xcompile/xcompile	2008-08-22 01:22:21 UTC (rev 798)
@@ -63,6 +63,8 @@
 	searchgnu ld >/dev/null && echo "LD_x86 := $(searchgnu ld) -b elf32-i386 -melf_i386"
 	searchgnu nm >/dev/null && echo "NM_x86 := $(searchgnu nm)"
 	searchgnu objcopy >/dev/null && echo "OBJCOPY_x86 := $(searchgnu objcopy)"
+	searchgnu objdump >/dev/null && echo "OBJDUMP_x86 := $(searchgnu objdump)"
+	searchgnu readelf >/dev/null && echo "READELF_x86 := $(searchgnu readelf)"
 	;;
 "x86")
 	if [ "$OS" != "Darwin" ]; then
@@ -74,6 +76,8 @@
 		searchgnu ld >/dev/null && echo "LD_x86 := $(searchgnu ld)"
 		searchgnu nm >/dev/null && echo "NM_x86 := $(searchgnu nm)"
 		searchgnu objcopy >/dev/null && echo "OBJCOPY_x86 := $(searchgnu objcopy)"
+		searchgnu objdump >/dev/null && echo "OBJDUMP_x86 := $(searchgnu objdump)"
+		searchgnu readelf >/dev/null && echo "READELF_x86 := $(searchgnu readelf)"
 	else
 		CC=`find /opt/local/bin/ -name "i386-elf-gcc-*"`
 		if [ "$CC" == "" ]; then
@@ -86,6 +90,8 @@
 		echo "LD_x86 := i386-elf-ld"
 		echo "NM_x86 := i386-elf-nm"
 		echo "OBJCOPY_x86 := i386-elf-objcopy"
+		echo "OBJDUMP_x86 := i386-elf-objdump"
+		echo "READELF_x86 := i386-elf-readelf"
 		echo "INTLCFLAGS  := -I/opt/local/include"
 		echo "INTLLIBS    := -L/opt/local/lib -lintl"
 	fi
@@ -99,6 +105,8 @@
 	echo "LD_x86 := i386-linux-ld"
 	echo "NM_x86 := i386-linux-nm"
 	echo "OBJCOPY_x86 := i386-linux-objcopy"
+	echo "OBJDUMP_x86 := i386-linux-objdump"
+	echo "READELF_x86 := i386-elf-readelf"
 	;;
 esac
 





More information about the coreboot mailing list