aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCParser/ELFAsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-181-3/+11
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-41/+13
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-1/+1
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-211-47/+57
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-291-4/+4
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-241-9/+79
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Move .ident handling to MCStreamer.Rafael Espindola2013-10-161-22/+4
| | | | | | | | No functionality change, but exposes the API so that codegen can use it too. Patch by Katya Romanova. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192757 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF: Parse types in directives like binutils gasDavid Majnemer2013-09-211-20/+43
| | | | | | | | | | | Allow binutils .type and .section directives to take the following forms: - @<type> - %<type> - "<type>" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191134 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-151-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190769 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add support for '?' flags in .section directivesDavid Majnemer2013-09-151-2/+20
| | | | | | | | | | | | | | | | | | | Summary: The '?' flag uses the last section group if the last had a section group. We treat combining an explicit section group and the '?' as a hard error. This fixes PR17198. Reviewers: rafael, bkramer Reviewed By: bkramer CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1686 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190768 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused StringRef that no compiler warned about, I wonder why.Benjamin Kramer2013-09-141-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190759 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for subsections to the ELF assembler. Fixes PR8717.Peter Collingbourne2013-04-171-9/+44
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D598 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179725 91177308-0d34-0410-b5e6-96231b3b80d8
* MCParser: Update method names per coding guidelines.Jim Grosbach2013-02-201-41/+41
| | | | | | | | | | | | | | | | | | | s/AddDirectiveHandler/addDirectiveHandler/ s/ParseMSInlineAsm/parseMSInlineAsm/ s/ParseIdentifier/parseIdentifier/ s/ParseStringToEndOfStatement/parseStringToEndOfStatement/ s/ParseEscapedString/parseEscapedString/ s/EatToEndOfStatement/eatToEndOfStatement/ s/ParseExpression/parseExpression/ s/ParseParenExpression/parseParenExpression/ s/ParseAbsoluteExpression/parseAbsoluteExpression/ s/CheckForValidSection/checkForValidSection/ http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive ELF section type from the name in some cases where GNU as doesJoerg Sonnenberger2013-02-161-1/+10
| | | | | | | so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175327 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the ExtensionDirectiveHandler type in other places where it makes sense.Eli Bendersky2013-01-161-3/+5
| | | | | | | | | Since we already have this type it's a shame to keep dragging a pair of object and method around explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172584 91177308-0d34-0410-b5e6-96231b3b80d8
* These functions have default arguments of 0 for the last arg. UseEric Christopher2013-01-091-2/+2
| | | | | | them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171933 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163547 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF: Add support for the asm .version directive.Benjamin Kramer2012-05-121-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156712 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for gnu_indirect_function.Roman Divacky2011-12-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146377 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-251-0/+44
| | | | | | | | | | | | | | | The .local, .hidden, .internal, and .protected are not legal for all supported file formats (in particular, they're invalid for MachO). Move the parsing for them into the ELF assembly parser since that's the format they're for. Similarly, .weak is used by COFF and ELF, but not MachO, so move the parsing to the COFF and ELF asm parsers. Previously, using any of these directives on Darwin would result in an assertion failure in the parser; now we get a diagnostic as we should. rdar://9827089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135921 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. 80 columns.Jim Grosbach2011-07-251-5/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135917 91177308-0d34-0410-b5e6-96231b3b80d8
* Restore r125595 (reverted in r126336) with modifications:Joerg Sonnenberger2011-02-241-1/+3
| | | | | | | | Introduce a variable in the AsmParserExtension whether [] is valid in an expression. If it is true, parse them like (). Enable this for ELF only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126443 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug#9172: Don't use static in file scope, use an attribute on theJoerg Sonnenberger2011-02-221-5/+5
| | | | | | | parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-4/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125629 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle strings in section names the same way as gas:Rafael Espindola2011-01-241-3/+14
| | | | | | | * If the name is a single string, we remove the quotes * If the name starts without a quote, we include any quotes in the name git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124127 91177308-0d34-0410-b5e6-96231b3b80d8
* Delay the creation of eh_frame so that the user can change the defaults.Rafael Espindola2011-01-231-0/+2
| | | | | | Add support for SHT_X86_64_UNWIND. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124059 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more duplicated code.Rafael Espindola2011-01-231-35/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124056 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplicated code.Rafael Espindola2011-01-231-18/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for @note. Patch by Jörg Sonnenberger.Rafael Espindola2010-12-261-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122568 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some code to parseSectionFlags and fix the default type of a section.Rafael Espindola2010-11-251-49/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120145 91177308-0d34-0410-b5e6-96231b3b80d8
* Behave a bit more like gnu as and use the symbol (instead of the section)Rafael Espindola2010-11-241-3/+9
| | | | | | for any relocation to a symbol defined in a tls section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120121 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse and record the gnu_unique_object type.Rafael Espindola2010-11-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118980 91177308-0d34-0410-b5e6-96231b3b80d8
* gnu as support both % and @ before types, do the same.Rafael Espindola2010-11-121-10/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118893 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial comdat implementation.Rafael Espindola2010-11-111-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118805 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola2010-11-091-3/+2
| | | | | | earlier. Implicit bool -> int conversions are evil! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118651 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert previous patch. Missed a case.Rafael Espindola2010-11-091-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118645 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove IsExplicit. It was always false.Rafael Espindola2010-11-091-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118639 91177308-0d34-0410-b5e6-96231b3b80d8
* Set default flags for .rodata.Rafael Espindola2010-11-081-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118395 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .weakref.Rafael Espindola2010-11-011-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117911 91177308-0d34-0410-b5e6-96231b3b80d8
* Improvements to .section parsing:Rafael Espindola2010-10-281-10/+38
| | | | | | | | | | * If we have a M or a G, reject sections without the type * Only parse the flag specific arguments if we have M or G * Parse the corresponding arguments for M and G We ignore the G arguments and flag for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117608 91177308-0d34-0410-b5e6-96231b3b80d8
* Set default type and flags for .init and .fini.Rafael Espindola2010-10-271-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117471 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the .symver directive. This is really ugly, but most of it isRafael Espindola2010-10-271-0/+30
| | | | | | contained in the ELF object writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117448 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .ident.Rafael Espindola2010-10-261-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117389 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Move ParseDirectiveELFType into ELFAsmParser. COFF uses .type for ↵Michael J. Spencer2010-10-091-1/+49
| | | | | | something else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116142 91177308-0d34-0410-b5e6-96231b3b80d8
* Have ELFAsmParser.cpp use the already parsed "Size" (entry size) when Jan Wen Voung2010-09-301-1/+2
| | | | | | | constructing a section. Test for a few cases also included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115132 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure .text doesn't produce extra alignment.Rafael Espindola2010-09-271-9/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114895 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that names like .note.GNU-stack are accepted as valid section names.Rafael Espindola2010-09-161-2/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114091 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a InitSections method to the streamer interface.Rafael Espindola2010-09-151-3/+11
| | | | | | | | | | | | | | The ELF implementation now creates text, data and bss to match the gnu as behavior. The text streamer still has the old MachO specific behavior since the testsuite checks that it will error when a directive is given before a setting the current section for example. A nice benefit is that -n is not required anymore when producing ELF files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114027 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for leb128 of absolute expressions.Rafael Espindola2010-09-111-23/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113691 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.Benjamin Kramer2010-09-021-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112849 91177308-0d34-0410-b5e6-96231b3b80d8