summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* MC: Bit pack MCSymbolData.Benjamin Kramer2014-10-111-1/+1
| | | | | | | | | On x86_64 this brings it from 80 bytes to 64 bytes. Also make any member variables private and clean up uses to go through the existing accessors. NFC. llvm-svn: 219573
* ARM: when falling back to scattered relocs, keep the type.Tim Northover2014-07-041-3/+7
| | | | | | | | | | The linker relies on relocation type info (e.g. is it a branch?) to perform the correct actions, so we should keep that even when we end up using a scattered relocation for whatever reason. rdar://problem/17553104 llvm-svn: 212333
* Centralize the handling of the thumb bit.Rafael Espindola2014-04-291-2/+2
| | | | | | | | | | | | | This patch centralizes the handling of the thumb bit around MCStreamer::isThumbFunc and makes isThumbFunc handle aliases. This fixes a corner case, but the main advantage is having just one way to check if a MCSymbol is thumb or not. This should still be refactored to be ARM only, but at least now it is just one predicate that has to be refactored instead of 3 (isThumbFunc, ELF_Other_ThumbFunc, and SF_ThumbFunc). llvm-svn: 207522
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-251-1/+1
| | | | llvm-svn: 207197
* Spread some const around for non-mutating uses of MCSymbolData.David Blaikie2014-04-241-5/+5
| | | | | | | | I discovered this const-hole while attempting to coalesnce the Symbol and SymbolMap data structures. There's some pending issues with that, but I figured this change was easy to flush early. llvm-svn: 207124
* Completely rewrite ELFObjectWriter::RecordRelocation.Rafael Espindola2014-03-291-11/+0
| | | | | | | | | | | | | | | | | | | I started trying to fix a small issue, but this code has seen a small fix too many. The old code was fairly convoluted. Some of the issues it had: * It failed to check if a symbol difference was in the some section when converting a relocation to pcrel. * It failed to check if the relocation was already pcrel. * The pcrel value computation was wrong in some cases (relocation-pc.s) * It was missing quiet a few cases where it should not convert symbol relocations to section relocations, leaving the backends to patch it up. * It would not propagate the fact that it had changed a relocation to pcrel, requiring a quiet nasty work around in ARM. * It was missing comments. llvm-svn: 205076
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-101-1/+1
| | | | | | class. llvm-svn: 203439
* Fixed a bug in getARMFixupKindMachOInfo() where three ARM fixup kindsKevin Enderby2013-12-131-1/+5
| | | | | | | | | | | were falling into the cases for 24-bit branch kinds which are not 24-bit branches. The routine is to return false for fixups are expected to always be resolvable at assembly time. Which these three fixups are as they have limited displacement and are for local references within a function. rdar://15586725 llvm-svn: 197282
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-09-011-65/+64
| | | | llvm-svn: 189728
* Revert "Fix the build broken by r189315." and "Move everything depending on ↵Charles Davis2013-08-271-63/+65
| | | | | | | | | Object/MachOFormat.h over to Support/MachO.h." This reverts commits r189319 and r189315. r189315 broke some tests on what I believe are big-endian platforms. llvm-svn: 189321
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-08-271-65/+63
| | | | llvm-svn: 189315
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+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
* ARM: Darwin BL/BLX relocations to out-of-range symbols.Jim Grosbach2012-09-251-1/+48
| | | | | | | | | | | When a BL/BLX references a symbol in the same translation unit that is out of range, use an external relocation. The linker will use this to generate a branch island rather than a direct reference, allowing the relocation to resolve correctly. rdar://12359919 llvm-svn: 164615
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163547
* Fix a bug in ARMMachObjectWriter::RecordRelocation() in ARMMachObjectWriter.cppKevin Enderby2012-07-301-2/+9
| | | | | | | | | where the other_half of the movt and movw relocation entries needs to get set and only with the 16 bits of the other half. rdar://10038370 llvm-svn: 160978
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160621
* Ensure conditional BL instructions for ARM are given the fixup ↵James Molloy2012-03-301-1/+2
| | | | | | | | fixup_arm_condbranch. Patch by Tim Northover! llvm-svn: 153737
* ARM non-scattered MachO relocations for movw/movt.Jim Grosbach2012-03-201-22/+58
| | | | | | | | Needed when building -mdynamic-no-pic code. rdar://10459256 llvm-svn: 153097
* ARM BL/BLX instruction fixups should use relocations.Jim Grosbach2012-02-271-0/+2
| | | | | | | | | | | | | We on the linker to resolve calls to the appropriate BL/BLX instruction to make interworking function correctly. It uses the symbol in the relocation to do that, so we need to be careful about being too clever. To enable this for ARM mode, split the BL/BLX fixup kind off from the unconditional-branch fixups. rdar://10927209 llvm-svn: 151571
* Better user diagnostics for more ARM MachO relocation errors.Jim Grosbach2012-01-271-4/+8
| | | | llvm-svn: 149102
* Keep source information, if available, around for ARM Fixups.Jim Grosbach2012-01-261-3/+8
| | | | | | | | | | | | | | | | | Adjust an example MachObjectWriter diagnostic to use the information to issue a better message. Before: LLVM ERROR: unknown ARM fixup kind! After: x.s:6:5: error: unsupported relocation on symbol beq bar ^ rdar://9800182 llvm-svn: 149093
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Nuke inadvertant debugging commit.Jim Grosbach2011-12-071-3/+0
| | | | llvm-svn: 146057
* Darwin assembler improved relocs when w/o subsections_via_symbols.Jim Grosbach2011-12-071-0/+3
| | | | | | | | When the file isn't being built with subsections-via-symbols, symbol differences involving non-local symbols can be resolved more aggressively. Needed for gas compatibility. llvm-svn: 146054
* Better fix for ARM MOVT relocation encoding of thumb bit.Jim Grosbach2011-11-291-1/+8
| | | | | | Replaces r145318 with a more targetted fix for the relocation handling. llvm-svn: 145346
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-1/+0
| | | | | | 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
* Sink ARM mc routines into MCTargetDesc.Evan Cheng2011-07-231-0/+389
llvm-svn: 135825
OpenPOWER on IntegriCloud