diff options
| author | Nicholas Piggin <npiggin@gmail.com> | 2017-06-20 01:52:05 +1000 |
|---|---|---|
| committer | Nolen Johnson <johnsonnolen@gmail.com> | 2023-03-18 19:41:53 +0100 |
| commit | 2d3ce4f7a366c50d2af5bdaf5a0088ec6bc50500 (patch) | |
| tree | 4342c5f4dec91ba18b3d2a901196c13dde07c84d /Documentation | |
| parent | 65dc3fbd1593e3dd16f0533e6bbea2f969daad65 (diff) | |
kbuild: handle libs-y archives separately from built-in.o archives
The thin archives build currently puts all lib.a and built-in.o
files together and links them with --whole-archive.
This works because thin archives can recursively refer to thin
archives. However some architectures include libgcc.a, which may
not be a thin archive, or it may not be constructed with the "P"
option, in which case its contents do not get linked correctly.
So don't pull .a libs into the root built-in.o archive. These
libs should already have symbol tables and indexes built, so they
can be direct linker inputs. Move them out of the --whole-archive
option, which restore the conditional linking behaviour of lib.a
to thin archives builds.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Change-Id: I42d8c27102477c7a21f29f3f4e7c6f19691ddca6
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/kbuild/kbuild.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index a6aea8f9a161..3e63c2361291 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt @@ -239,6 +239,12 @@ All object files for the main part of vmlinux. KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN together specify all the object files used to link vmlinux. +KBUILD_VMLINUX_LIBS +-------------------------------------------------- +All .a "lib" files for vmlinux. +KBUILD_VMLINUX_INIT, KBUILD_VMLINUX_MAIN, and KBUILD_VMLINUX_LIBS together +specify all the object files used to link vmlinux. + LLVM ---- If this variable is set to 1, Kbuild will use Clang and LLVM utilities instead |
