diff options
author | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2023-06-21 16:47:28 -0700 |
---|---|---|
committer | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2023-06-26 11:43:07 -0700 |
commit | d6576add99e5ebf936f836aa3ecdc85deb33687e (patch) | |
tree | 8f6760d71234e80ccd3fd72c5d15456461427228 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 4c37d30e22ae655394c8b3a7e292c06d393b9b44 (diff) | |
download | llvm-d6576add99e5ebf936f836aa3ecdc85deb33687e.zip llvm-d6576add99e5ebf936f836aa3ecdc85deb33687e.tar.gz llvm-d6576add99e5ebf936f836aa3ecdc85deb33687e.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index d3b9fa45..9fceaa2 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -249,7 +249,7 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { SectionKind::getMetadata(), "section_line_str"); DwarfFrameSection = Ctx->getMachOSection("__DWARF", "__debug_frame", MachO::S_ATTR_DEBUG, - SectionKind::getMetadata()); + SectionKind::getMetadata(), "section_frame"); DwarfPubNamesSection = Ctx->getMachOSection("__DWARF", "__debug_pubnames", MachO::S_ATTR_DEBUG, SectionKind::getMetadata()); |