aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/Makefile
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2008-02-13 20:54:58 +0000
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:40:46 +0200
commit099e1377269a47ed30a00ee131001988e5bcaa9c (patch)
tree2bf2f02aa44db93a9e8b1f4ef76ac08d3a732a46 /arch/x86/boot/Makefile
parente0bf0f75bdc441abb05365abc56ee96ba44ca073 (diff)
x86: use ELF format in compressed images.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: virtualization@lists.linux-foundation.org Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: virtualization@lists.linux-foundation.org Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/boot/Makefile')
-rw-r--r--arch/x86/boot/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index f88458e83ef..9695affeb58 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -94,6 +94,20 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
+sed-offsets := -e 's/^00*/0/' \
+ -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
+
+quiet_cmd_offsets = OFFSETS $@
+ cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
+
+$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
+ $(call if_changed,offsets)
+
+targets += offsets.h
+
+AFLAGS_header.o += -I$(obj)
+$(obj)/header.o: $(obj)/offsets.h
+
LDFLAGS_setup.elf := -T
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
$(call if_changed,ld)