[all-commits] [llvm/llvm-project] 04c278: [MC, COFF] Change how we handle section symbols

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jun 25 14:01:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 04c27852e47093f7efa18609dbf57b3ce58a3ffa
      https://github.com/llvm/llvm-project/commit/04c27852e47093f7efa18609dbf57b3ce58a3ffa
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCWinCOFFStreamer.h
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCObjectFileInfo.cpp
    M llvm/lib/MC/MCWinCOFFStreamer.cpp
    M llvm/lib/MC/WinCOFFObjectWriter.cpp
    M llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll
    M llvm/test/DebugInfo/X86/ref_addr_relocation.ll
    M llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s
    M llvm/test/MC/COFF/section-comdat-conflict.s
    M llvm/test/MC/COFF/section-comdat.s
    A llvm/test/MC/COFF/section-sym-err.s

  Log Message:
  -----------
  [MC,COFF] Change how we handle section symbols

13a79bbfe583e1d8cc85d241b580907260065eb8 (2017) unified `BeginSymbol` and
section symbol for ELF. This patch does the same for COFF.

* In getCOFFSection, all sections now have a `BeginSymbol` (section
  symbol). We do not need a dummy symbol name when `getBeginSymbol` is
  needed (used by AsmParser::Run and DWARF generation).
* Section symbols are in the global symbol table. `call .text` will
  reference the section symbol instead of an undefined symbol. This
  matches GNU assembler. Unlike GNU, redefining the section symbol will
  cause a "symbol 'foo0' is already defined" error (see
  `section-sym-err.s`).

Pull Request: https://github.com/llvm/llvm-project/pull/96459



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