[all-commits] [llvm/llvm-project] 6d766c: DebugInfo/Symbolize: Allow STT_NOTYPE/STT_GNU_IFUN...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Feb 8 12:29:31 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d766c8bf9df3c22590a78c77879080736ad55ae
      https://github.com/llvm/llvm-project/commit/6d766c8bf9df3c22590a78c77879080736ad55ae
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
    A llvm/test/DebugInfo/Symbolize/ELF/symtab-file.s
    A llvm/test/DebugInfo/Symbolize/ELF/symtab-ifunc.s
    A llvm/test/DebugInfo/Symbolize/ELF/symtab-ignored.s
    A llvm/test/DebugInfo/Symbolize/ELF/symtab-notype.s

  Log Message:
  -----------
  DebugInfo/Symbolize: Allow STT_NOTYPE/STT_GNU_IFUNC symbols for .symtab symbolization

In assembly files, omitting `.type foo, at function` is common. Such functions have
type `STT_NOTYPE` and llvm-symbolizer reports `??` for them.

An ifunc symbol usually has an associated resolver symbol which is defined at
the same address. Returning either one is fine for symbolization. The resolver
symbol may not end up in the symbol table if (object file) `.L` is used (linked
image) .symtab is stripped while .dynsym is retained.

This patch allows ELF STT_NOTYPE/STT_GNU_IFUNC symbols for .symtab symbolization.

I have left TODO in the test files for an unimplemented STT_FILE heuristic.

Differential Revision: https://reviews.llvm.org/D95916




More information about the All-commits mailing list