diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-19 07:26:11 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:01:28 -0400 |
commit | 7657f60e8ffad587fabc74873b5f42083a60c3cf (patch) | |
tree | 54bdb665bf483b5fa769ebf7279b6c0b7d3e5eea | |
parent | f605005a50fc1443a14b4e8c9c1727881f8f96ae (diff) |
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@socionext.com>
-rw-r--r-- | scripts/Makefile.build | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 316cb95d7ff2..66461e9323b4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -456,8 +456,7 @@ quiet_cmd_link_o_target = AR $@ | |||
456 | 456 | ||
457 | # If the list of objects to link is empty, just create an empty built-in.a | 457 | # If the list of objects to link is empty, just create an empty built-in.a |
458 | cmd_link_o_target = $(if $(strip $(real-obj-y)),\ | 458 | cmd_link_o_target = $(if $(strip $(real-obj-y)),\ |
459 | $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^) \ | 459 | $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^), \ |
460 | $(cmd_secanalysis),\ | ||
461 | $(cmd_make_empty_builtin) $@) | 460 | $(cmd_make_empty_builtin) $@) |
462 | 461 | ||
463 | $(builtin-target): $(real-obj-y) FORCE | 462 | $(builtin-target): $(real-obj-y) FORCE |