summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-011-3/+3
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Support .code32 and .code64 in X86 assembler.Evan Cheng2011-07-271-2/+3
| | | | llvm-svn: 136197
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-3/+3
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-1/+1
| | | | | | they belong. llvm-svn: 135833
* Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng2011-07-141-1/+0
| | | | | | | | | TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( llvm-svn: 135131
* sets bit 0 of the function address of thumb function in .symtabRafael Espindola2011-05-161-0/+5
| | | | | | | | | | ("T is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction ;it is 0 otherwise." from "ELF for the ARM Architecture" 4.7.1.2) Patch by Koan-Sin Tan! llvm-svn: 131406
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-101-2/+1
| | | | llvm-svn: 131119
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-011-1/+1
| | | | | | -fno-dwarf2-cfi-asm. Implement the same behavior. llvm-svn: 130637
* Fix handling of @IDNTPOFF relocations, they need to get STT_TLS.Joerg Sonnenberger2011-03-171-2/+5
| | | | | | While here, add VK_ARM_TPOFF and VK_ARM_GOTTPOFF, too. llvm-svn: 127780
* Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that ↵Jan Sjödin2011-03-031-117/+2
| | | | | | other components can use them. llvm-svn: 126942
* Make all static functions become static class methods. Move shared ↵Jan Sjödin2011-02-281-49/+18
| | | | | | (duplicated) functions to new MCELF class. llvm-svn: 126686
* Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.Cameron Zwarich2011-02-251-4/+0
| | | | llvm-svn: 126488
* Enable DebugInfo support for COFF object files.Devang Patel2011-02-241-0/+4
| | | | | | Patch by Nathan Jeffords! llvm-svn: 126425
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-4/+4
| | | | llvm-svn: 125629
* Add support for the --noexecstack option.Rafael Espindola2011-01-231-2/+4
| | | | llvm-svn: 124077
* Remove more duplicated code.Rafael Espindola2011-01-231-8/+8
| | | | llvm-svn: 124056
* Remove duplicated code.Rafael Espindola2011-01-231-4/+4
| | | | llvm-svn: 124054
* Add basic support for .cfi_personality.Rafael Espindola2010-12-261-1/+1
| | | | llvm-svn: 122566
* 1. ARM/MC/ELF: A few more ELF relocs for .oJason W Kim2010-12-161-3/+12
| | | | | | | 2. Fixed EmitLocalCommonSymbol for ELF (Yes, they exist. :) Test added. llvm-svn: 121951
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-101-8/+3
| | | | llvm-svn: 121471
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-101-3/+8
| | | | llvm-svn: 121461
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-091-8/+3
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). llvm-svn: 121434
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | actuall addresses in a .o file, so it is better to let the MachO writer compute it. This is good for two reasons. First, areas that shouldn't care about addresses now don't have access to it. Second, the layout of each section is independent. I should use this in a subsequent commit to speed it up. Most of the patch is just removing the section address computation. The two interesting parts are the change on how we handle padding in the end of sections and how MachO can get the address of a-b when a and b are in different sections. Since now the expression evaluation normally doesn't know the section address, it will think that a-b needs relocation and let the MachO writer know. Once it has computed the section addresses, it calls back the expression evaluation with the section addresses to resolve these expressions. The remaining problem is the handling of padding. Currently it will create a special alignment fragment at the end. Since that fragment doesn't update the alignment of the section, it needs the real address to be computed. Since now the layout will not compute a-b with a and b in different sections, the only effect that the special alignment fragment has is update the address size of the section. This can also be done by the MachO writer. llvm-svn: 121076
* Try to resolve symbol differences early, and if successful create a plainRafael Espindola2010-12-031-4/+1
| | | | | | | data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. llvm-svn: 120767
* Move EmitValueToOffset to the ObjectStreamer.Rafael Espindola2010-12-021-9/+0
| | | | llvm-svn: 120691
* Add EmitInstToFragment to the generic object streamer.Rafael Espindola2010-12-021-16/+4
| | | | llvm-svn: 120690
* Move EmitValue to MCObjectStreamer.Rafael Espindola2010-11-281-20/+0
| | | | llvm-svn: 120269
* Fixed verson of r120245.Rafael Espindola2010-11-281-13/+2
| | | | | | Factor some duplicated code into MCObjectStreamer::EmitLabel. llvm-svn: 120248
* Revert previous patch while I debug the darwin bootstrap failure.Rafael Espindola2010-11-281-2/+15
| | | | llvm-svn: 120246
* Factor some duplicated code into MCObjectStreamer::EmitLabel.Rafael Espindola2010-11-281-15/+2
| | | | llvm-svn: 120245
* Avoid code duplication in the many unsupported EmitGPRel32Value implementations.Rafael Espindola2010-11-281-3/+0
| | | | llvm-svn: 120243
* Define generic 1, 2 and 4 byte pc relative relocations. They are commonRafael Espindola2010-11-281-1/+1
| | | | | | and at least the 4 byte one will be needed to implement the .cfi_* directives. llvm-svn: 120240
* Fix and add tests for all cases in x86 and x86_64 where gnu as implicitlyRafael Espindola2010-11-241-5/+13
| | | | | | sets the type of a symbol to STT_TLS. llvm-svn: 120100
* If a symbol is used as tls, mark it as tls even if not declare as so. ProbablyRafael Espindola2010-11-241-0/+40
| | | | | | fixes PR8659. llvm-svn: 120076
* Added support for the Mach-O .symbol_resolver directive. rdar://8673046Kevin Enderby2010-11-191-0/+1
| | | | llvm-svn: 119816
* Change some methods in MCDwarf.cpp to be able to handle an arbitraryRafael Espindola2010-11-191-1/+4
| | | | | | | | | | | | MCStreamer instead of just MCObjectStreamer. Address changes cannot be as efficient as we have to use DW_LNE_set_addres, but at least most of the logic is shared. This will be used so that, with CodeGen still using EmitDwarfLocDirective, llvm-gcc is able to produce debug_line sections without needing an assembler that supports .loc. llvm-svn: 119777
* Add .loc methods to the streamer.Rafael Espindola2010-11-161-3/+0
| | | | | | | Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer and then switch codegen to use it. llvm-svn: 119384
* Change MCExpr::EvaluateAsRelocatableImpl of variables to return the originalRafael Espindola2010-11-151-53/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | variable if recursing fails to simplify it. Factor AliasedSymbol to be a method of MCSymbol. Update MCAssembler::EvaluateFixup to match the change in EvaluateAsRelocatableImpl. Remove the WeakRefExpr hack, as the object writer now sees the weakref with no extra effort needed. Nothing else is using MCTargetExpr, but keep it for now. Now that the ELF writer sees relocations with aliases, handle .weak foo2 foo2: .weak bar2 .set bar2,foo2 .quad bar2 the same way gas does and produce a relocation with bar2. llvm-svn: 119152
* Fix another case of a .comm directive without a corresponding .typeRafael Espindola2010-11-141-1/+2
| | | | | | directive. llvm-svn: 119073
* Fix the type of a symbol created with .comm and no corresponding .type.Rafael Espindola2010-11-141-0/+1
| | | | llvm-svn: 119060
* Handle a peculiar comdat case: Creating a section with an undefinedRafael Espindola2010-11-141-0/+8
| | | | | | | signature symbol causes a local symbol to be created unless there is some other use of the symbol. llvm-svn: 119026
* Fix warning.Rafael Espindola2010-11-141-0/+4
| | | | llvm-svn: 119021
* Mark labels declared in tls sections as STT_TLS. This matches the behavior ofRafael Espindola2010-11-111-32/+37
| | | | | | gas. llvm-svn: 118818
* Add '.code 32' assembler directive to MC streamers.Jim Grosbach2010-11-051-0/+1
| | | | llvm-svn: 118309
* MC'ize the '.code 16' and '.thumb_func' ARM directives.Jim Grosbach2010-11-051-1/+7
| | | | llvm-svn: 118301
* Put class into an anonymous namespace.Benjamin Kramer2010-11-051-0/+2
| | | | llvm-svn: 118294
* Write the line info to .debug_line.Rafael Espindola2010-11-011-0/+9
| | | | llvm-svn: 117930
* Move EmitInstruction to MCObjectStreamer so that ELF and MachO can share it.Rafael Espindola2010-11-011-32/+3
| | | | llvm-svn: 117925
* Implement .weakref.Rafael Espindola2010-11-011-0/+60
| | | | llvm-svn: 117911
* Make sure weak symbols are listed after the local ones.Rafael Espindola2010-10-061-0/+1
| | | | llvm-svn: 115795
OpenPOWER on IntegriCloud