diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-09-07 02:44:43 +0200 |
---|---|---|
committer | Tom Rini <trini@kernel.crashing.org> | 2004-09-07 02:44:43 +0200 |
commit | 6fb4fec9d4bfec6dc83a9660ba379f014449fa49 (patch) | |
tree | 7668172901ca27d186b032d40fbe319653c76416 /Makefile | |
parent | ed186fff48ebb5db1a9ec80ea5a92994738db3f2 (diff) | |
download | history-6fb4fec9d4bfec6dc83a9660ba379f014449fa49.tar.gz |
kbuild: Drop use of built-in.o in top level makefile
built-in.o were introduced in top-level Makefile to saves us from
linking the same .o files several times when kallsyms were enabled.
Unfortunately this caused a hard lock-up on x86_64 - so this patch drops
built-in.o again. Please note is was working on i386.
This patch also fixes some wording/spellings noticed by: Horst von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/Makefile b/Makefile index 59ccb2e189c326..73f26791e3f8b3 100644 --- a/Makefile +++ b/Makefile @@ -545,7 +545,7 @@ libs-y := $(libs-y1) $(libs-y2) # Build vmlinux # --------------------------------------------------------------------------- -# vmlinux is build from the objects seleted by $(vmlinux-init) and +# vmlinux is build from the objects selected by $(vmlinux-init) and # $(vmlinux-main). Most are built-in.o files from top-level directories # in the kernel tree, others are specified in arch/$(ARCH)Makefile. # Ordering when linking is important, and $(vmlinux-init) must be first. @@ -556,30 +556,33 @@ libs-y := $(libs-y1) $(libs-y2) # +-< $(vmlinux-init) # | +--< init/version.o + more # | -# +-< built-in.o -# | +--< $(vmlinux-main) -# | +--< driver/built-in.o mm/built-in.o + more +# +--< $(vmlinux-main) +# | +--< driver/built-in.o mm/built-in.o + more # | # +-< kallsyms.o (see description in CONFIG_KALLSYMS section) # -# vmlinux version cannot be updated during normal descending-into-subdirs -# phase since we do not yet know if we need to update vmlinux. +# vmlinux version (uname -v) cannot be updated during normal +# descending-into-subdirs phase since we do not yet know if we need to +# update vmlinux. # Therefore this step is delayed until just before final link of vmlinux - -# except in kallsyms case where it is done just before adding the +# except in the kallsyms case where it is done just before adding the # symbols to the kernel. # # System.map is generated to document addresses of all kernel symbols vmlinux-init := $(head-y) $(init-y) vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) -vmlinux-all := $(vmlinux-init) built-in.o +vmlinux-all := $(vmlinux-init) $(vmlinux-main) vmlinux-lds := arch/$(ARCH)/kernel/vmlinux.lds # Rule to link vmlinux - also used during CONFIG_KALLSYMS # May be overridden by arch/$(ARCH)/Makefile +# Require first prerequisite to be the lds file quiet_cmd_vmlinux__ = LD $@ - cmd_vmlinux__ = $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ - -T $(filter-out FORCE, $^) -o $@ + cmd_vmlinux__ = $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \ + -T $(vmlinux-lds) $(vmlinux-init) \ + --start-group $(vmlinux-main) --end-group \ + $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^) # Generate new vmlinux version quiet_cmd_vmlinux_version = GEN .version @@ -619,7 +622,7 @@ ifdef CONFIG_KALLSYMS # o .tmp_vmlinux1 has all symbols and sections, but __kallsyms is # empty # Running kallsyms on that gives us .tmp_kallsyms1.o with -# the right size - vmlinux version updated during this step +# the right size - vmlinux version (uname -v) is updated during this step # o .tmp_vmlinux2 now has a __kallsyms section of the right size, # but due to the added section, some addresses have shifted. # From here, we generate a correct .tmp_kallsyms2.o @@ -684,20 +687,9 @@ $(KALLSYMS): scripts ; endif # ifdef CONFIG_KALLSYMS # vmlinux image - including updated kernel symbols -vmlinux: $(vmlinux-lds) $(vmlinux-init) built-in.o $(kallsyms.o) FORCE +vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE $(call if_changed_rule,vmlinux__) -# Link $(vmlinux-main) to speed up rest of build phase. No need to -# relink this part too many times. -# Use start/end-group to make sure to resolve all possible symbols -quiet_rule_vmlinux_partial = LD $@ - cmd_vmlinux_partial = $(LD) $(LDFLAGS) $(LDFLAGS_$(*F)) -r \ - --start-group $(filter-out FORCE, $^) \ - --end-group -o $@ - -built-in.o: $(vmlinux-main) FORCE - $(call if_changed,vmlinux_partial) - # The actual objects are generated when descending, # make sure no implicit rule kicks in $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; |