summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/ELFAsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a comma after the unique keyword.Rafael Espindola2015-04-061-0/+3
| | | | | | | | H.J. Lu noted that all .section options are separated by a comma. This patch changes the syntax of unique to require one. llvm-svn: 234174
* Implement unique sections with an unique ID.Rafael Espindola2015-04-041-3/+8
| | | | | | | | | | | This allows the compiler/assembly programmer to switch back to a section. This in turn fixes the bootstrap failure on powerpc (tested on gcc110) without changing the ppc codegen at all. I will try to cleanup the various getELFSection overloads in a followup patch. Just using a default argument now would lead to ambiguities. llvm-svn: 234099
* Add r228980 back.Rafael Espindola2015-02-171-2/+12
| | | | | | | | | | Add support for having multiple sections with the same name and comdat. Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 229541
* Revert a series of commits starting at r228886 which is triggering someChandler Carruth2015-02-131-12/+2
| | | | | | | | | | | | | | | | regressions for LLDB on Linux. Rafael indicated on lldb-dev that we should just go ahead and revert these but that he wasn't at a computer. The patches backed out are as follows: r228980: Add support for having multiple sections with the name and ... r228889: Invert the section relocation map. r228888: Use the existing SymbolTableIndex intsead of doing a lookup. r228886: Create the Section -> Rel Section map when it is first needed. These patches look pretty nice to me, so hoping its not too hard to get them re-instated. =D llvm-svn: 229080
* Add support for having multiple sections with the same name and comdat.Rafael Espindola2015-02-121-2/+12
| | | | | | | | Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 228980
* Compute the ELF SectionKind from the flags.Rafael Espindola2015-01-291-42/+4
| | | | | | | | | | | | Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476
* Downgrade DWARF2 section limit error to a warningOliver Stannard2014-09-221-1/+1
| | | | | | | | | We currently emit an error when trying to assemble a file with more than one section using DWARF2 debug info. This should be a warning instead, as the resulting file will still be usable, but with a degraded debug illusion. llvm-svn: 218241
* Emit DWARF info for all code section in an assembly fileOliver Stannard2014-06-191-9/+23
| | | | | | | | Currently, when using llvm as an assembler, DWARF debug information is only generated for the .text section. This patch modifies this so that DWARF info is emitted for all executable sections. llvm-svn: 211273
* MC: make ELF .type handling more GNU AS compatibleSaleem Abdulrasool2014-06-081-38/+34
| | | | | | | | | | | | | | 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. llvm-svn: 210407
* [C++] Use 'nullptr'.Craig Topper2014-04-241-4/+4
| | | | llvm-svn: 207083
* Map ELf flags back to more specific section kinds.Rafael Espindola2014-03-281-2/+28
| | | | | | With that, convert another llc -filetype=obj test. llvm-svn: 205031
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-081-1/+1
| | | | | | class. llvm-svn: 203342
* Add support for parsing sun-style section flags in ELFAsmParser.Venkatraman Govindaraju2014-03-011-6/+43
| | | | llvm-svn: 202573
* Fix parsing of .symver directive on ARMDavid Peixotto2014-01-151-0/+7
| | | | | | | | | | | | | | | ARM assembly syntax uses @ for a comment, execpt for the second parameter of the .symver directive which requires @ as part of the symbol name. This commit fixes the parsing of this directive by adding a special case for ARM for this one argumnet. To make the change we had to move the AllowAtInIdentifier variable to the MCAsmLexer interface (from AsmLexer) and expose a setter for the value. The ELFAsmParser then toggles this value when parsing the second argument to the .symver directive for a target that uses @ as a comment symbol llvm-svn: 199339
* 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. llvm-svn: 192757
* 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>" llvm-svn: 191134
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-151-5/+8
| | | | llvm-svn: 190769
* 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 llvm-svn: 190768
* Remove unused StringRef that no compiler warned about, I wonder why.Benjamin Kramer2013-09-141-1/+0
| | | | llvm-svn: 190759
* Add support for subsections to the ELF assembler. Fixes PR8717.Peter Collingbourne2013-04-171-9/+44
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D598 llvm-svn: 179725
* 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. llvm-svn: 175675
* Derive ELF section type from the name in some cases where GNU as doesJoerg Sonnenberger2013-02-161-1/+10
| | | | | | so. llvm-svn: 175327
* 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. llvm-svn: 172584
* These functions have default arguments of 0 for the last arg. UseEric Christopher2013-01-091-2/+2
| | | | | | them. llvm-svn: 171933
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163547
* ELF: Add support for the asm .version directive.Benjamin Kramer2012-05-121-0/+28
| | | | llvm-svn: 156712
* Add support for gnu_indirect_function.Roman Divacky2011-12-121-0/+1
| | | | llvm-svn: 146377
* 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 llvm-svn: 135921
* Tidy up. 80 columns.Jim Grosbach2011-07-251-5/+10
| | | | llvm-svn: 135917
* 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. llvm-svn: 126443
* Bug#9172: Don't use static in file scope, use an attribute on theJoerg Sonnenberger2011-02-221-5/+5
| | | | | | parser. llvm-svn: 126225
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-4/+26
| | | | llvm-svn: 125629
* 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 llvm-svn: 124127
* 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. llvm-svn: 124059
* Remove more duplicated code.Rafael Espindola2011-01-231-35/+35
| | | | llvm-svn: 124056
* Remove duplicated code.Rafael Espindola2011-01-231-18/+19
| | | | llvm-svn: 124054
* Add support for @note. Patch by Jörg Sonnenberger.Rafael Espindola2010-12-261-0/+2
| | | | llvm-svn: 122568
* Factor some code to parseSectionFlags and fix the default type of a section.Rafael Espindola2010-11-251-49/+58
| | | | llvm-svn: 120145
* 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. llvm-svn: 120121
* Parse and record the gnu_unique_object type.Rafael Espindola2010-11-131-0/+1
| | | | llvm-svn: 118980
* gnu as support both % and @ before types, do the same.Rafael Espindola2010-11-121-10/+4
| | | | llvm-svn: 118893
* Initial comdat implementation.Rafael Espindola2010-11-111-5/+7
| | | | llvm-svn: 118805
* Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola2010-11-091-3/+2
| | | | | | earlier. Implicit bool -> int conversions are evil! llvm-svn: 118651
* Revert previous patch. Missed a case.Rafael Espindola2010-11-091-2/+3
| | | | llvm-svn: 118645
* Remove IsExplicit. It was always false.Rafael Espindola2010-11-091-3/+2
| | | | llvm-svn: 118639
* Set default flags for .rodata.Rafael Espindola2010-11-081-1/+3
| | | | llvm-svn: 118395
* Implement .weakref.Rafael Espindola2010-11-011-0/+28
| | | | llvm-svn: 117911
* 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. llvm-svn: 117608
* Set default type and flags for .init and .fini.Rafael Espindola2010-10-271-1/+9
| | | | llvm-svn: 117471
* 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. llvm-svn: 117448
OpenPOWER on IntegriCloud