* [docs] [PATCH v2] ref-manual: add "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS" to variables
@ 2026-07-10 9:17 Robert P. J. Day
2026-07-16 9:12 ` Antonin Godard
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2026-07-10 9:17 UTC (permalink / raw)
To: YP docs mailing list
Add this variable to the variables glossary, and add links to it and
back to the do_strip() task for completeness.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst
index e1db2d5ed..f328edd9b 100644
--- a/documentation/ref-manual/tasks.rst
+++ b/documentation/ref-manual/tasks.rst
@@ -848,11 +848,19 @@ the kernel build produces a warning to that effect.
``do_strip``
------------
-If ``KERNEL_IMAGE_STRIP_EXTRA_SECTIONS`` is defined, this task strips
+If :term:`KERNEL_IMAGE_STRIP_EXTRA_SECTIONS` is defined, this task strips
the sections named in that variable from ``vmlinux``. This stripping is
typically used to remove nonessential sections such as ``.comment``
sections from a size-sensitive configuration.
+Common sections to strip:
+
+- ``.comment``: Holds compiler version strings and information
+
+- ``.note.*``: Extra notes often left by the compiler
+
+- ``.debug``: Debugging information
+
.. _ref-tasks-validate_branches:
``do_validate_branches``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index c92b195ff..cd5979a84 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5623,6 +5623,13 @@ system and gives an overview of their function and contents.
See :term:`KERNEL_ARTIFACT_NAME` for additional information.
+ :term:`KERNEL_IMAGE_STRIP_EXTRA_SECTIONS`
+ If this variable is set, it should contain the sections to be
+ stripped from the ``vmlinux`` image by the kernel-related
+ :ref:`ref-tasks-strip` task. As a simple example::
+
+ KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .note.* .debug"
+
:term:`KERNEL_IMAGETYPE`
The type of kernel to build for a device, usually set by the machine
configuration files and defaults to "zImage". This variable is used
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-16 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 9:17 [docs] [PATCH v2] ref-manual: add "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS" to variables Robert P. J. Day
2026-07-16 9:12 ` Antonin Godard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox