History log of /external/llvm/lib/MC/MachObjectWriter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cddc3e03e4ec99c0268c03a126195173e519ed58 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r256229

http://b/26987366

(cherry picked from commit f3ef5332fa3f4d5ec72c178a2b19dac363a19383)

Change-Id: Ic75dcb63191d65df1b69724576392c0aaeb47728
/external/llvm/lib/MC/MachObjectWriter.cpp
6948897e478cbd66626159776a8017b3c18579b9 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r239765

Bug: 20140355: This rebase pulls the upstream fix for the spurious
warnings mentioned in the bug.

Change-Id: I7fd24253c50f4d48d900875dcf43ce3f1721a3da
/external/llvm/lib/MC/MachObjectWriter.cpp
0c7f116bb6950ef819323d855415b2f2b0aad987 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r235153

Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
/external/llvm/lib/MC/MachObjectWriter.cpp
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/MC/MachObjectWriter.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/MC/MachObjectWriter.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/MC/MachObjectWriter.cpp
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/MC/MachObjectWriter.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/MC/MachObjectWriter.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/MC/MachObjectWriter.cpp
a26f4283826894ac00665f9d24fa99cacc5192ab 25-Sep-2013 Jim Grosbach <grosbach@apple.com> MachO: Improve backend diagnostic for overalignment.

Give the symbol's name and disengage the enchanced crash reporting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a38c27be0ff5dd35fcd20cfce827f9dbdb24d1ea 05-Sep-2013 Nick Kledzik <kledzik@apple.com> Add names for mach-o permissions bits and use the symbol names in place of magic numbers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5510728d28bb1ee04abc32da3d21b7df12948053 01-Sep-2013 Charles Davis <cdavis5x@gmail.com> Move everything depending on Object/MachOFormat.h over to Support/MachO.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
4f066b6db8a7a95b206725aecf99a64fd6e9415c 28-Aug-2013 Kevin Enderby <enderby@apple.com> The integrated darwin assembler can hang in an infinite loop (or get an assert
with a debug build) with this buggy .indirect_symbol directive usage:

% cat test.s
x: .indirect_symbol _y

The assertion is because it is trying to get the symbol index for the
symbol _y when it is writing out the indirect symbol table. This line of
code in MachObjectWriter::WriteObject() :

Write32(Asm.getSymbolData(*it->Symbol).getIndex());

And while there is a symbol _y it does not have any getSymbolData set which
is only done in MachObjectWriter::BindIndirectSymbols() for pointer sections
or stub sections. I added a check and an error in there to catch this in case
something slips through.

But to get a better error the parser should detect when a .indirect_symbol
directive is used and it is not in a pointer section or stub section. To make
that work I moved the handling of the indirect symbol out of the target
independent AsmParser code into the DarwinAsmParser code that can check
for the proper Mach-O section types.

rdar://14825505


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f69a29b23a116a3520f185054290c445abf9aa62 27-Aug-2013 Charles Davis <cdavis5x@gmail.com> Revert "Fix the build broken by r189315." and "Move everything depending on 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601 27-Aug-2013 Charles Davis <cdavis5x@gmail.com> Move everything depending on Object/MachOFormat.h over to Support/MachO.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
849209686f778e5d6fce675bea9a8300aa596d25 22-Jan-2013 Daniel Dunbar <daniel@zuster.org> [MC/Mach-O] Load commands are supposed to 8-byte aligned on 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a94c33942373cb504b6e64c95415165907a89d34 18-Jan-2013 Daniel Dunbar <daniel@zuster.org> [MC/Mach-O] Add support for linker options in Mach-O files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
99cbdde6198623ff014c776743caec2cf48f4840 14-Dec-2012 Pedro Artigas <partigas@apple.com> Add more reset methods to make all objects that the backend may use for outputting code have a reset, some are not used but were declared for completeness



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

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. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e75a98320e5d0dff0fc29d2aa39d4c70f70b9da8 19-Sep-2012 Jim Grosbach <grosbach@apple.com> Tidy up. 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c5252da873d547a19069eaf9030fec203f128f66 14-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
with the rest of the codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
45d81bdde87a38c21facf2ec3b82b0589e9de7e9 14-Sep-2012 Jim Grosbach <grosbach@apple.com> MachO: Correctly mark symbol-difference variables as N_ABS.

