aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* Use MCSectionELF in places we know we have an ELF section.Rafael Espindola2010-11-102-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118699 91177308-0d34-0410-b5e6-96231b3b80d8
* Update ARMConstantPoolValue to not use a modifier string. Use an explicitJim Grosbach2010-11-101-1/+11
| | | | | | | | | VariantKind marker to indicate the additional information necessary. Update MC to handle the new Kinds. rdar://8647623 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118671 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola2010-11-094-40/+30
| | | | | | 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-094-29/+40
| | | | 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-094-40/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118639 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Daniel Dunbar2010-11-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118421 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
* Speed up AddSectionToTheEnd. It was walking all fragments in all sections.Rafael Espindola2010-11-071-19/+4
| | | | | | | | | | This is really slow with we have 1000s of sections each with a corresponding relocation section. Also, it is only used by the ELF writer to add basic data, so there is no need to force a new layout pass. Should fix PR8563. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118377 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax dwarf line fragments. This fixes a crash in the included testcase.Rafael Espindola2010-11-071-13/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118365 91177308-0d34-0410-b5e6-96231b3b80d8
* Add '.code 32' assembler directive to MC streamers.Jim Grosbach2010-11-053-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118309 91177308-0d34-0410-b5e6-96231b3b80d8
* MC'ize the '.code 16' and '.thumb_func' ARM directives.Jim Grosbach2010-11-056-2/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118301 91177308-0d34-0410-b5e6-96231b3b80d8
* Put class into an anonymous namespace.Benjamin Kramer2010-11-051-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118294 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to specify the MachO CPUType/CPUSubtype information.Jim Grosbach2010-11-051-7/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118288 91177308-0d34-0410-b5e6-96231b3b80d8
* syntaxunified directive is a no-op for MachO writing.Jim Grosbach2010-11-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118287 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 118023 back, but with proper spelling for .uleb128/.sleb128.Rafael Espindola2010-11-041-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118254 91177308-0d34-0410-b5e6-96231b3b80d8
* Do relaxations with FT_Org fragments. Fixes the FIXME:Rafael Espindola2010-11-021-18/+24
| | | | | | | | | // FIXME: We should compute this sooner, we don't want to recurse here, and // we would like to be more functional. In MCAssembler::ComputeFragmentSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118080 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for expressions in .sleb/.uleb directives.Rafael Espindola2010-11-028-87/+159
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118023 91177308-0d34-0410-b5e6-96231b3b80d8
* Write the line info to .debug_line.Rafael Espindola2010-11-011-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117930 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EmitInstruction to MCObjectStreamer so that ELF and MachO can share it.Rafael Espindola2010-11-014-69/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117925 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .value.Rafael Espindola2010-11-011-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117922 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .weakref.Rafael Espindola2010-11-018-2/+121
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117911 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for files with more than 65280 sections. No testcase sinceRafael Espindola2010-10-311-42/+109
| | | | | | it would be a bit too big :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117849 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more strict on when we produce an undefined reference. In gas a file withRafael Espindola2010-10-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | just .type foo,@object will produce an undefined reference to foo. On the other hand, a file with just .weakref bar, foo will not. It is somewhat hard to support both in MC since both statements should create the symbols. It should be possible if we really need to by adding to the flags, but hopefully that is not necessary. With this patch we do not produce a undefined reference in any of those cases. The assembly file needs an actual use for the undefined reference to be present. This is in preparation for a patch implementing .weakref. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117735 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
* Add support for the .string directive.Rafael Espindola2010-10-281-8/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117592 91177308-0d34-0410-b5e6-96231b3b80d8
* Defined weak symbols should have non-zero value.Rafael Espindola2010-10-281-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117585 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix relocations with renamed symbols.Rafael Espindola2010-10-281-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117575 91177308-0d34-0410-b5e6-96231b3b80d8
* Aliases defined with .symver should copy the binding of the symbols they alias.Rafael Espindola2010-10-281-6/+21
| | | | | | | Move the existing patching for undefined symbols so that all the patching is done in the same function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117570 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the IDVal directly as there's no need to convert to std::string.Roman Divacky2010-10-281-2/+2
| | | | | | | | Pointed out by Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117557 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .equ directive as a synonym to .set.Roman Divacky2010-10-281-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117553 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement R_X86_64_DTPOFF32.Rafael Espindola2010-10-281-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117548 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement TLSLD.Rafael Espindola2010-10-282-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117547 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement DTPOFF.Rafael Espindola2010-10-282-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117546 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement TLSLDM.Rafael Espindola2010-10-282-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117544 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.Rafael Espindola2010-10-282-15/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117543 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.Rafael Espindola2010-10-271-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117494 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement R_X86_64_GOTTPOFF, R_X86_64_TLSGD and R_X86_64_TPOFF32.Rafael Espindola2010-10-271-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117481 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace pointer arithmetic with StringRef::substr.Benjamin Kramer2010-10-271-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117477 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
* Produce an error for an invalid use of .symver.Rafael Espindola2010-10-271-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117462 91177308-0d34-0410-b5e6-96231b3b80d8
* Symbols defined as the difference of other two end up in the ABS section.Rafael Espindola2010-10-271-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117451 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the .symver directive. This is really ugly, but most of it isRafael Espindola2010-10-272-14/+86
| | | | | | contained in the ELF object writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117448 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more logic to isInSymtab and simplify.Rafael Espindola2010-10-271-21/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117447 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/AsmParser: Fix relative precedence of {+,-} and comparison ops.Daniel Dunbar2010-10-251-12/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117299 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmLexer: Fix bug in source location for Slash token.Daniel Dunbar2010-10-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117298 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for emitting ARM file attributes.Rafael Espindola2010-10-251-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117275 91177308-0d34-0410-b5e6-96231b3b80d8
* Add X86::reloc_global_offset_table and use it to have a single place whereRafael Espindola2010-10-241-4/+5
| | | | | | we check for _GLOBAL_OFFSET_TABLE_. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117241 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some symbols static, move classes into anonymous namespaces.Benjamin Kramer2010-10-221-13/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117111 91177308-0d34-0410-b5e6-96231b3b80d8
* Making the e_machine configurable by the target backend in ELFObjectWriter.Wesley Peck2010-10-221-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117099 91177308-0d34-0410-b5e6-96231b3b80d8