linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Mark Brown <broonie@kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Documentation: asm-annotation: clarify .L local symbol names
Date: Wed, 13 Jan 2021 09:46:20 -0800	[thread overview]
Message-ID: <20210113174620.958429-1-ndesaulniers@google.com> (raw)
In-Reply-To: <20210113165923.acvycpcu5tzksbbi@treble>

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@kernel.org>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.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


  reply	other threads:[~2021-01-13 17:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 23:21 [PATCH] x86/entry: use STB_GLOBAL for register restoring thunk Nick Desaulniers
2020-12-24  4:55 ` Josh Poimboeuf
2021-01-06  0:43   ` [PATCH v2] " Nick Desaulniers
2021-01-06  1:58     ` Josh Poimboeuf
2021-01-11 20:38       ` [PATCH v3] x86/entry: emit a symbol " Nick Desaulniers
2021-01-11 20:58         ` Fangrui Song
2021-01-11 22:09           ` Josh Poimboeuf
2021-01-11 22:16             ` Fāng-ruì Sòng
2021-01-11 22:12         ` Josh Poimboeuf
2021-01-12  0:38         ` Borislav Petkov
2021-01-12  0:41           ` Fāng-ruì Sòng
2021-01-12  1:00             ` Borislav Petkov
2021-01-12  1:13               ` Nick Desaulniers
2021-01-12  1:59                 ` Josh Poimboeuf
2021-01-12 11:54                   ` Borislav Petkov
2021-01-12 19:46                     ` [PATCH v4] " Nick Desaulniers
2021-01-12 21:01                       ` Mark Brown
2021-01-13 16:59                         ` Josh Poimboeuf
2021-01-13 17:46                           ` Nick Desaulniers [this message]
2021-01-13 19:56                             ` [PATCH] Documentation: asm-annotation: clarify .L local symbol names Mark Brown
2021-01-13 17:56                           ` [PATCH v4] x86/entry: emit a symbol for register restoring thunk Nick Desaulniers
2021-01-14 10:39                             ` Borislav Petkov
2021-01-14 11:36                               ` Peter Zijlstra
2021-01-14 13:28                                 ` [PATCH] x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument Borislav Petkov
2021-01-14 15:53                                   ` Peter Zijlstra
2021-01-19 10:12                                 ` [tip: x86/entry] " tip-bot2 for Borislav Petkov
2021-01-14 15:14                               ` [PATCH v4] x86/entry: emit a symbol for register restoring thunk Josh Poimboeuf
2021-01-13 11:52                       ` [tip: x86/entry] x86/entry: Emit " tip-bot2 for Nick Desaulniers
2021-01-19 10:12                       ` tip-bot2 for Nick Desaulniers
2021-01-12 11:47                 ` [PATCH v3] x86/entry: emit " Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113174620.958429-1-ndesaulniers@google.com \
    --to=ndesaulniers@google.com \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jpoimboe@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).