| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | #
 | 
					
						
							|  |  |  | # linux/arch/x86/boot/compressed/Makefile
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # create a compressed vmlinux image from the original vmlinux
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-08 14:42:45 -08:00
										 |  |  | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo head_$(BITS).o misc.o piggy.o | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 
					
						
							|  |  |  | KBUILD_CFLAGS += -fno-strict-aliasing -fPIC | 
					
						
							| 
									
										
										
										
											2009-04-01 17:35:00 -07:00
										 |  |  | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING | 
					
						
							| 
									
										
										
										
											2009-12-25 15:40:38 -08:00
										 |  |  | cflags-$(CONFIG_X86_32) := -march=i386 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | cflags-$(CONFIG_X86_64) := -mcmodel=small | 
					
						
							|  |  |  | KBUILD_CFLAGS += $(cflags-y) | 
					
						
							|  |  |  | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) | 
					
						
							|  |  |  | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 
					
						
							| 
									
										
										
										
											2009-06-17 16:28:09 -07:00
										 |  |  | GCOV_PROFILE := n | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | LDFLAGS := -m elf_$(UTS_MACHINE) | 
					
						
							|  |  |  | LDFLAGS_vmlinux := -T | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-08 17:42:16 -07:00
										 |  |  | hostprogs-y	:= mkpiggy | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												x86: unify arch/x86/boot/compressed/vmlinux_*.lds
Look at the:
	diff -u arch/x86/boot/compressed/vmlinux_*.lds
output and realize that they're basially exactly the same except for
trivial naming differences, and the fact that the 64-bit version has a
"pgtable" thing.
So unify them.
There's some trivial cleanup there (make the output format a Kconfig thing
rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS
end to "_ebss", where 32-bit used to use the traditional "_end"), but
other than that it's really very mindless and straigt conversion.
For example, I think we should aim to remove "startup_32" vs "startup_64",
and just call it "startup", and get rid of one more difference. I didn't
do that.
Also, notice the comment in the unified vmlinux.lds.S talks about
"head_64" and "startup_32" which is an odd and incorrect mix, but that was
actually what the old 64-bit only lds file had, so the confusion isn't
new, and now that mixing is arguably more accurate thanks to the
vmlinux.lds.S file being shared between the two cases ;)
[ Impact: cleanup, unification ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
											
										 
											2009-04-26 10:12:47 -07:00
										 |  |  | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 	$(call if_changed,ld) | 
					
						
							|  |  |  | 	@: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-02-13 20:54:58 +00:00
										 |  |  | OBJCOPYFLAGS_vmlinux.bin :=  -R .comment -S | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | $(obj)/vmlinux.bin: vmlinux FORCE | 
					
						
							|  |  |  | 	$(call if_changed,objcopy) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-09-04 06:19:45 -07:00
										 |  |  | targets += vmlinux.bin.all vmlinux.relocs relocs | 
					
						
							| 
									
										
										
										
											2009-05-05 22:53:11 -07:00
										 |  |  | hostprogs-$(CONFIG_X86_NEED_RELOCS) += relocs | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | quiet_cmd_relocs = RELOCS  $@ | 
					
						
							|  |  |  |       cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $< | 
					
						
							|  |  |  | $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE | 
					
						
							|  |  |  | 	$(call if_changed,relocs) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | vmlinux.bin.all-y := $(obj)/vmlinux.bin | 
					
						
							| 
									
										
										
										
											2009-05-05 22:53:11 -07:00
										 |  |  | vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-05 22:53:11 -07:00
										 |  |  | $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 	$(call if_changed,gzip) | 
					
						
							| 
									
										
										
										
											2009-05-05 22:53:11 -07:00
										 |  |  | $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE | 
					
						
							| 
									
										
										
										
											2009-01-04 22:46:17 +01:00
										 |  |  | 	$(call if_changed,bzip2) | 
					
						
							| 
									
										
										
										
											2009-05-05 22:53:11 -07:00
										 |  |  | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE | 
					
						
							| 
									
										
										
										
											2009-01-04 22:46:17 +01:00
										 |  |  | 	$(call if_changed,lzma) | 
					
						
							| 
									
										
										
										
											2010-01-08 14:42:45 -08:00
										 |  |  | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE | 
					
						
							|  |  |  | 	$(call if_changed,lzo) | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-08 15:32:47 -07:00
										 |  |  | suffix-$(CONFIG_KERNEL_GZIP)	:= gz | 
					
						
							|  |  |  | suffix-$(CONFIG_KERNEL_BZIP2)	:= bz2 | 
					
						
							|  |  |  | suffix-$(CONFIG_KERNEL_LZMA)	:= lzma | 
					
						
							| 
									
										
										
										
											2010-01-08 14:42:45 -08:00
										 |  |  | suffix-$(CONFIG_KERNEL_LZO) 	:= lzo | 
					
						
							| 
									
										
										
										
											2009-01-04 22:46:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-08 17:42:16 -07:00
										 |  |  | quiet_cmd_mkpiggy = MKPIGGY $@ | 
					
						
							|  |  |  |       cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | targets += piggy.S | 
					
						
							|  |  |  | $(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE | 
					
						
							|  |  |  | 	$(call if_changed,mkpiggy) |