summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kbuild/kbuild.txt4
-rw-r--r--Documentation/kbuild/makefiles.txt28
-rw-r--r--Documentation/process/changes.rst2
3 files changed, 15 insertions, 19 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index ac2363ea05c5..6c9c69ec3986 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -50,10 +50,6 @@ LDFLAGS_MODULE
--------------------------------------------------
Additional options used for $(LD) when linking modules.
-LDFLAGS_vmlinux
---------------------------------------------------
-Additional options passed to final link of vmlinux.
-
KBUILD_VERBOSE
--------------------------------------------------
Set the kbuild verbosity. Can be assigned same values as "V=...".
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 71e9feefb63c..048fc39a6b91 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -153,12 +153,18 @@ more details, with real examples.
configuration.
Kbuild compiles all the $(obj-y) files. It then calls
- "$(LD) -r" to merge these files into one built-in.o file.
- built-in.o is later linked into vmlinux by the parent Makefile.
+ "$(AR) rcSTP" to merge these files into one built-in.a file.
+ This is a thin archive without a symbol table, which makes it
+ unsuitable as a linker input.
+
+ The scripts/link-vmlinux.sh script later makes an aggregate
+ built-in.a with "${AR} rcsTP", which creates the thin archive
+ with a symbol table and an index, making it a valid input for
+ the final vmlinux link passes.
The order of files in $(obj-y) is significant. Duplicates in
the lists are allowed: the first instance will be linked into
- built-in.o and succeeding instances will be ignored.
+ built-in.a and succeeding instances will be ignored.
Link order is significant, because certain functions
(module_init() / __initcall) will be called during boot in the
@@ -222,7 +228,7 @@ more details, with real examples.
Note: Of course, when you are building objects into the kernel,
the syntax above will also work. So, if you have CONFIG_EXT2_FS=y,
kbuild will build an ext2.o file for you out of the individual
- parts and then link this into built-in.o, as you would expect.
+ parts and then link this into built-in.a, as you would expect.
--- 3.4 Objects which export symbols
@@ -232,7 +238,7 @@ more details, with real examples.
--- 3.5 Library file goals - lib-y
Objects listed with obj-* are used for modules, or
- combined in a built-in.o for that specific directory.
+ combined in a built-in.a for that specific directory.
There is also the possibility to list objects that will
be included in a library, lib.a.
All objects listed with lib-y are combined in a single
@@ -244,7 +250,7 @@ more details, with real examples.
Note that the same kbuild makefile may list files to be built-in
and to be part of a library. Therefore the same directory
- may contain both a built-in.o and a lib.a file.
+ may contain both a built-in.a and a lib.a file.
Example:
#arch/x86/lib/Makefile
@@ -831,12 +837,6 @@ When kbuild executes, the following steps are followed (roughly):
Note: ldflags-y can be used to further customise
the flags used. See chapter 3.7.
- LDFLAGS_MODULE Options for $(LD) when linking modules
-
- LDFLAGS_MODULE is used to set specific flags for $(LD) when
- linking the .ko files used for modules.
- Default is "-r", for relocatable output.
-
LDFLAGS_vmlinux Options for $(LD) when linking vmlinux
LDFLAGS_vmlinux is used to specify additional flags to pass to
@@ -986,7 +986,7 @@ When kbuild executes, the following steps are followed (roughly):
$(head-y) lists objects to be linked first in vmlinux.
$(libs-y) lists directories where a lib.a archive can be located.
- The rest list directories where a built-in.o object file can be
+ The rest list directories where a built-in.a object file can be
located.
$(init-y) objects will be located after $(head-y).
@@ -1071,7 +1071,7 @@ When kbuild executes, the following steps are followed (roughly):
extra-y := head.o init_task.o
In this example, extra-y is used to list object files that
- shall be built, but shall not be linked as part of built-in.o.
+ shall be built, but shall not be linked as part of built-in.a.
--- 6.7 Commands useful for building a boot image
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index 5470f1b74375..ddc029734b25 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -78,7 +78,7 @@ Binutils
--------
The build system has, as of 4.13, switched to using thin archives (`ar T`)
-rather than incremental linking (`ld -r`) for built-in.o intermediate steps.
+rather than incremental linking (`ld -r`) for built-in.a intermediate steps.
This requires binutils 2.20 or newer.
Flex