.set a, b - c + CONSTANT
d = b - c + CONSTANT

Both 'a' and 'd' should be marked as absolute symbols (N_ABS).

rdar://12219394

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
05d96f98cbd96dab7f4ea1ea4ebe4285597e7e88 22-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Reduce duplicated hash map lookups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3e96531186ba574b0c25a4be62d24b8b7d752c9f 18-May-2012 Jim Grosbach <grosbach@apple.com> Refactor data-in-code annotations.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f1d0f7781e766df878bec4e7977fa3204374f394 26-Mar-2012 Craig Topper <craig.topper@gmail.com> Prune some includes and forward declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c389af94b66d0c5a917f81617bd07ff0864790a0 24-Jan-2012 Jim Grosbach <grosbach@apple.com> ARM Darwin symbol ref differences w/o subsection-via-symbols.

When not using subsections via symbols, the assembler can resolve
symbol differences (including pcrel references) to non-local
labels at assembly time, not just those in the same atom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
ec4ceb797a963b2d24b02d40fad6cc456fac3e5b 18-Jan-2012 Jim Grosbach <grosbach@apple.com> MCAssembler tweak for determining when a symbol difference is resolved.

If the two fragments are in the same Atom, then the difference
expression is resolvable at compile time. Previously we were checking
that they were in the same fragment, but that breaks down in the
presence of instruction relaxation which has multiple fragments in the
same atom.

rdar://10711829

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
8b9300b972745a6d89b482cbcd4206c01359f7df 17-Jan-2012 Jim Grosbach <grosbach@apple.com> MC tweak symbol difference resolution for non-local symbols.

When the non-local symbol in the expression is in the same fragment
as the second symbol, the assembler can still evaluate the expression
without needing a relocation.

For example, on ARM:
_foo:
ldr lr, (_foo - 4)

rdar://10348687



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
577b09155f9a6fa38e5a7918da9701e120b3642f 07-Dec-2011 Jim Grosbach <grosbach@apple.com> Darwin assembler improved relocs when w/o subsections_via_symbols.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f68a26b5d8e06a85edba97702884a74673b60807 06-Dec-2011 Jim Grosbach <grosbach@apple.com> Tidy up. Hard tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f77d5b14af6b92403b93f7ed249f9023e99028cc 06-Dec-2011 Jim Grosbach <grosbach@apple.com> Switch MCAssembler to method names starting w/ lower-case.

per http://llvm.org/docs/CodingStandards.html#ll_naming

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
d1e002a0a3c1c38bae064f3f3cc22b1653d47659 09-Sep-2011 Eric Christopher <echristo@apple.com> Formatting and typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5afc19002e7a6b949619a5073d8c746985e8d6f2 08-Sep-2011 Kevin Enderby <enderby@apple.com> Fix a Darwin x86_64 special case of a jmp to a temporary symbol from an atom
without a base symbol that must not have a relocation entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
0d46ccfc5c2f5d0894e340907f6e58067cce5b03 12-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> MachOWriter: Don't crash on fixups with arithmetic, emit a relocation instead. This matches what as does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
739b5576adbf991cdcc49df61c1a3de3d63747f6 10-Aug-2011 Jim Grosbach <grosbach@apple.com> Don't truncate MachO addresses.

Assigned symbol addresses get truncated to 32-bits, even on 64-bit platforms.
That's obviously bogus.
For example,

.globl _foo
.equ _foo, 0x987654321ULL


rdar://9922863



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
78c10eeaa57d1c6c4b7781d3c0bcb0cfbbc43b5c 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a7cfc08ebe737062917b442830eb5321b0f79e89 23-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
ba8297ec08cdf7ae0c1e0c18ce07922e1f822643 25-Jun-2011 Jim Grosbach <grosbach@apple.com> Refactor MachO relocation generaration into the Target directories.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
32e7abd0804de228c50d90e9ee43568c4316b624 24-Jun-2011 Jim Grosbach <grosbach@apple.com> tidy up whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
535e58b910199fabcf7db45184bf679e38e42068 24-Jun-2011 Jim Grosbach <grosbach@apple.com> Fixup info for Thumb2 unconditional branch.

