summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* The initial .text section generated in object files was missing theEric Christopher2018-09-061-1/+13
| | | | | | | | | | | | | | | | | | | | SHF_ARM_PURECODE flag when being built with the -mexecute-only flag. All code sections of an ELF must have the flag set for the final .text section to be execute-only, otherwise the flag gets removed. A HasData flag is added to MCSection to aid in the determination that the section is empty. A virtual setTargetSectionFlags is added to MCELFObjectTargetWriter to allow subclasses to set target specific section flags to be added to sections which we then use in the ARM backend to set SHF_ARM_PURECODE. Patch by Ivan Lozano! Reviewed By: echristo Differential Revision: https://reviews.llvm.org/D48792 llvm-svn: 341593
* ARM: Remove dead code. NFCI.Peter Collingbourne2018-02-081-3/+0
| | | | llvm-svn: 324565
* Rewrite ARM execute only support to avoid the use of a command line flag and ↵Eric Christopher2017-07-011-19/+15
| | | | | | | | unqualified ARMSubtarget lookup. Paired with a clang commit to use the new behavior. llvm-svn: 306927
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-2/+2
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* [ARM] Remove ThumbTargetMachines. (NFC)Florian Hahn2017-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Thumb code generation is controlled by ARMSubtarget and the concrete ThumbLETargetMachine and ThumbBETargetMachine are not needed. Eric Christopher suggested removing the unneeded target machines in https://reviews.llvm.org/D33287. I think it still makes sense to keep separate TargetMachines for big and little endian as we probably do not want to have different endianess for difference functions in a single compilation unit. The MIPS backend has two separate TargetMachines for big and little endian as well. Reviewers: echristo, rengolin, kristof.beyls, t.p.northover Reviewed By: echristo Subscribers: aemerson, javed.absar, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D33318 llvm-svn: 303733
* [ARM] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-311-4/+7
| | | | | | minor fixes (NFC). llvm-svn: 293578
* [ARM] Implement execute-only support in CodeGenPrakhar Bahuguna2016-12-151-2/+34
| | | | | | | | | | | | | | | | | | | | This implements execute-only support for ARM code generation, which prevents the compiler from generating data accesses to code sections. The following changes are involved: * Add the CodeGen option "-arm-execute-only" to the ARM code generator. * Add the clang flag "-mexecute-only" as well as the GCC-compatible alias "-mpure-code" to enable this option. * When enabled, literal pools are replaced with MOVW/MOVT instructions, with VMOV used in addition for floating-point literals. As the MOVT instruction is required, execute-only support is only available in Thumb mode for targets supporting ARMv8-M baseline or Thumb2. * Jump tables are placed in data sections when in execute-only mode. * The execute-only text section is assigned section ID 0, and is marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'. This also overrides selection of ELF sections for globals. llvm-svn: 289784
* CodeGen: simplify TargetMachine::getSymbol interface. NFC.Tim Northover2016-11-221-1/+1
| | | | | | | | | No-one actually had a mangler handy when calling this function, and getSymbol itself went most of the way towards getting its own mangler (with a local TLOF variable) so forcing all callers to supply one was just extra complication. llvm-svn: 287645
* Move the Mangler from the AsmPrinter down to TLOF and clean up theEric Christopher2016-09-161-5/+4
| | | | | | TLOF API accordingly. llvm-svn: 281708
* MC: Clean up MCExpr naming. NFC.Jim Grosbach2015-05-301-2/+2
| | | | llvm-svn: 238634
* Remove calls to bare getSubtarget and clean up the functionsEric Christopher2015-01-301-2/+3
| | | | | | accordingly. llvm-svn: 227535
* Compute the ELF SectionKind from the flags.Rafael Espindola2015-01-291-4/+1
| | | | | | | | | | | | Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476
* Allow using normal .eh_frame based unwinding on ARM. Use the sameJoerg Sonnenberger2014-05-071-0/+5
| | | | | | encodings as x86. Use this exception model for NetBSD. llvm-svn: 208166
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-251-1/+1
| | | | llvm-svn: 207197
* move getNameWithPrefix and getSymbol to TargetMachine.Rafael Espindola2014-02-191-1/+1
| | | | | | | | | | TargetLoweringBase is implemented in CodeGen, so before this patch we had a dependency fom Target to CodeGen. This would show up as a link failure of llvm-stress when building with -DBUILD_SHARED_LIBS=ON. This fixes pr18900. llvm-svn: 201711
* Add back r201608, r201622, r201624 and r201625Rafael Espindola2014-02-191-5/+5
| | | | | | | | | | | | | | r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. llvm-svn: 201700
* Revert r201622 and r201608.Daniel Jasper2014-02-191-5/+5
| | | | | | | This causes the LLVMgold plugin to segfault. More information on the replies to r201608. llvm-svn: 201669
* Fix PR18743.Rafael Espindola2014-02-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | The IR @foo = private constant i32 42 is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the liker needs the labels in order to atomize it. One way of fixing it would be to just reject this IR in the backend, but that would not be very front end friendly. What this patch does is use an 'l' prefix in sections that we know the linker requires symbols for atomizing them. This allows frontends to just use private and not worry about which sections they go to or how the linker handles them. One small issue with this strategy is that now a symbol name depends on the section, which is not available before codegen. This is not a problem in practice. The reason is that it only happens with private linkage, which will be ignored by the non codegen users (llvm-nm and llvm-ar). llvm-svn: 201608
* Use a consistent argument order in TargetLoweringObjectFile.Rafael Espindola2014-02-091-5/+4
| | | | | | | | | These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions. llvm-svn: 201044
* Pass the Mangler by reference.Rafael Espindola2014-02-081-2/+2
| | | | | | | It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM. llvm-svn: 201025
* ARM: Enable use of relocation type tlsldo in debug info for tls data.Kai Nacke2014-02-051-0/+6
| | | | | | | This fixes PR18554. Reviewers: Renato Golin, Keith Walker llvm-svn: 200826
* Revert: ARM: Enable use of relocation type tlsldo in debug info for tls data.Kai Nacke2014-02-041-6/+0
| | | | | | | There seems to be a new problem with the debug info in the test case. I'll have to investigate this. llvm-svn: 200737
* ARM: Enable use of relocation type tlsldo in debug info for tls data.Kai Nacke2014-02-041-0/+6
| | | | | | | This fixes PR18554. Reviewers: Renato Golin, Keith Walker llvm-svn: 200735
* Move the llvm mangler to lib/IR.Rafael Espindola2014-01-071-1/+1
| | | | | | This makes it available to tools that don't link with target (like llvm-ar). llvm-svn: 198708
* Move getSymbol to TargetLoweringObjectFile.Rafael Espindola2013-10-291-1/+1
| | | | | | This allows constructing a Mangler with just a TargetMachine. llvm-svn: 193630
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-3/+3
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Use TARGET2 relocation for TType references on ARM.Anton Korobeynikov2012-11-141-1/+14
| | | | | | | | Do some cleanup of the code while here. Inspired by patch by Logan Chien! llvm-svn: 167904
* Move the support for using .init_array from ARM to the genericRafael Espindola2012-06-191-41/+2
| | | | | | | | | | TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM, on X86 it is not easy to find out if .init_array should be used or not, so the decision is made via TargetOptions and defaults to off. Add a command line option to llc that enables it. llvm-svn: 158692
* Properly emit ctors / dtors with priorities into desired sectionsAnton Korobeynikov2012-01-251-2/+33
| | | | | | | | and let linker handle the rest. This finally fixes PR5329 llvm-svn: 148990
* Emit the ctors in the proper order on ARM/EABI.Anton Korobeynikov2011-12-031-0/+1
| | | | | | | | Maybe some targets should use this as well. Patch by Evgeniy Stepanov! llvm-svn: 145781
* Some first rudimentary support for ARM EHABI: print exception table in "text ↵Anton Korobeynikov2011-03-051-1/+2
| | | | | | mode". llvm-svn: 127099
* Remove more duplicated code.Rafael Espindola2011-01-231-4/+4
| | | | llvm-svn: 124056
* Remove duplicated code.Rafael Espindola2011-01-231-3/+4
| | | | llvm-svn: 124054
* Second set of ARM/MC/ELF changes.Jason W Kim2010-10-111-0/+6
| | | | | | | | | Added ARM specific ELF section types. Added AttributesSection to ARMElfTargetObject First step in unifying .cpu assembly tag with ELF/.o llc now asserts on actual ELF emission on -filetype=obj :-) llvm-svn: 116257
* delete a forwarding function.Chris Lattner2010-04-081-6/+9
| | | | llvm-svn: 100815
* Now that the default for Darwin platforms is to place the LSDA into the TEXTBill Wendling2010-03-151-18/+0
| | | | | | section, remove the target-specific code that performs this. llvm-svn: 98580
* The ARM EH experiment worked!Bill Wendling2010-03-091-0/+54
Place the LSDA into the TEXT section for ARM platforms. This involves making the encoding indirect, pcrel, and sdata4 instead of an absolute pointer. The references to the type infos are then non-lazy pointers. Revision 98019 changed the encoding of non-lazy pointers to add the symbol to the non-lazy pointer definition if it's a local symbol (otherwise, it's external and set to '0' so that the loader can adjust it to the real value). This paved the way for this change to work on ARM. llvm-svn: 98068
OpenPOWER on IntegriCloud