summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MachObjectWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Silence compiler warning about case values not being in the enumerated typeDuncan Sands2011-03-151-1/+1
| | | | | | MCFixupKind. This is the same technique that is used elsewhere in MC. llvm-svn: 127676
* Fixes warnings emitted by Visual Studio 2010 compiler.Oscar Fuentes2011-03-011-2/+2
| | | | | | Patch by Erik Olofsson! llvm-svn: 126796
* Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.Jason W Kim2011-02-041-1/+2
| | | | | | | | | | | | | | | | (yes, this is different from R_ARM_CALL) - Adds a new method getARMBranchTargetOpValue() which handles the necessary distinction between the conditional and unconditional br/bl needed for ARM/ELF At least for ARM mode, the needed fixup for conditional versus unconditional br/bl is identical, but the ARM docs and existing ARM tools expect this reloc type... Added a few FIXME's for future naming fixups in ARMInstrInfo.td llvm-svn: 124895
* Fix bogus assert condition noticed by Csaba Raduly.Evan Cheng2011-02-011-2/+2
| | | | llvm-svn: 124645
* Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.Evan Cheng2011-01-141-9/+126
| | | | | | | | - Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first. - Added support for Thumb2 :lower16: and :upper16: fix up. - Added :upper16: and :lower16: relocation support to mach-o object writer. llvm-svn: 123424
* MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.Daniel Dunbar2010-12-271-9/+11
| | | | llvm-svn: 122583
* Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We nowRafael Espindola2010-12-241-124/+33
| | | | | | have a single point where targets test if a relocation is needed. llvm-svn: 122549
* MC/Mach-O/ARM: Start handling some Thumb branches.Daniel Dunbar2010-12-241-0/+14
| | | | llvm-svn: 122547
* MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.Daniel Dunbar2010-12-221-1/+1
| | | | llvm-svn: 122441
* Fix another conditional expression mismatched enum type warning.Matt Beaumont-Gay2010-12-221-1/+2
| | | | llvm-svn: 122419
* MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which isDaniel Dunbar2010-12-221-6/+1
| | | | | | esp. important given that the LOCAL_SECTDIFF enumeration got redefined. llvm-svn: 122412
* MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I ↵Daniel Dunbar2010-12-221-4/+68
| | | | | | figure out how it is supposed to work. llvm-svn: 122410
* MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.Daniel Dunbar2010-12-221-6/+3
| | | | llvm-svn: 122409
* MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.Daniel Dunbar2010-12-221-0/+16
| | | | llvm-svn: 122408
* MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.Daniel Dunbar2010-12-221-3/+26
| | | | llvm-svn: 122407
* MC/Mach-O/ARM: Fix thinko.Daniel Dunbar2010-12-221-1/+1
| | | | llvm-svn: 122406
* MC/Mach-O/ARM: Stub out RecordARMRelocation, which is mostly a copy ofDaniel Dunbar2010-12-221-1/+78
| | | | | | RecordRelocation with lots of FIXMEs. llvm-svn: 122402
* Simplify.Daniel Dunbar2010-12-221-6/+5
| | | | llvm-svn: 122401
* MC/Mach-O: Split out RecordARMRelocation for now, it is weird enough it isn'tDaniel Dunbar2010-12-221-0/+15
| | | | | | | clear how to keep in the generic path (yet). - Will revisit when it actually works. llvm-svn: 122400
* GCC objects to the two sides of a conditional expression having different enumMatt Beaumont-Gay2010-12-211-2/+2
| | | | | | | types, but they're just getting converted to unsigned anyway, so cast first (and ask questions later). llvm-svn: 122377
* MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrongDaniel Dunbar2010-12-211-7/+8
| | | | | | type. llvm-svn: 122334
* Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola2010-12-181-7/+5
| | | | llvm-svn: 122148
* Remove the MCObjectFormat class.Rafael Espindola2010-12-181-0/+6
| | | | llvm-svn: 122147
* MC/Mach-O: On second thought, use a custom hook for enabling aggressiveDaniel Dunbar2010-12-171-0/+3
| | | | | | | | | | IsSymbolRefDifferenceFullyResolved, it turns out this does change behavior on enough cases for x86-32 that I would rather wait a bit on it. - In practice, we will want to change this eventually because it only means we generate less relocations (it also eliminates the need for the horrible '.set' hack that Darwin requires in some places). llvm-svn: 122042
* MC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.Daniel Dunbar2010-12-171-0/+25
| | | | | | | | - Unlike for fixups, we always do the "reliable" thing (not just for x86_64). - Since Darwin 'as' would typically reject things that using this will allow, we don't need to worry about compatibility. llvm-svn: 122038
* MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format ↵Daniel Dunbar2010-12-171-0/+6
| | | | | | | | specific hook. - Currently just has stub implementations for Mach-O, ELF, and COFF. llvm-svn: 122037
* MC/Assembler: Strip out object writer arguments, now that it is always availableDaniel Dunbar2010-12-171-1/+1
| | | | | | -- and remove FIXME asking for the same! llvm-svn: 122032
* MC/Target: Remove HasScatteredSymbols target hook variable, which has beenDaniel Dunbar2010-12-171-5/+0
| | | | | | superceded and was effectively dead. llvm-svn: 122024
* MC/Mach-O: Lift some MachObjectWriter arguments into the target specificDaniel Dunbar2010-12-161-31/+29
| | | | | | interface. llvm-svn: 121981
* MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.Daniel Dunbar2010-12-161-16/+23
| | | | llvm-svn: 121973
* MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.Daniel Dunbar2010-12-161-0/+1
| | | | llvm-svn: 121971
* MC/Mach-O: Use fixup info instead of hard coded list.Daniel Dunbar2010-12-161-21/+19
| | | | llvm-svn: 121970
* Fix absolute recording of differences of symbols in two sections. Reduced ↵Rafael Espindola2010-12-071-0/+11
| | | | | | from ctor_dtor_count-2.cpp. llvm-svn: 121152
* Fix relocations with weak definitions.Rafael Espindola2010-12-071-1/+1
| | | | llvm-svn: 121114
* Fix pcrel relocations that cross sections.Rafael Espindola2010-12-071-2/+2
| | | | llvm-svn: 121107
* Fix a crash reduced from gcc produced assembly.Rafael Espindola2010-12-071-8/+4
| | | | llvm-svn: 121085
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-071-16/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* use getSymbolOffset.Rafael Espindola2010-12-061-1/+1
| | | | llvm-svn: 121041
* Another use of getSymbolOffset.Rafael Espindola2010-12-061-4/+8
| | | | llvm-svn: 121034
* Add support for binary encoding of ARM 'adr' instructions referencing constantJim Grosbach2010-12-021-1/+6
| | | | | | pool entries (LEApcrel pseudo). Ongoing saga of rdar://8542291. llvm-svn: 120635
* Define generic 1, 2 and 4 byte pc relative relocations. They are commonRafael Espindola2010-11-281-6/+6
| | | | | | and at least the 4 byte one will be needed to implement the .cfi_* directives. llvm-svn: 120240
* macho-dump: Add support for dumping relocation entries.Daniel Dunbar2010-11-271-14/+9
| | | | llvm-svn: 120216
* Fix a comment.Daniel Dunbar2010-11-271-2/+1
| | | | llvm-svn: 120199
* Reduce nesting.Daniel Dunbar2010-11-271-20/+26
| | | | llvm-svn: 120189
* MC/Mach-O: Migrate more constants into MachOFormat.h.Daniel Dunbar2010-11-271-104/+37
| | | | llvm-svn: 120188
* MC/Mach-O: Introduce Object/MachOFormat for describing purely platform / machineDaniel Dunbar2010-11-271-38/+24
| | | | | | | independent information on the Mach object format, and move some stuff from MachObjectWriter.cpp there. llvm-svn: 120186
* make isVirtualSection a virtual method on MCSection. Chris' suggestion.Rafael Espindola2010-11-171-2/+2
| | | | llvm-svn: 119547
* MC: Simplify Mach-O and ELF object writer implementations.Daniel Dunbar2010-11-131-59/+13
| | | | | | - What was I thinking????? llvm-svn: 118992
* Trailing whitespace.Jim Grosbach2010-11-111-5/+5
| | | | llvm-svn: 118831
* Allow targets to specify the MachO CPUType/CPUSubtype information.Jim Grosbach2010-11-051-7/+13
| | | | llvm-svn: 118288
OpenPOWER on IntegriCloud