rdar://9667872

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
0edb05b9e4a63d469a6cc9e15fa0dc8de7ee1cdf 24-Jun-2011 Jim Grosbach <grosbach@apple.com> Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3f2ea825bdf8cbe002ac542a5bdd775bd30470c9 23-Jun-2011 Bill Wendling <isanbard@gmail.com> 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
bbdffa9ab0597b64689c51f2c4a87a781f3bf79d 22-Jun-2011 Bill Wendling <isanbard@gmail.com> Move class methods out-of-line. This reduces the indentation, and is more in
line with LLVM's general coding style.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
173aa9ce3207379f9d9b18bdb9aefb0de1da8c85 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5ff919b324238a4c8227b871a0fb48c6f4412eca 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Allow emission of relocations for variables in some more cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
08b9935b51f3f83934a5e00b18d0805c1977290a 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Find section ordinal's by looking at the symbol, instead of assuming they are present in a fragment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7614783f2dbf1090c3a4888bc70e1eb2baee37c4 23-Mar-2011 Owen Anderson <resistor@mac.com> Fix a bug introduced by my patch yesterday: BL is a 4-byte instructions like BLX, rather than a 2-byte instruction like B.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f862b35b0b948c14a4af669c09adab76a4b6e68a 22-Mar-2011 Owen Anderson <resistor@mac.com> RIT_ARM_ThumbBranch32Bit relocations are not used and should never be generated.
This fixes kimwitu++, bullet, and tramp3dv4 with the ARM integrated assembler.
Fixes <rdar://problem/9165738>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
36b8e43a3e4ab97c4296d5574482ecf3c4169d85 15-Mar-2011 Duncan Sands <baldrick@free.fr> Silence compiler warning about case values not being in the enumerated type
MCFixupKind. This is the same technique that is used elsewhere in MC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
9bf9aa5106eb663a371b2b0bc7ab929500ad6ff9 02-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Fixes warnings emitted by Visual Studio 2010 compiler.

