aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/COFF
Commit message (Collapse)AuthorAgeFilesLines
* [mc-coff] Resolve aliases when emitting COFF relocationsReid Kleckner2013-07-151-0/+106
| | | | | | | | | | | | This is consistent with the ELF object writer. Add some COFF tests that relocate against an alias. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D1079 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186341 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-081-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185793 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH data structures.Kai Nacke2013-07-081-22/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185791 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: Fix alignment of unwind data.Kai Nacke2013-07-083-226/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185790 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix alignment of unwind data.Kai Nacke2013-07-063-0/+226
| | | | | | | | | | | | For alignment purposes, the instruction array will always have an even number of entries, with the final entry potentially unused (in which case the array will be one longer than indicated by the count of unwind codes field). Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185760 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-07-061-1/+22
| | | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-061-2/+0
| | | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Charles Davis and Nico Rieck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185758 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Implement COFF .linkonce directiveNico Rieck2013-07-062-0/+219
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185753 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add .section directive to COFFNico Rieck2013-07-043-2/+178
| | | | | | | | Supports GAS flags "abdnrswxy". No support for alignment or subsections. Fixes PR16366. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185669 91177308-0d34-0410-b5e6-96231b3b80d8
* [mc-coff] Forward Linker Option flags into the .drectve sectionReid Kleckner2013-04-251-0/+21
| | | | | | | | | | | | | | Summary: This is modelled on the Mach-O linker options implementation and should support a Clang implementation of #pragma comment(lib/linker). Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D724 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180569 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix section relocation for SECTIONREL32 with immediate offset.Rafael Espindola2013-04-251-0/+19
| | | | | | Patch by Kai Nacke. This matches the gnu as output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180568 91177308-0d34-0410-b5e6-96231b3b80d8
* COFF: Fix weak external aliases.Peter Collingbourne2013-04-221-0/+18
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D700 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180034 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-1215-446/+814
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Support COFF image-relative MCSymbolRefsNico Rieck2013-04-101-0/+29
| | | | | | | | | | | | | | | | Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are similar to normal 4-byte relocations except that they do not include the base address of the image. Image-relative relocations are used for debug information (32-bit) and SEH unwind tables (64-bit). A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to specify such relocations. For AT&T assembly, this variant can be accessed using the symbol suffix '@imgrel'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179240 91177308-0d34-0410-b5e6-96231b3b80d8
* [MC][COFF] Delay handling symbol aliases when writingMichael J. Spencer2013-01-291-0/+11
| | | | | | Fixes PR14447 and PR9034. Patch by Nico Rieck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173839 91177308-0d34-0410-b5e6-96231b3b80d8
* [MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!Michael J. Spencer2012-11-131-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167877 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit dtors into proper section while compiling in vcpp-compatible mode.Anton Korobeynikov2012-09-231-6/+17
| | | | | | | Patch by Kai! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164476 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-071-0/+13
| | | | | | | | For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163420 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/MC/COFF/seh.s: Fixup corresponding to r161487.NAKAMURA Takumi2012-08-081-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161489 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-251-8/+1
| | | | | | | | | | | | | | | | | | * Removed test/lib/llvm.exp - it is no longer needed * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files left in the test suite so this code is no longer required. test/lit.cfg is now much shorter and clearer * Removed a lot of duplicate code in lit.local.cfg files that need access to the root configuration, by adding a "root" attribute to the TestingConfig object. This attribute is dynamically computed to provide the same information as was previously provided by the custom getRoot functions. * Documented the config.root attribute in docs/CommandGuide/lit.pod git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit global ctors into .CRT$XCU instead of .ctors on Win32. Patch by Joe Groff!Michael J. Spencer2012-02-231-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151289 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-5/+13
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added theRafael Espindola2011-12-171-0/+14
| | | | | | asm parsing and testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146801 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86/COFF: Allow quotes in names when targeting MS/Windows,Michael J. Spencer2011-11-291-0/+17
| | | | | | | | | | as MC is the only assembler we support. This splits MS/Windows and GNU/Windows ASM infos into two seperate classes. While there is currently only one difference, full MS C++ ABI support will require many more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145409 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the suffix to the Win64 EH data sections' names if given. Add a test forCharles Davis2011-05-271-0/+37
| | | | | | | this. XFAIL'd, because the COFF AsmParser can't handle .section yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132220 91177308-0d34-0410-b5e6-96231b3b80d8
* Assorted fixes for Win64 EH unwind info emission:Charles Davis2011-05-271-4/+13
| | | | | | | | | | | - Flip order of bitfields. This gets our output matching GAS. - Handle case where the end of the prolog wasn't specified. - If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes. Add a test for the latter two. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132188 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for Win64 EH unwind information emission.Charles Davis2011-05-271-0/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132180 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some hard coded CR-LFs. Some of these were the entire files, one ofChandler Carruth2011-04-256-498/+498
| | | | | | | | these was just one line of a file. Explicitly set the eol-style property on the files to try and ensure this fix stays. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130125 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix relative relocations. This is sufficient for running the rust testsuite withRafael Espindola2011-04-211-3/+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-201-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129850 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PadSectionToAlignment on windows.Rafael Espindola2010-12-062-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120978 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak test on non-COFF targets.Benjamin Kramer2010-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116669 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Add support for default-null weak externals.Michael J. Spencer2010-10-161-0/+51
| | | | 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-091-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116155 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Implement InitSections. Fixes PR8335.Michael J. Spencer2010-10-092-3/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116151 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Add COFFAsmParser. Completes PR8343.Michael J. Spencer2010-10-0910-374/+443
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116150 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Add test for my last commit.Michael J. Spencer2010-10-081-0/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116015 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix symbol aliases. Fixes PR8251.Michael J. Spencer2010-10-071-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115909 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix (PR8278) temporary symbol relocations.Michael J. Spencer2010-10-051-30/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115656 91177308-0d34-0410-b5e6-96231b3b80d8
* test/COFF: Fix symbol indexes and names. Update tests to match.Michael J. Spencer2010-10-052-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115642 91177308-0d34-0410-b5e6-96231b3b80d8
* test/COFF: Remove temp file usage.Michael J. Spencer2010-10-053-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115641 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup Whitespace.Michael J. Spencer2010-10-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115639 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hook in MCSection to decide when to use "optimized nops", for eachJan Wen Voung2010-10-042-1/+46
| | | | | | | | | section kind. Previously, optimized nops were only used for MachO. Also added tests for ELF and COFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Fix test. IMAGE_SYM_CLASS_LABEL should never have been emitted.Michael J. Spencer2010-09-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115024 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-COFF: Drop empty sections, and label symbols. Convert relocationsMichael J. Spencer2010-09-272-61/+33
| | | | | | | | 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
* test: Fix coff-dump section array indicies to 1 based to match file format.Michael J. Spencer2010-09-152-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113928 91177308-0d34-0410-b5e6-96231b3b80d8
* COFF: Update tests to reflect changes in last commit.Michael J. Spencer2010-09-012-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112704 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix COFF x86-64 relocations. PR7960.Michael J. Spencer2010-08-243-10/+44
| | | | | | 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: Fix symbol fragment offsets in COFF.Michael J. Spencer2010-08-031-0/+182
| | | | | | Patch by Cameron Esfahani! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MC use Windows COFF on Windows and add tests.Michael J. Spencer2010-07-272-0/+141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109494 91177308-0d34-0410-b5e6-96231b3b80d8