Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • Makefile.lib
Find file BlameHistoryPermalink
  • Peter Zijlstra's avatar
    x86: Add prefix symbols for function padding · b341b20d
    Peter Zijlstra authored Oct 28, 2022
    
    
    When code is compiled with:
    
      -fpatchable-function-entry=${PADDING_BYTES},${PADDING_BYTES}
    
    functions will have PADDING_BYTES of NOP in front of them. Unwinders
    and other things that symbolize code locations will typically
    attribute these bytes to the preceding function.
    
    Given that these bytes nominally belong to the following symbol this
    mis-attribution is confusing.
    
    Inspired by the fact that CFI_CLANG emits __cfi_##name symbols to
    claim these bytes, use objtool to emit __pfx_##name symbols to do
    the same when CFI_CLANG is not used.
    
    This then shows the callthunk for symbol 'name' as:
    
      __pfx_##name+0x6/0x10
    
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Tested-by: default avatarYujie Liu <yujie.liu@intel.com>
    Link: https://lkml.kernel.org/r/20221028194453.592512209@infradead.org
    b341b20d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7