[all-commits] [llvm/llvm-project] 990e80: [MC][ELF] Do not error on parsing .debug_* section...

Simon Atanasyan via All-commits all-commits at lists.llvm.org
Sun Aug 8 22:55:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 990e8025b5fcac42da6e7ce082cd9bf81b4fbbf7
      https://github.com/llvm/llvm-project/commit/990e8025b5fcac42da6e7ce082cd9bf81b4fbbf7
  Author: Simon Atanasyan <simon at atanasyan.com>
  Date:   2021-08-09 (Mon, 09 Aug 2021)

  Changed paths:
    M llvm/lib/MC/MCParser/ELFAsmParser.cpp
    M llvm/test/MC/Mips/elf-debug-section.s

  Log Message:
  -----------
  [MC][ELF] Do not error on parsing .debug_* section directive for MIPS

MIPS .debug_* sections should have SHT_MIPS_DWARF section type to
distinguish among sections contain DWARF and ECOFF debug formats, but in
assembly files these sections have SHT_PROGBITS (@progbits) type. Now
assembler shows 'changed section type for ...' error when parsing
`.section .debug_*,"", at progbits` directive for MIPS targets.

The same problem exists for x86-64 target and this patch extends
workaround implemented in D76151. The patch adds one more case
when assembler ignores section types mismatch after `SwitchSection()`
call.

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




More information about the All-commits mailing list