ref-manual/variables.rst: document PACKAGE_KEEP_SECTIONS
PATCH v3 1/1 ref-manual/variables.rst: document PACKAGE_KEEP_SECTIONS
Document the PACKAGE_KEEP_SECTIONS variable added to openembedded-core, which can be used to keep specific ELF sections (such as .debug_frame, for use with libunwind) around when stripping binaries and libraries.
Companion documentation for the openembedded-core patch "lib/oe/package:
Add strip keep-section support", sent separately to the oe-core list.
--- documentation/ref-manual/variables.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
documentation/ref-manual/variables.rst +24 -0
@@ -7166,6 +7166,30 @@ system and gives an overview of their function and contents. install, the build system does not generate an error. This variable is generally not user-defined. + :term:`PACKAGE_KEEP_SECTIONS` + Specifies a space-separated list of ELF sections to keep when + stripping binaries and shared libraries, even though they would + normally be removed by :term:`STRIP`. This variable is never applied + to kernel modules. + + For example, on 32-bit Arm targets, GCC can emit DWARF Call Frame + Information for stack unwinding under the ``.debug_frame`` section + instead of the ``.eh_frame`` section used on most other + architectures. Tools such as `libunwind + <https://www.nongnu.org/libunwind/>`__ can use that information, for + example to produce a full backtrace when an unhandled C++ exception + is thrown, which the ``.ARM.exidx``/``.ARM.extab`` unwind tables + that GCC generates by default do not always allow (see `GCC bug + 117941 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117941>`__). By + default this section is removed like any other debug section, but + it can be kept with:: + + PACKAGE_KEEP_SECTIONS:pn-myrecipe = ".debug_frame" + + .. note:: + + Keeping extra sections increases the size of stripped binaries. + :term:`PACKAGE_NO_LOCALE` The :term:`PACKAGE_NO_LOCALE` variable can be set to "1" to prevent the :term:`OpenEmbedded Build System` from splitting the locales found in the
Signature · 1 line
2.34.1
Quoted 7 lines · Mathieu Othacehe via lists.yoctoproject.org
Document the
PACKAGE_KEEP_SECTIONSvariable added to openembedded-core, which can be used to keep specific ELF sections (such as .debug_frame, for use with libunwind) around when stripping binaries and libraries.Companion documentation for the openembedded-core patch "
lib/oe/package:
Add strip keep-section support", sent separately to the oe-core list.
Thanks, the patch looks good. I'll delay the merge until the companion patch is merged on OE-Core.
Antonin