[PATCH] D29719: [MC] Accept and print a numeric value as an ELF section header's type

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 25 23:50:03 PST 2017


On Fri, Feb 24, 2017 at 11:16 PM, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Simon Atanasyan <simon at atanasyan.com> writes:
>
>> In general, it's better to have a text code. But I do not see any
>> disadvantages in being compatible with GAS and being able to accept
>> assembly which accepted by GAS. The numeric section types do not looks
>> as an ugly hack.
>
> Oh, I have no problem with accepting a numeric value to accept a .s file
> that gas accepts.
>
> It is printing one that I find odd.

Agreed.

But there is a bug which needs to e fixed - on MIPS all .debug_*
sections with DWARF data should have the SHT_MIPS_DWARF section type
to differentiate them from sections with the same name but contain
non-DWARF debug information.
https://reviews.llvm.org/D29789.

If I just assign the SHT_MIPS_DWARF to such sections, the MCSectionELF
will print `.section .debug_info,"",@`. It looks even more odd than
`.section .debug_info,"", at 0x7000001e`.

-- 
Simon Atanasyan


More information about the llvm-commits mailing list