[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1521458773-14224-5-git-send-email-yamada.masahiro@socionext.com>
Date: Mon, 19 Mar 2018 20:26:11 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-kbuild@...r.kernel.org
Cc: Sam Ravnborg <sam@...nborg.org>,
Michal Marek <michal.lkml@...kovi.net>,
linux-kernel@...r.kernel.org, Nicholas Piggin <npiggin@...il.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: [PATCH 5/7] kbuild: remove partial section mismatch detection for built-in.a
When built-in.o was incrementally linked with 'ld -r', the section
mismatch analysis for the individual built-in.o was possible when
CONFIG_DEBUG_SECTION_MISMATCH was enabled.
With the migration to the thin archive, built-in.a (former, built-in.o)
is no longer an ELF file. So, the modpost does nothing useful.
scripts/mod/modpost.c just checks the header to bail out, as follows:
/* Is this a valid ELF file? */
if ((hdr->e_ident[EI_MAG0] != ELFMAG0) ||
(hdr->e_ident[EI_MAG1] != ELFMAG1) ||
(hdr->e_ident[EI_MAG2] != ELFMAG2) ||
(hdr->e_ident[EI_MAG3] != ELFMAG3)) {
/* Not an ELF file - silently ignore it */
return 0;
}
We have the full analysis in the final link stage anyway, so we would
not miss the section mismatching.
I do not see a good reason to require extra linking only for the
purpose of the per-directory analysis. Just get rid of this part.
Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---
scripts/Makefile.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 316cb95..66461e9 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -456,8 +456,7 @@ quiet_cmd_link_o_target = AR $@
# If the list of objects to link is empty, just create an empty built-in.a
cmd_link_o_target = $(if $(strip $(real-obj-y)),\
- $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^) \
- $(cmd_secanalysis),\
+ $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^), \
$(cmd_make_empty_builtin) $@)
$(builtin-target): $(real-obj-y) FORCE
--
2.7.4
Powered by blists - more mailing lists