summaryrefslogtreecommitdiff
path: root/lib/MC/WinCOFFObjectWriter.cpp
Commit message (Collapse)AuthorAge
* Refactor X86 target to separate MC code from Target code.Evan Cheng2011-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135930 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix relative relocations. This is sufficient for running the rust testsuite withRafael Espindola2011-04-21
| | | | | | MC :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129923 91177308-0d34-0410-b5e6-96231b3b80d8
* Behave like gnu as when a relocation crosses sections.Rafael Espindola2011-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129850 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.Cameron Zwarich2011-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126488 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable DebugInfo support for COFF object files.Devang Patel2011-02-24
| | | | | | | | Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126425 91177308-0d34-0410-b5e6-96231b3b80d8
* Gas is very inconsistent about when a relaxation/relocation is needed. DoRafael Espindola2011-02-16
| | | | | | the right thing and stop trying to copy it. Fixes PR8944. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We nowRafael Espindola2010-12-24
| | | | | | 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
* Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122148 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the MCObjectFormat class.Rafael Espindola2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122147 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format ↵Daniel Dunbar2010-12-17
| | | | | | | | 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
* MC/Assembler: Strip out object writer arguments, now that it is always availableDaniel Dunbar2010-12-17
| | | | | | -- and remove FIXME asking for the same! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122032 91177308-0d34-0410-b5e6-96231b3b80d8
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use getSymbolOffset on the COFF writer.Rafael Espindola2010-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120979 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Define generic 1, 2 and 4 byte pc relative relocations. They are commonRafael Espindola2010-11-28
| | | | | | 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
* Fix Warnings.Michael J. Spencer2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117062 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Add support for default-null weak externals.Michael J. Spencer2010-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116666 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix .bss section size. Fixes PR8335. Patch by NAKAMUTA Takumi!Michael J. Spencer2010-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116155 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Assert on non-coff sections.Michael J. Spencer2010-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116148 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Handle relaxation in COFF better. Fixes PR8321.Michael J. Spencer2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116013 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Punctuation.Michael J. Spencer2010-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115657 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix (PR8278) temporary symbol relocations.Michael J. Spencer2010-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115656 91177308-0d34-0410-b5e6-96231b3b80d8
* On ELF we need to know which symbols are used in relocations to decide ifRafael Espindola2010-10-05
| | | | | | | 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
* Correctly produce R_X86_64_32 or R_X86_64_32S.Rafael Espindola2010-09-30
| | | | | | | | | | | | | 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
* Make it possible for the MCObjectWriter to decide if a given fixup is fullyRafael Espindola2010-09-30
| | | | | | | | | | | 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
* MC-COFF: Fix symbol storage class for globalsMichael J. Spencer2010-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115020 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix signed/unsigned comparison.Michael J. Spencer2010-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114888 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Drop empty sections, and label symbols. Convert relocationsMichael J. Spencer2010-09-27
| | | | | | | | targeted at symbols into relocations relative to the containing section. Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114823 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix COFF x86-64 relocations. PR7960.Michael J. Spencer2010-08-24
| | | | | | Multiple symbol reloc handling part of the patch by Cameron Esfahani. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111963 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add partial x86-64 support to COFF.Michael J. Spencer2010-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix symbol fragment offsets in COFF.Michael J. Spencer2010-08-03
| | | | | | Patch by Cameron Esfahani! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "MC: Fix symbol fragment offsets in COFF."Michael J. Spencer2010-08-03
| | | | | | | | This reverts commit r110100 Wrong path caps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110103 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add time travel support to COFF.Michael J. Spencer2010-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110101 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix symbol fragment offsets in COFF.Michael J. Spencer2010-08-03
| | | | | | Patch by Cameron Esfahani! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110100 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence some -Asserts uninitialized variable warnings.Daniel Dunbar2010-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109956 91177308-0d34-0410-b5e6-96231b3b80d8
* COFFObjectWriter: Don't leak COFFSymbols and COFFSections.Benjamin Kramer2010-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109745 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix format-specifier warningDouglas Gregor2010-07-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109391 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix whitespace error from last commit.Michael J. Spencer2010-07-26
| | | | | | A Visual C++ extension that removes trailing new lines? Seriously? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109390 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add WinCOFFObjectWriter implementation.Michael J. Spencer2010-07-26
| | | | | | Origonal Windows COFF implementation by Nathan Jedffords. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109389 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce WinCOFFObjectWriter, patch by Michael Spencer!Chris Lattner2010-07-11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108103 91177308-0d34-0410-b5e6-96231b3b80d8