On Wed, 24 Feb 2016, Ralf Baechle wrote:
quoted
If LLVM strives to be GNU toolchain compatible, then this looks like a
bug in their scanner as generic ELF support in GAS (gas/config/obj-elf.c)
has this, in `obj_elf_type':
if (*input_line_pointer == ',')
++input_line_pointer;
so the comma is entirely optional. I realise this is undocumented, but
there you go. It must have been there since forever.
It contradicts documentation. The gas manual says:
* Type:: `.type <INT | NAME , TYPE DESCRIPTION>'
And the SGI assembler manual I dug up as ".type name, value". So maybe
gas is too generous here?
I find it interesting that you mention SGI here as the commit which might
be responsible for the current interpretation is this:
Mon Sep 12 17:51:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* config/obj-elf.c (obj_elf_type): Rewrite to accept syntax
reportedly to be used on Irix 6.
Given its age I doubt further information can be found, it might be just
sloppy coding.
Either way, I think the patch is right and I've just applied v2.
Sure, thanks!
Maciej