[all-commits] [llvm/llvm-project] 1869b1: [ELF] --why-live: Skip symbol at index 0 and secti...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jan 21 18:58:57 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1869b15a0569e4e0fa0b97ee462db4e826519d4f
      https://github.com/llvm/llvm-project/commit/1869b15a0569e4e0fa0b97ee462db4e826519d4f
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-01-22 (Thu, 22 Jan 2026)

  Changed paths:
    M lld/ELF/MarkLive.cpp
    M lld/test/ELF/why-live.test

  Log Message:
  -----------
  [ELF] --why-live: Skip symbol at index 0 and section symbols, handle .eh_frame symbols (#177099)

Symbols of empty names can be matched by `--why-live='*'`, which are
generally not useful.

* The first entry in a symbol table (STB_LOCAL and undefined)
* `STT_SECTION` symbols (emitted by LLVM integrated assembler when
  needed by relocations). These input section symbols will be demoted by
  `demoteAndCopyLocalSymbols`, so technically not really live.
  In addition, such symbols of non-allocable sections currently lead to
  crashes: `whyLive` does not record the section, causing the second
  iteration of the `while (true)` loop in printWhyLive to call
  `std::get<Symbol *>(cur)` when `cur` is an `InputSectionBase *`.

In addition, handle GCC crtendS.o `__FRAME_END__`, which is defined
relative to a `.eh_frame` section created with
`__attribute__((used, section(".eh_frame")))`.

Fix #176890



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list