MC: make ELF .type handling more GNU AS compatible
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 8 Jun 2014 00:34:34 +0000 (00:34 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 8 Jun 2014 00:34:34 +0000 (00:34 +0000)
commiteb5f5ae200027a0266d4dfcd445d424a1561eb11
tree56d00b19f9e58d42743e0b542f4ea1fe5d81cd99
parenta926467222cb4843d991e4d2f19d42bfed4b3e99
MC: make ELF .type handling more GNU AS compatible

GAS documents the .type directive as having an optional comma following the key
symbol name when using the STT_<TYPE_IN_UPPER_CASE> form.  However, it treats
the comma as optional in all cases.  This makes the IAS support both forms of
inputs.  Furthermore, the prefixed forms take either the upper case name or the
lower case alias.

The tests are split into two separate sets as the hash character serves as a
comment character on x86, which is tested in the second set by using arm-elf
which uses the at symbol as a comment character.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210407 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/ELFAsmParser.cpp
test/MC/ELF/gnu-type-diagnostics.s [new file with mode: 0644]
test/MC/ELF/gnu-type-hash-diagnostics.s [new file with mode: 0644]
test/MC/ELF/gnu-type-hash.s [new file with mode: 0644]
test/MC/ELF/gnu-type.s [new file with mode: 0644]