Patch by Erik Olofsson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
685c350ae76b588e1f00c01a511fe8bd57f18394 04-Feb-2011 Jason W Kim <jason.w.kim.2009@gmail.com> Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
(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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e087afa128211285ee41297fa5fc22fe5f2d3eb1 01-Feb-2011 Evan Cheng <evan.cheng@apple.com> Fix bogus assert condition noticed by Csaba Raduly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f3eb3bba1614a7935b44fc963a805088d71267f3 14-Jan-2011 Evan Cheng <evan.cheng@apple.com> Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.
- 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e8624538062da215fe23cfe201b1c905eb7ebb12 27-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
fea753b397823c340608925eb7f3256a64a30017 24-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We now
have a single point where targets test if a relocation is needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
4010dd72b81b760daaa0361084de6dca8ed86fa1 24-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Start handling some Thumb branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
72123334adfa1b020aa7aecf05ce6d135f9c7ffa 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
33a03c73ef8f0bd0351754048669b6337539e731 22-Dec-2010 Matt Beaumont-Gay <matthewbg@google.com> Fix another conditional expression mismatched enum type warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
df561e02347a904de8dcb3a6f6cb42e10a43bddd 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which is
esp. important given that the LOCAL_SECTDIFF enumeration got redefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
25bcc9cdc8adcda093bfdf4cf2bda2aaadeb7ee8 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I figure out how it is supposed to work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5cc639049574748b96c9806bb84680837917433e 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3664564395ede7681fac8888a213ce3bf947bbb3 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
294e67861c9a497f4b7529a410d8817d36354d5a 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
fdfbc6a6524a779a5c75b065d93fa22b356c568a 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Fix thinko.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
4d74305a1f55f458d401a79db4deeed726567195 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/ARM: Stub out RecordARMRelocation, which is mostly a copy of
RecordRelocation with lots of FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
42b5286627172b24de73e7403b60b50fc2e0db59 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
532c456d48c40623631ab9b3e7322a93af8d7700 22-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Split out RecordARMRelocation for now, it is weird enough it isn't
clear how to keep in the generic path (yet).
- Will revisit when it actually works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e733cf8c2743acf0e4bee4952dfb013de6257478 22-Dec-2010 Matt Beaumont-Gay <matthewbg@google.com> GCC objects to the two sides of a conditional expression having different enum
types, but they're just getting converted to unsigned anyway, so cast first
(and ask questions later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e1feeb9da41fd48002e363c6dbb0a3d7bf0b7811 21-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrong
type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3132780a2ed58945b0ec5033002be44bedb6b785 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
1ec5bd31fe491e610839ea448bd99fd171785837 18-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove the MCObjectFormat class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
b87422778c4e7b828e6e846b81fd77509439c622 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: On second thought, use a custom hook for enabling aggressive
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
32c1c5ae5f2bbf0c13bb1aed71384b86ee6b7cac 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
1f3662abba2abdf5a0ab77095834271fcf846579 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format specific hook.
- Currently just has stub implementations for Mach-O, ELF, and COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5d2477cecf53bef911f57423a5cecb743d4286fa 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Assembler: Strip out object writer arguments, now that it is always available
-- and remove FIXME asking for the same!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7b62afac0a6f967e7466e60ceb26bfdcff2e59f4 17-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Target: Remove HasScatteredSymbols target hook variable, which has been
superceded and was effectively dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5d05d9769ec98cdee359fd934a56c9455e21232b 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Lift some MachObjectWriter arguments into the target specific

interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
ae5abd595f5442767313a4c8a24008ad19323ceb 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
aa4b7dd13ba83152473950d7014a29686dc7eef6 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7e06af85d11fd5c5b458b7044e73fd9c9da08112 16-Dec-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Use fixup info instead of hard coded list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
545b77ef5002402e1f794249801fee14cad54dba 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix absolute recording of differences of symbols in two sections. Reduced from ctor_dtor_count-2.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3b3148f8647844b92bb84c7c3e864b5403484a38 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix relocations with weak definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
bf60dad984e296d43a8a6b33e8c528e8c8a24394 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix pcrel relocations that cross sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f10d2be573f2e1000c2a4497c745367aab7bd9f1 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix a crash reduced from gcc produced assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
85f2ecc697a8ca6c8cf08093054cbbb9d2060ccf 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Sorry for such a large commit. The summary is that only MachO cares about the
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
1dda29bdff468b61d8c9ef4eca8cd6c807262de4 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> use getSymbolOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f96d17b8864b9207f598ac372829f1dfad139f96 06-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Another use of getSymbolOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
dff84b03258514463ede477af38f1246b95b0cd0 02-Dec-2010 Jim Grosbach <grosbach@apple.com> Add support for binary encoding of ARM 'adr' instructions referencing constant
pool entries (LEApcrel pseudo). Ongoing saga of rdar://8542291.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e04ed7e45f194f14a7b28bbf3f55694d8e2bcf80 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Define generic 1, 2 and 4 byte pc relative relocations. They are common
and at least the 4 byte one will be needed to implement the .cfi_* directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
90e3e3a429e75a7d3671afcc30ed376b6186fd58 27-Nov-2010 Daniel Dunbar <daniel@zuster.org> macho-dump: Add support for dumping relocation entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
590956f24f4026298b5727d5cac677301ec626db 27-Nov-2010 Daniel Dunbar <daniel@zuster.org> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7976b88d9f415023e4ee498cb6d4a2d20532c873 27-Nov-2010 Daniel Dunbar <daniel@zuster.org> Reduce nesting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f52788f4e6951ac8b6e46100eb5ee6a0a4244a00 27-Nov-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Migrate more constants into MachOFormat.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
821ecd7c9060a98e3559c11d66e4bfb6e957a91e 27-Nov-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Introduce Object/MachOFormat for describing purely platform / machine
independent information on the Mach object format, and move some stuff from
MachObjectWriter.cpp there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f2dc4aa562e2478a73fe5aeeeec16b1e496a0642 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> make isVirtualSection a virtual method on MCSection. Chris' suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
115a3dd066c277c5417f4d9b9f642b732b76f4e7 13-Nov-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify Mach-O and ELF object writer implementations.
- What was I thinking?????

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
3c3849297bd9b4aedbac52417061e1da779cc412 11-Nov-2010 Jim Grosbach <grosbach@apple.com> Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c9d1439051d130cfb947ef9ab4a95737c41e2fd1 05-Nov-2010 Jim Grosbach <grosbach@apple.com> Allow targets to specify the MachO CPUType/CPUSubtype information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
8f413fa9c00dbaea000ddfe265ab5edd285ea3ab 05-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> On ELF we need to know which symbols are used in relocations to decide if
they should be in the symbol table or not. Instead of "guessing", just compute
the symbol table after the relocations are known.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
8c9aa922a94bd788ea061be7555fb5b1db3a5312 02-Oct-2010 Kevin Enderby <enderby@apple.com> This adds a Darwin x86_64 relocation encoding for a subtraction expression
where both symbols are "local", that is non-external symbols, and there is
no "base" for the symbols used in the expression, that is the section has
no non-temporary symbols. This case looks like this:

% cat local_reloc_A-B.s
.long 0
LB: .long 1
.long LA - LB - 4
.long 2
LA: .long 3

which llvm-mc will not encode without this patch, generates a "unsupported
local relocations in difference" error, but the Darwin assembler will
encode with relocation entries like this:

% otool -rv a.out l.out
a.out:
Relocation information (__TEXT,__text) 2 entries
address pcrel length extern type scattered symbolnum/value
00000008 False long False SUB False 1 (__TEXT,__text)
00000008 False long False UNSIGND False 1 (__TEXT,__text)

which is very similar to what is encoded when the symbols don't have the
leading 'L' and they are not temporary symbols. Which llvm-mc and the
Darwin assembler will encoded like this:

Relocation information (__TEXT,__text) 2 entries
address pcrel length extern type scattered symbolnum/value
00000008 False long True SUB False B
00000008 False long True UNSIGND False A

This is the missing relocation encoding needed to allow the Mach-O x86
Dwarf file and line table to be emitted. So this patch also removes the
TODO from the if() statement in MCMachOStreamer::Finish() that didn't
call MCDwarfFileTable::Emit() for 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a8c02c3bdd68e65d14fb6b0d56989663754059b0 30-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly produce R_X86_64_32 or R_X86_64_32S.

With this patch in

movq $foo, foo(%rip)
foo:
.long foo

We produce a R_X86_64_32S for the first relocation and R_X86_64_32 for the
second one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
7070387f08f7dc797b554ed8013cba9f8b74121a 30-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make it possible for the MCObjectWriter to decide if a given fixup is fully
resolved or not. Different object files have different restrictions and
different native assemblers have different idiosyncrasies we want to emulate
for now.

Move the existing MachO logic to the new place and implement an ELF one that
gets fixups to globals right.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
b814110612024a092fd884050fbab9d012b16dc7 27-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
23bea41ec68368f9186db2f819dde11efb1d3c83 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/i386: Fix a crash in relocation handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
abf8f9cbb848dc9602494074875b187072928edc 16-Aug-2010 Chris Lattner <sabre@nondot.org> silence a vc2010 warning: " result of 32-bit shift implicitly converted to
64 bits (was 64-bit shift intended?)", pointed out by 'nobled' on llvmdev


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
b0f3b3e7de5068e04754fe1a454a754328233346 10-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "MC/MachO: Fix possible null pointer dereference."

This reverts commit 110575.

Target.isAbsolute() is true if SD would be null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c1f354dcb82e2365a5fd1c39f11199dd2344cfb8 09-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> MC/MachO: Fix possible null pointer dereference.

Discovered by Microsoft Visual Studio 2010 Code Analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
da3051a17f586b069951931eeed9317cad41243b 08-Jul-2010 Chris Lattner <sabre@nondot.org> finish up support for callw: PR7195


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5b96b26eb76b012a18c5e30b3a179aaf3c9e3e27 29-Jun-2010 Duncan Sands <baldrick@free.fr> The variable "Value" is carefully set to Layout.getSymbolAddress,
but then not actually used - maybe a bug? Remove the variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
1008d3500002a64fab0a956ad681118d7af8143a 23-Jun-2010 Eric Christopher <echristo@apple.com> Get the addend correct for i386 pic.

Thanks Daniel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
04b8d3cc4914ffe74f1c78fbf0ff4c8c3299cbea 17-Jun-2010 Eric Christopher <echristo@apple.com> Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
bc06737c355f7206beecf5c7c0fb0d818c1297a4 16-Jun-2010 Eric Christopher <echristo@apple.com> In progress on 32-bit addends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
843aa1f15b06fc3c2b39740ffb5bffd2fa6827ce 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e48dbf8d839dd7aa3cfb257b9c495f25987547b4 16-Jun-2010 Eric Christopher <echristo@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c9ada472c87d262713b0d2df0a225e867533586c 16-Jun-2010 Eric Christopher <echristo@apple.com> Some more work on mach-o TLV relocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
aeed4d81a8823bba260d2d6d1ff597e5e86c38ed 27-May-2010 Eric Christopher <echristo@apple.com> Rearrange conditionals so we don't get caught with the correct type as wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c90e30aa6f3792a460202017523171f435e2ba34 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Eliminate MCAsmFixup, replace with MCFixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
482ad802f1b1885542ea8a30e144a228a1526912 26-May-2010 Daniel Dunbar <daniel@zuster.org> MC: Use accessors for access to MCAsmFixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
96ac5156cadde7e4494990d5b4f873e76787a370 26-May-2010 Eric Christopher <echristo@apple.com> Start adding mach-o tls reloc support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
c37791e875e3aa9df519622068f7d7d25244aac4 20-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Reduce string trashing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
2ae4bfd76905fb6d5be2bf03eaca51da2f9a4d81 18-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Implement support for setting indirect symbol table offset in section header.

Also, create symbol data for LHS of assignment, to match 'as' symbol ordering better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
56279f42b6d955be8a5f399f405ce0b1784e9502 18-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Remove some FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
f0f6cdb6b40bdf799a806efca05f44081bb154d3 14-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Darwin's special "signed_N" relocation types should only be
used to replace a normal relocation, not a reference to a GOT entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
db4c7e606f6bcc42ed8d853be5d67dfb9fa0edee 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Fix PCrel adjustment for x86_64, which was using the fixup
offset instead of the fixup address as intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
640e948f09c56419b57dfb276d41e03060db6ad8 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: As Kevin pointed out, 'Address' is really an offset -- rename to clarify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
ef4591ef7970d6da77eaf20fddbb522e99dc7615 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Fix a crash on invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a8251fac10e3ba7c4ad7035f1f039197ac3e09c7 11-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Fix another mismatch with .weak_definition, we shouldn't use a
scattered relocation entry with a .weak_definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
e9460ec0577dc82d1fb1f8c92e20f47a3c75abc9 11-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Factor out doesSymbolRequireExternRelocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a6eeb6e226d7d86d04e34e3b6464f66e0a052f43 07-May-2010 Kevin Enderby <enderby@apple.com> Fix i386 relocations to Weak Definitions. The relocation entries should be
external and the item to be relocated should not have the address of the
symbol added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d 05-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them.
- <rdar://problem/7885351> integrated assembler broken for i386 objc code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
ae7fb0b03ebc524e6c47f0262b8dc87810fee1a8 05-May-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Relocations in debug sections should use local relocations
when possible.
- <rdar://problem/7934873>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
454c4ce47963861a6bf159c2700e5a3059fbc298 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
1de558b71f710a00e391fb9a88a6481b8918e207 30-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
8fb040308c25829ad16baaffe4f3c6ba4ac462f6 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Switch to MCSectionData::getOrdinal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
b026d64bf23c3b5c4df7b15185303ec6e7470387 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
5d428511ca9607d52a09d3483d0738f483e09934 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Route access to SectionData offset and file size through MCAsmLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
432cd5fd9b4c97f1e4a53fcf45e16f7dd6bc085e 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Route access to Fragment offset and effective size through MCAsmLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
207e06ea0446c51cb1d89f6400ec7becc46487f8 24-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
35b0657dea3f5dfee3b753a58c585edd22e3b45c 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> Add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
b751418a3992c9da6f48c988f549c8e4c65e26f1 22-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead of a MCDataFragment). Object files should only need the generic MCFragment features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
873decbb37aa31653d9907455386f3c695ee150b 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Better fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
a407fa830a37e721bdeedfd2c3c9c953c96ae29c 19-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix -Wnon-virtual-dtor warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
602b40f0d06d6275cbe73de2ac3b6b6a7dc1d46d 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O/x86_64: Add relocation support.
- This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information.
- There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily).
- 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp
2df4ceba15c130005967ee9e5fb4aa5568de1b0c 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/Mach-O: Move to MachObjectWriter.{h,cpp}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MachObjectWriter.cpp