summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* MC: fix ctor/dtor section for windows-itaniumSaleem Abdulrasool2014-06-081-1/+1
| | | | | | | | This adjusts the section setup for the windows-itanium environment. This environment does not report to be a known windows msvc environment, even though it is (nearly) identical to the MSVC environment for C code. llvm-svn: 210406
* MC: whitespace, grouping for COFF section setupSaleem Abdulrasool2014-06-081-26/+33
| | | | | | | | Add some whitespace, combine two sequential conditionals into a single one. Reformat some section definitions to maintain uniformity in the function. NFC. llvm-svn: 210405
* Fix MIPS exception personality encoding.Logan Chien2014-05-301-0/+7
| | | | | | | | | For MIPS, we have to encode the personality routine with an indirect pointer to absptr; otherwise, some link warning warning will be raised, and the program might crash in some early MIPS Android device. llvm-svn: 209907
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-241-4/+6
| | | | | | | | | | | | | | | This commit starts with a "git mv ARM64 AArch64" and continues out from there, renaming the C++ classes, intrinsics, and other target-local objects for consistency. "ARM64" test directories are also moved, and tests that began their life in ARM64 use an arm64 triple, those from AArch64 use an aarch64 triple. Both should be equivalent though. This finishes the AArch64 merge, and everyone should feel free to continue committing as normal now. llvm-svn: 209577
* Revert "DebugInfo: Don't put fission type units in comdat sections."David Blaikie2014-05-211-7/+7
| | | | | | | | | This reverts commit r208930, r208933, and r208975. It seems not all fission consumers are ready to handle this behavior. Reverting until tools are brought up to spec. llvm-svn: 209338
* MC: mark COFF .drectve section as REMOVESaleem Abdulrasool2014-05-211-1/+1
| | | | | | | | | The .drectve section should be marked as IMAGE_SCN_LNK_REMOVE. This matches what the MSVC toolchain does and accurately reflects that this section should not be emitted into the final binary. This section is merely information for the linker, comprising of additional linker directives. llvm-svn: 209273
* MC: Add DwarfTypesDWOSection also to MCCOFF.NAKAMURA Takumi2014-05-161-0/+4
| | | | llvm-svn: 208975
* DebugInfo: Don't put fission type units in comdat sections.David Blaikie2014-05-151-7/+3
| | | | | | | | | Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization. llvm-svn: 208930
* Check explicitly for EHABI and just use the default settings.Joerg Sonnenberger2014-05-131-0/+4
| | | | | | Code depends on the assembler and linker to fix things up... llvm-svn: 208715
* Remove always true argument and unused field.Rafael Espindola2014-05-121-17/+3
| | | | llvm-svn: 208561
* Allow using normal .eh_frame based unwinding on ARM. Use the sameJoerg Sonnenberger2014-05-071-0/+4
| | | | | | encodings as x86. Use this exception model for NetBSD. llvm-svn: 208166
* Add missing breaks.Joerg Sonnenberger2014-04-301-0/+3
| | | | llvm-svn: 207723
* Switch over getArch()'s result.Joerg Sonnenberger2014-04-301-15/+28
| | | | llvm-svn: 207721
* [ARM64] Ensure arm64_be is dealt with when emitting debug info.James Molloy2014-04-301-1/+2
| | | | | | | This is a partial port of r204816 (cpirker "Elf support for MC-JIT runtime dynamic linker") from AArch64 to ARM64. llvm-svn: 207625
* MC: restore behaviour of defaulting to ELFSaleem Abdulrasool2014-04-271-4/+3
| | | | | | | This restores the previous behaviour of just assuming that if you dont specify a valid triple that you really meant the default triple with an ELF object file. llvm-svn: 207349
* Add WoA object file emission supportSaleem Abdulrasool2014-04-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | Introduce support for WoA PE/COFF object file emission from LLVM. Add the new target specific PE/COFF Streamer (ARMWinCOFFStreamer) that handles the ARM specific behaviour of PE/COFF object emission. ARM exception information is not yet emitted and is a TODO item. The ARM specific object writer (ARMWinCOFFObjectWriter) handles the ARM specific relocation handling in conjunction with the WinCOFFObjectWriter in the MC layer. The MC layer needs to be updated to deal with the relocation adjustments. Branch relocations are adjusted by 4 bytes (unlikely their ELF counterparts). Minor tweaks to switch multiple conditional checks into equivalent switch statements. The ObjectFileInfo is updated to relax the object file setup for Windows COFF. Move the architecture checks into an assertion. Windows COFF is currently only supported on x86, x86_64, and ARM (thumb). Rather than defaulting to ELF, we will refuse to generate an object file. This is better though as you do not get an (arbitrary) object file which is different from the request. llvm-svn: 207345
* AArch64/ARM64: port across stub handling for ELF C++ exceptions.Tim Northover2014-04-161-2/+3
| | | | | | | | The most important part here is that we should actuall emit the stubs we refer to in the exception table, but as a side issue this uses more sensible & GCC compatible representations for some of the bits of information. llvm-svn: 206380
* [C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper2014-04-131-9/+9
| | | | | | check instead of comparing to nullptr. llvm-svn: 206129
* WinCOFF: Emit common symbols as specified in the COFF specDavid Majnemer2014-04-081-0/+4
| | | | | | | | | | | | | | | | | | Summary: Local common symbols were properly inserted into the .bss section. However, putting external common symbols in the .bss section would give them a strong definition. Instead, encode them as undefined, external symbols who's symbol value is equivalent to their size. Reviewers: Bigcheese, rafael, rnk CC: llvm-commits Differential Revision: http://reviews.llvm.org/D3324 llvm-svn: 205811
* ARM64: initial backend importTim Northover2014-03-291-1/+8
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. llvm-svn: 205090
* MC-exceptions: add support for compact-unwind without .eh_frameTim Northover2014-03-291-0/+1
| | | | | | | | | | | | ARM64 has compact-unwind information, but doesn't necessarily want to emit .eh_frame directives as well. This teaches MC about such a situation so that it will skip .eh_frame info when compact unwind has been successfully produced. For functions incompatible with compact unwind, the normal information is still written. llvm-svn: 205087
* Canonicalise Windows target triple spellingsSaleem Abdulrasool2014-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Construct a uniform Windows target triple nomenclature which is congruent to the Linux counterpart. The old triples are normalised to the new canonical form. This cleans up the long-standing issue of odd naming for various Windows environments. There are four different environments on Windows: MSVC: The MS ABI, MSVCRT environment as defined by Microsoft GNU: The MinGW32/MinGW32-W64 environment which uses MSVCRT and auxiliary libraries Itanium: The MSVCRT environment + libc++ built with Itanium ABI Cygnus: The Cygwin environment which uses custom libraries for everything The following spellings are now written as: i686-pc-win32 => i686-pc-windows-msvc i686-pc-mingw32 => i686-pc-windows-gnu i686-pc-cygwin => i686-pc-windows-cygnus This should be sufficiently flexible to allow us to target other windows environments in the future as necessary. llvm-svn: 204977
* AArch64_BE Elf support for MC-JIT runtime dynamic linkerChristian Pirker2014-03-261-1/+2
| | | | llvm-svn: 204816
* DebugInfo: Add fission-related sections to COFFDavid Blaikie2014-03-261-0/+27
| | | | | | | Allows this test to pass on COFF platforms so we don't need to restrict this test to a single target anymore. llvm-svn: 204780
* MC: Remove superfluous section attribute flag definitionsDavid Majnemer2014-03-071-42/+42
| | | | | | | | | | | | | | | | | | | Summary: llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same definitions for the section flags. Instead, grab the definitions out of support. No functionality change. Reviewers: grosbach, Bigcheese, rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2998 llvm-svn: 203211
* Reapply "MC: simplify object file selection for Windows"Saleem Abdulrasool2014-03-061-3/+2
| | | | | | | | That was overly aggressive in assuming that we could always assume COFF. Some of the tests assume that they will get ELF rather than COFF even on Windows where the default is COFF. llvm-svn: 203176
* Support: split object format out of environmentSaleem Abdulrasool2014-03-061-2/+2
| | | | | | | | | | | This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). llvm-svn: 203160
* MC: simplify object file selection for WindowsSaleem Abdulrasool2014-03-061-4/+3
| | | | | | | | Windows always uses COFF unless Windows ELF is in use. Rather than checking if Windows, MinGW, or Cygwin is being targeted, just check if the target OS is windows and that it is not an ELF environment. llvm-svn: 203159
* Use __literal16. It has been supported by the linker since 2005.Rafael Espindola2014-02-131-10/+4
| | | | llvm-svn: 201365
* Reland r200340 - 'Add line table debug info to COFF files when using a win32 ↵Timur Iskhodzhanov2014-01-301-0/+4
| | | | | | | | triple' This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651 llvm-svn: 200440
* MC: Add a .debug section that we'll soon use to emit debug info into COFF filesTimur Iskhodzhanov2014-01-281-0/+7
| | | | llvm-svn: 200285
* Fix the DWARF EH encodings for Sparc PIC code.Jakob Stoklund Olesen2014-01-281-0/+27
| | | | | | | Also emit the stubs that were generated for references to typeinfo symbols. llvm-svn: 200282
* Revert "Revert r198851, "Prototype of skeleton type units for fission""David Blaikie2014-01-101-2/+3
| | | | | | | | | This reverts commit r198865 which reverts r198851. ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable in skeleton type units. llvm-svn: 198908
* Revert r198851, "Prototype of skeleton type units for fission"NAKAMURA Takumi2014-01-091-3/+2
| | | | | | It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess. llvm-svn: 198865
* Prototype of skeleton type units for fissionDavid Blaikie2014-01-091-2/+3
| | | | llvm-svn: 198851
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+1
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. Recommitted as r197210 with a fix to dumping and reverted as r197211 because I was a bit gun shy and thought I saw a failure that turned out to be unrelated. So here we go - once more with feeling! \o/ llvm-svn: 197275
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-131-12/+0
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. llvm-svn: 197211
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-131-0/+12
| | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. llvm-svn: 197210
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-131-12/+0
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197197. llvm-svn: 197199
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-131-0/+12
| | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... llvm-svn: 197197
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-111-12/+0
| | | | | | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197073. The test seems to be failing on some buildbots for unknown reasons. Reverting until I can figure that out. If anyone's got a reproduction (.s and .o together would be great) - I'd really appreciate it. llvm-svn: 197079
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-111-0/+12
| | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. llvm-svn: 197073
* Add a method to get the object-file appropriate stack map section.Lang Hames2013-11-081-0/+3
| | | | | | Thanks to Eric Christopher for the tips on the appropriate way to do this. llvm-svn: 194282
* Initialize BSSSection explicitly in InitMachOMCObjectFileInfo() to appease msvc.NAKAMURA Takumi2013-09-211-0/+3
| | | | | | This can revert r191087. llvm-svn: 191128
* MCObjectFileInfo.cpp: Fix a couple of possible typo(s), ↵NAKAMURA Takumi2013-09-101-2/+2
| | | | | | | | s/DwarfPub/DwarfGnuPub/, in r190344. XFAIL can be removed. (in r190374) llvm-svn: 190386
* Add the gnu pubnames and pubtypes sections to the mc object fileEric Christopher2013-09-091-0/+24
| | | | | | handling. llvm-svn: 190344
* [-cxx-abi microsoft] Stick zero initialized symbols into the .bss section ↵David Majnemer2013-08-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | for COFF Summary: We need to do two things: - Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo - Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do with it This fixes PR16861. Reviewers: rnk Reviewed By: rnk CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1361 llvm-svn: 188244
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The LLVM portions of this patch simply add ppc64le coverage everywhere that ppc64 coverage currently exists. There is nothing of any import worth testing until such time as little-endian code generation is implemented. In the corresponding Clang patch, there is a new test case variant to ensure that correct built-in defines for little-endian code are generated. llvm-svn: 187179
* Revert: Emit personality function and Dwarf EH data for Win64 SEH.Kai Nacke2013-07-081-10/+5
| | | | llvm-svn: 185788
OpenPOWER on IntegriCloud