Skip to content

Commit 881bf90

Browse files
samitolvanenmasahir0y
authored andcommitted
Documentation/kbuild: Drop section numbers
Change the gendwarfksyms documentation to use proper chapter, section, and subsection adornments instead of fragile section numbers. Suggested-by: Masahiro Yamada <[email protected]> Signed-off-by: Sami Tolvanen <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent c908346 commit 881bf90

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Documentation/kbuild/gendwarfksyms.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
DWARF module versioning
33
=======================
44

5-
1. Introduction
6-
===============
5+
Introduction
6+
============
77

88
When CONFIG_MODVERSIONS is enabled, symbol versions for modules
99
are typically calculated from preprocessed source code using the
@@ -14,8 +14,8 @@ selected, **gendwarfksyms** is used instead to calculate symbol versions
1414
from the DWARF debugging information, which contains the necessary
1515
details about the final module ABI.
1616

17-
1.1. Usage
18-
==========
17+
Usage
18+
-----
1919

2020
gendwarfksyms accepts a list of object files on the command line, and a
2121
list of symbol names (one per line) in standard input::
@@ -33,8 +33,8 @@ list of symbol names (one per line) in standard input::
3333
-h, --help Print this message
3434

3535

36-
2. Type information availability
37-
================================
36+
Type information availability
37+
=============================
3838

3939
While symbols are typically exported in the same translation unit (TU)
4040
where they're defined, it's also perfectly fine for a TU to export
@@ -56,8 +56,8 @@ type for calculating symbol versions even if the symbol is defined
5656
elsewhere. The name of the symbol pointer is expected to start with
5757
`__gendwarfksyms_ptr_`, followed by the name of the exported symbol.
5858

59-
3. Symtypes output format
60-
=========================
59+
Symtypes output format
60+
======================
6161

6262
Similarly to genksyms, gendwarfksyms supports writing a symtypes
6363
file for each processed object that contain types for exported
@@ -85,8 +85,8 @@ produces C-style type strings, gendwarfksyms uses the same simple parsed
8585
DWARF format produced by **--dump-dies**, but with type references
8686
instead of fully expanded strings.
8787

88-
4. Maintaining a stable kABI
89-
============================
88+
Maintaining a stable kABI
89+
=========================
9090

9191
Distribution maintainers often need the ability to make ABI compatible
9292
changes to kernel data structures due to LTS updates or backports. Using
@@ -104,8 +104,8 @@ for source code annotation. Note that as these features are only used to
104104
transform the inputs for symbol versioning, the user is responsible for
105105
ensuring that their changes actually won't break the ABI.
106106

107-
4.1. kABI rules
108-
===============
107+
kABI rules
108+
----------
109109

110110
kABI rules allow distributions to fine-tune certain parts
111111
of gendwarfksyms output and thus control how symbol
@@ -139,8 +139,8 @@ Currently, only the rules discussed in this section are supported, but
139139
the format is extensible enough to allow further rules to be added as
140140
need arises.
141141

142-
4.1.1. Managing definition visibility
143-
=====================================
142+
Managing definition visibility
143+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144144

145145
A declaration can change into a full definition when additional includes
146146
are pulled into the translation unit. This changes the versions of any
@@ -168,8 +168,8 @@ Example usage::
168168

169169
KABI_DECLONLY(s);
170170

171-
4.1.2. Adding enumerators
172-
=========================
171+
Adding enumerators
172+
~~~~~~~~~~~~~~~~~~
173173

174174
For enums, all enumerators and their values are included in calculating
175175
symbol versions, which becomes a problem if we later need to add more
@@ -223,8 +223,8 @@ Example usage::
223223
KABI_ENUMERATOR_IGNORE(e, C);
224224
KABI_ENUMERATOR_VALUE(e, LAST, 2);
225225

226-
4.3. Adding structure members
227-
=============================
226+
Adding structure members
227+
------------------------
228228

229229
Perhaps the most common ABI compatible change is adding a member to a
230230
kernel data structure. When changes to a structure are anticipated,
@@ -237,8 +237,8 @@ natural method. This section describes gendwarfksyms support for using
237237
reserved space in data structures and hiding members that don't change
238238
the ABI when calculating symbol versions.
239239

240-
4.3.1. Reserving space and replacing members
241-
============================================
240+
Reserving space and replacing members
241+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
242242

243243
Space is typically reserved for later use by appending integer types, or
244244
arrays, to the end of the data structure, but any type can be used. Each
@@ -276,8 +276,8 @@ The examples include `KABI_(RESERVE|USE|REPLACE)*` macros that help
276276
simplify the process and also ensure the replacement member is correctly
277277
aligned and its size won't exceed the reserved space.
278278

279-
4.3.2. Hiding members
280-
=====================
279+
Hiding members
280+
~~~~~~~~~~~~~~
281281

282282
Predicting which structures will require changes during the support
283283
timeframe isn't always possible, in which case one might have to resort

0 commit comments

Comments
 (0)