diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-07-17 10:54:06 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-07-17 10:54:06 +0200 |
commit | 741f98fe298a73c9d47ed53703c1279a29718581 (patch) | |
tree | 2019e9c571c89e3101be86777d28f3ddeba67b79 /scripts | |
parent | 1e29a706eef664f2c5014462d435f54a1952cc7b (diff) | |
download | kernel-mfld-blackbay-741f98fe298a73c9d47ed53703c1279a29718581.tar.gz kernel-mfld-blackbay-741f98fe298a73c9d47ed53703c1279a29718581.tar.bz2 kernel-mfld-blackbay-741f98fe298a73c9d47ed53703c1279a29718581.zip |
kbuild: do section mismatch check on full vmlinux
Previously we did do the check on the .o files used to link
vmlinux but that failed to find questionable references across
the .o files.
Create a dedicated vmlinux.o file used only for section mismatch checks
that uses the defualt linker script so section does not get renamed.
The vmlinux.o may later be used as part of the the final link of vmlinux
but for now it is used fo section mismatch only.
For a defconfig build this is instant but for an allyesconfig this
add two minutes to a full build (that anyways takes ~2 hours).
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.modpost | 4 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index d5bbbcce31e..c6fcc597b3b 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -70,10 +70,10 @@ __modpost: $(modules:.ko=.o) FORCE $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) quiet_cmd_kernel-mod = MODPOST $@ - cmd_kernel-mod = $(cmd_modpost) $(KBUILD_VMLINUX_OBJS) + cmd_kernel-mod = $(cmd_modpost) $@ PHONY += vmlinux -vmlinux: FORCE +vmlinux.o: FORCE $(call cmd,kernel-mod) # Declare generated files as targets for modpost diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index bb895b13c17..ec036c261fb 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -75,7 +75,8 @@ static int is_vmlinux(const char *modname) else myname = modname; - return strcmp(myname, "vmlinux") == 0; + return (strcmp(myname, "vmlinux") == 0) || + (strcmp(myname, "vmlinux.o") == 0); } void *do_nofail(void *ptr, const char *expr) |