[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210113174620.958429-1-ndesaulniers@google.com>
Date: Wed, 13 Jan 2021 09:46:20 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Mark Brown <broonie@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] Documentation: asm-annotation: clarify .L local symbol names
Use more precise language and move the text to a region in the docs to
show that this constraint is not just for SYM_CODE_START*.
Suggested-by: Mark Brown <broonie@...nel.org>
Suggested-by: Josh Poimboeuf <jpoimboe@...hat.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
Documentation/asm-annotations.rst | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/Documentation/asm-annotations.rst b/Documentation/asm-annotations.rst
index e711ff98102a..76424e0431f4 100644
--- a/Documentation/asm-annotations.rst
+++ b/Documentation/asm-annotations.rst
@@ -100,6 +100,11 @@ Instruction Macros
~~~~~~~~~~~~~~~~~~
This section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above.
+``objtool`` requires that all code must be contained in an ELF symbol. Symbol
+names that have a ``.L`` prefix do not emit symbol table entries. ``.L``
+prefixed symbols can be used within a code region, but should be avoided for
+denoting a range of code via ``SYM_*_START/END`` annotations.
+
* ``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the
most frequent markings**. They are used for functions with standard calling
conventions -- global and local. Like in C, they both align the functions to
@@ -153,15 +158,6 @@ This section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above.
To some extent, this category corresponds to deprecated ``ENTRY`` and
``END``. Except ``END`` had several other meanings too.
- Developers should avoid using local symbol names that are prefixed with
- ``.L``, as this has special meaning for the assembler; a symbol entry will
- not be emitted into the symbol table. This can prevent ``objtool`` from
- generating correct unwind info. Symbols with STB_LOCAL binding may still be
- used, and ``.L`` prefixed local symbol names are still generally useable
- within a function, but ``.L`` prefixed local symbol names should not be used
- to denote the beginning or end of code regions via
- ``SYM_CODE_START_LOCAL``/``SYM_CODE_END``.
-
* ``SYM_INNER_LABEL*`` is used to denote a label inside some
``SYM_{CODE,FUNC}_START`` and ``SYM_{CODE,FUNC}_END``. They are very similar
to C labels, except they can be made global. An example of use::
--
2.30.0.284.gd98b1dd5eaa7-goog
Powered by blists - more mailing lists