diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | arch/i386/Makefile | 2 | ||||
| -rw-r--r-- | arch/i386/vmlinux.lds.S | 2 | ||||
| -rw-r--r-- | usr/Makefile | 14 | ||||
| -rw-r--r-- | usr/initramfs_data.scr | 4 |
5 files changed, 13 insertions, 11 deletions
@@ -175,7 +175,7 @@ AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ - HOSTCXX HOSTCXXFLAGS + HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE diff --git a/arch/i386/Makefile b/arch/i386/Makefile index b8dab2291a3d..25cef39ba4db 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -18,8 +18,8 @@ LDFLAGS := -m elf_i386 OBJCOPYFLAGS := -O binary -R .note -R .comment -S -ARCHBLOBLFLAGS := -I binary -O elf32-i386 -B i386 LDFLAGS_vmlinux := -e stext +LDFLAGS_BLOB := --format binary --oformat elf32-i386 CFLAGS += -pipe diff --git a/arch/i386/vmlinux.lds.S b/arch/i386/vmlinux.lds.S index 5d6f29df698c..46b3061473ba 100644 --- a/arch/i386/vmlinux.lds.S +++ b/arch/i386/vmlinux.lds.S @@ -79,7 +79,7 @@ SECTIONS __initcall_end = .; . = ALIGN(4096); __initramfs_start = .; - .init.ramfs : { *(.init.initramfs) } + .init.ramfs : { *(.init.ramfs) } __initramfs_end = .; . = ALIGN(32); __per_cpu_start = .; diff --git a/usr/Makefile b/usr/Makefile index d3c2c0bb8773..60858e804d46 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -1,18 +1,16 @@ -include arch/$(ARCH)/Makefile - obj-y := initramfs_data.o host-progs := gen_init_cpio clean-files := initramfs_data.cpio.gz -$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz - $(OBJCOPY) $(ARCHBLOBLFLAGS) \ - --rename-section .data=.init.initramfs \ - $(obj)/initramfs_data.cpio.gz $(obj)/initramfs_data.o - $(STRIP) -s $(obj)/initramfs_data.o +LDFLAGS_initramfs_data.o := $(LDFLAGS_BLOB) -r -T + +$(obj)/initramfs_data.o: $(src)/initramfs_data.scr $(obj)/initramfs_data.cpio.gz FORCE + $(call if_changed,ld) $(obj)/initramfs_data.cpio.gz: $(obj)/gen_init_cpio - ( cd $(obj) ; ./gen_init_cpio | gzip -9c > initramfs_data.cpio.gz ) + ( cd $(obj) ; ./$< | gzip -9c > $@ ) + diff --git a/usr/initramfs_data.scr b/usr/initramfs_data.scr new file mode 100644 index 000000000000..bf6d172329e0 --- /dev/null +++ b/usr/initramfs_data.scr @@ -0,0 +1,4 @@ +SECTIONS +{ + .init.ramfs : { *(.data) } +} |
