[all-commits] [llvm/llvm-project] d6576a: Do not emit a named symbol to denote the start of ...

Shubham Sandeep Rastogi via All-commits all-commits at lists.llvm.org
Mon Jun 26 11:43:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6576add99e5ebf936f836aa3ecdc85deb33687e
      https://github.com/llvm/llvm-project/commit/d6576add99e5ebf936f836aa3ecdc85deb33687e
  Author: Shubham Sandeep Rastogi <srastogi22 at apple.com>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M llvm/lib/MC/MCObjectFileInfo.cpp
    A llvm/test/DebugInfo/debug_frame_symbol.ll

  Log Message:
  -----------
  Do not emit a named symbol to denote the start of the debug_frame section

When emitting a debug_frame section, it contains a named symbol.

> echo "void foo(void) {}" | clang -arch arm64  -ffreestanding -g -c -o \
/tmp/test.o -x c -
> nm /tmp/test.o -s __DWARF __debug_frame
0000000000000200 s ltmp1

There are no such symbols emitted in any of the other DWARF sections,
this is because when the __debug_frame section is created, it doesn't
get a `BeginSymName` and so it creates a named symbol, such as `ltmp1`
and emits it when we switch to the section in MCDwarf.cpp.

This patch fixes the above issue.

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




More information about the All-commits mailing list