summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added Mapping Symbols for ARM ELFTim Northover2012-12-071-17/+6
| | | | | | | | | | Before this patch, when you objdump an LLVM-compiled file, objdump tried to decode data-in-code sections as if they were code. This patch adds the missing Mapping Symbols, as defined by "ELF for the ARM Architecture" (ARM IHI 0044D). Patch based on work by Greg Fitzgerald. llvm-svn: 169609
* Split MCELFStreamer into a header file.Logan Chien2012-12-071-107/+63
| | | | llvm-svn: 169603
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-3/+3
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* PowerPC: add EmitTCEntry class for TOC creationAdhemerval Zanella2012-10-151-0/+8
| | | | | | | This patch replaces the EmitRawText by a EmitTCEntry class (specialized for each Streamer) in PowerPC64 TOC entry creation. llvm-svn: 165940
* Hoist some grossly duplicated code from the COFF/ELF/MachO streamers into ↵Benjamin Kramer2012-10-041-42/+0
| | | | | | MCObjectStreamer. llvm-svn: 165225
* Assembler: Darwin variables defined via .set are no-dead-strip.Jim Grosbach2012-09-131-1/+1
| | | | | | | | For gas compatibility. rdar://12219394 llvm-svn: 163854
* EmitZerofill should take a 64-bit size or else it's chopping off large ↵Evan Cheng2012-06-221-1/+1
| | | | | | zero-filled global. rdar://11729134 llvm-svn: 159023
* Refactor data-in-code annotations.Jim Grosbach2012-05-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 llvm-svn: 157062
* For ELF, also call fixSymbolsInTLSFixups() on expressions passed to ↵David Meyer2012-02-151-0/+9
| | | | | | EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981. llvm-svn: 150582
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-10/+9
| | | | llvm-svn: 149967
* Remove MCELFStreamer.h.Rafael Espindola2012-01-071-2/+121
| | | | llvm-svn: 147745
* Split Finish into Finish and FinishImpl to have a common place to do end ofRafael Espindola2012-01-071-2/+2
| | | | | | | | file error checking. Use that to error on an unfinished cfi_startproc. The error is not nice, but is already better than a segmentation fault. llvm-svn: 147717
* Add support for gnu_indirect_function.Roman Divacky2011-12-121-1/+4
| | | | llvm-svn: 146377
* Tidy up. 80 columns.Jim Grosbach2011-11-151-4/+4
| | | | llvm-svn: 144649
* This is the first of several patches for Mips direct object generation.Bruno Cardoso Lopes2011-10-251-0/+4
| | | | | | | | This first patch is for expression variable kinds. Patch by Jack Carter! llvm-svn: 142934
* 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
OpenPOWER on IntegriCloud