This is an archive of the discontinued LLVM Phabricator instance.

[MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPS
ClosedPublic

Authored by atanasyan on Feb 9 2017, 2:07 PM.

Details

Summary

All MIPS .debug_* sections should be marked with ELF type SHT_MIPS_DWARF accordingly the specification [1]. Also the same section type is assigned to these sections by GNU tools.

[1] ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan created this revision.Feb 9 2017, 2:07 PM
sdardis accepted this revision.Feb 13 2017, 5:20 AM

This patch appears to be missing the declaration for SHT_MIPS_DWARF = 0x7000001e in include/llvm/Support/ELF.h.

One comment request inlined.

lib/MC/MCObjectFileInfo.cpp
508 ↗(On Diff #87875)

This hunk could probably do with a comment noting that it is historical behaviour / an extension to DWARF-2 for MIPS to mark debug sections with SHT_MIPS_DWARF rather than the usual SHT_PROGBITS.

This revision is now accepted and ready to land.Feb 13 2017, 5:20 AM
This revision was automatically updated to reflect the committed changes.