aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-07-25Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng1-1/+1
createMCAsmBackend. llvm-svn: 136010
2011-07-23Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng1-1/+1
they belong. llvm-svn: 135833
2011-06-24Refactor MachO relocation generaration into the Target directories.Jim Grosbach1-985/+19
Move the target-specific RecordRelocation logic out of the generic MC MachObjectWriter and into the target-specific object writers. This allows nuking quite a bit of target knowledge from the supposedly target-independent bits in lib/MC. llvm-svn: 133844
2011-06-24tidy up whitespace.Jim Grosbach1-1/+1
llvm-svn: 133815
2011-06-24Fixup info for Thumb2 unconditional branch.Jim Grosbach1-0/+1
rdar://9667872 llvm-svn: 133808
2011-06-23Tidy up.Jim Grosbach1-1/+1
llvm-svn: 133770
2011-06-2380-column violations.Bill Wendling1-12/+17
llvm-svn: 133668
2011-06-22Move class methods out-of-line. This reduces the indentation, and is more inBill Wendling1-1289/+1410
line with LLVM's general coding style. No functionality change. llvm-svn: 133645
2011-04-29MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.Daniel Dunbar1-0/+27
llvm-svn: 130522
2011-04-29MC/Mach-O: Allow emission of relocations for variables in some more cases.Daniel Dunbar1-19/+19
llvm-svn: 130520
2011-04-29MC/Mach-O: Find section ordinal's by looking at the symbol, instead of ↵Daniel Dunbar1-4/+8
assuming they are present in a fragment. llvm-svn: 130519
2011-04-15Fix a ton of comment typos found by codespell. Patch byChris Lattner1-2/+2
Luis Felipe Strano Moraes! llvm-svn: 129558
2011-03-23Fix a bug introduced by my patch yesterday: BL is a 4-byte instructions like ↵Owen Anderson1-3/+2
BLX, rather than a 2-byte instruction like B. llvm-svn: 128169
2011-03-22RIT_ARM_ThumbBranch32Bit relocations are not used and should never be generated.Owen Anderson1-6/+2
This fixes kimwitu++, bullet, and tramp3dv4 with the ARM integrated assembler. Fixes <rdar://problem/9165738>. llvm-svn: 128117
2011-03-15Silence compiler warning about case values not being in the enumerated typeDuncan Sands1-1/+1
MCFixupKind. This is the same technique that is used elsewhere in MC. llvm-svn: 127676
2011-03-01Fixes warnings emitted by Visual Studio 2010 compiler.Oscar Fuentes1-2/+2
Patch by Erik Olofsson! llvm-svn: 126796
2011-02-04Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.Jason W Kim1-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
2011-02-01Fix bogus assert condition noticed by Csaba Raduly.Evan Cheng1-2/+2
llvm-svn: 124645
2011-01-14Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.Evan Cheng1-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
2010-12-27MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.Daniel Dunbar1-9/+11
llvm-svn: 122583
2010-12-24Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We nowRafael Espindola1-124/+33
have a single point where targets test if a relocation is needed. llvm-svn: 122549
2010-12-24MC/Mach-O/ARM: Start handling some Thumb branches.Daniel Dunbar1-0/+14
llvm-svn: 122547
2010-12-22MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.Daniel Dunbar1-1/+1
llvm-svn: 122441
2010-12-22Fix another conditional expression mismatched enum type warning.Matt Beaumont-Gay1-1/+2
llvm-svn: 122419
2010-12-22MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which isDaniel Dunbar1-6/+1
esp. important given that the LOCAL_SECTDIFF enumeration got redefined. llvm-svn: 122412
2010-12-22MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I ↵Daniel Dunbar1-4/+68
figure out how it is supposed to work. llvm-svn: 122410
2010-12-22MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.Daniel Dunbar1-6/+3
llvm-svn: 122409
2010-12-22MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.Daniel Dunbar1-0/+16
llvm-svn: 122408
2010-12-22MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.Daniel Dunbar1-3/+26
llvm-svn: 122407
2010-12-22MC/Mach-O/ARM: Fix thinko.Daniel Dunbar1-1/+1
llvm-svn: 122406
2010-12-22MC/Mach-O/ARM: Stub out RecordARMRelocation, which is mostly a copy ofDaniel Dunbar1-1/+78
RecordRelocation with lots of FIXMEs. llvm-svn: 122402
2010-12-22Simplify.Daniel Dunbar1-6/+5
llvm-svn: 122401
2010-12-22MC/Mach-O: Split out RecordARMRelocation for now, it is weird enough it isn'tDaniel Dunbar1-0/+15
clear how to keep in the generic path (yet). - Will revisit when it actually works. llvm-svn: 122400
2010-12-21GCC objects to the two sides of a conditional expression having different enumMatt Beaumont-Gay1-2/+2
types, but they're just getting converted to unsigned anyway, so cast first (and ask questions later). llvm-svn: 122377
2010-12-21MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrongDaniel Dunbar1-7/+8
type. llvm-svn: 122334
2010-12-18Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola1-7/+5
llvm-svn: 122148
2010-12-18Remove the MCObjectFormat class.Rafael Espindola1-0/+6
llvm-svn: 122147
2010-12-17MC/Mach-O: On second thought, use a custom hook for enabling aggressiveDaniel Dunbar1-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
2010-12-17MC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.Daniel Dunbar1-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
2010-12-17MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format ↵Daniel Dunbar1-0/+6
specific hook. - Currently just has stub implementations for Mach-O, ELF, and COFF. llvm-svn: 122037
2010-12-17MC/Assembler: Strip out object writer arguments, now that it is always availableDaniel Dunbar1-1/+1
-- and remove FIXME asking for the same! llvm-svn: 122032
2010-12-17MC/Target: Remove HasScatteredSymbols target hook variable, which has beenDaniel Dunbar1-5/+0
superceded and was effectively dead. llvm-svn: 122024
2010-12-16MC/Mach-O: Lift some MachObjectWriter arguments into the target specificDaniel Dunbar1-31/+29
interface. llvm-svn: 121981
2010-12-16MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.Daniel Dunbar1-16/+23
llvm-svn: 121973
2010-12-16MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.Daniel Dunbar1-0/+1
llvm-svn: 121971
2010-12-16MC/Mach-O: Use fixup info instead of hard coded list.Daniel Dunbar1-21/+19
llvm-svn: 121970
2010-12-07Fix absolute recording of differences of symbols in two sections. Reduced ↵Rafael Espindola1-0/+11
from ctor_dtor_count-2.cpp. llvm-svn: 121152
2010-12-07Fix relocations with weak definitions.Rafael Espindola1-1/+1
llvm-svn: 121114
2010-12-07Fix pcrel relocations that cross sections.Rafael Espindola1-2/+2
llvm-svn: 121107
2010-12-07Fix a crash reduced from gcc produced assembly.Rafael Espindola1-8/+4
llvm-svn: 121085