summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old ELF linker.Rafael Espindola2016-02-281-68/+0
| | | | | | I think it is clear by now that the new linker is viable. llvm-svn: 262158
* [ELF] Define __start_XXX/__stop_XXX symbols where XXX is a section nameSimon Atanasyan2015-07-031-0/+2
| | | | | | | | | | | | | | This is GNU ELF linker extension used particularly by LibC code. If input object files contain section named XXX, and the XXX is a valid C identifier, and there are undefined or weak symbols __start_XXX/__stop_XXX, linker should define __start_XXX/__stop_XXX symbols point to the begin/end of the XXX section correspondingly. For example, without support of this extension statically linked executables for X86_64 and Mips (maybe other) targets do not flush IO buffers at the end of executing. llvm-svn: 241341
* [ARM] Remove unused field in executable writerDenis Protivensky2015-05-211-2/+1
| | | | llvm-svn: 237892
* [ARM] Move out common Writer functionality to ARMELFWriterDenis Protivensky2015-05-211-81/+3
| | | | llvm-svn: 237891
* [ARM] Add needed symbols during dynamic executable linkingDenis Protivensky2015-05-201-0/+15
| | | | | | These include _GLOBAL_OFFSET_TABLE_ and _DYNAMIC. llvm-svn: 237791
* [ARM] Generation of .ARM.exidx/.ARM.extab sectionsLeny Kholodov2015-05-081-1/+9
| | | | | | | | | | | | This patch provides generation of .ARM.exidx & .ARM.extab sections which are used for unwinding. The patch adds new content type typeARMExidx for atoms from .ARM.exidx section and integration of atoms with such type to the ELF ReaderWriter. exidx.test has been added with checking of contents of .ARM.exidx section and .ARM.extab section. Differential Revision: http://reviews.llvm.org/D9324 llvm-svn: 236873
* ELF: Remove ELFT template argument when referring the base class.Rui Ueyama2015-04-141-4/+4
| | | | | | | | We don't need to repeat the template argument. They are not ambiguous. MIPS is parameterized for ELFT, so we can't do this for MIPS, though. llvm-svn: 234913
* ELF: Remove this-> as much as we can.Rui Ueyama2015-04-141-5/+5
| | | | | | | These this-> are there because their classes were templated. They are no longer templated. llvm-svn: 234859
* ELF: Use less templates for ELF types.Rui Ueyama2015-04-141-27/+19
| | | | | | | These classes are templated but actually instantiated for only one ELF type. llvm-svn: 234830
* [ARM] clang-format ARM sourcesDenis Protivensky2015-04-091-3/+3
| | | | llvm-svn: 234474
* [ELF] Simplify adding default atomsSimon Atanasyan2015-04-071-4/+0
| | | | | | | | | | | | | | | | | | | | | Now 'writer' creates an instance of `RuntimeFile` in the constructor, then populates the file in the virtual function `addDefaultAtoms`, then pass owning of this file to the caller of virtual function `createImplicitFiles`. First, we do not need to keep an instance of `RuntimeFile` so long. It is enough to create the file, right after that populate it and pass the owning. Second, relationship between `createImplicitFiles` and `addDefaultAtoms` is complicated. The `createImplicitFiles` might call `addDefaultAtoms`, overridden version of `addDefaultAtoms` might call base class `addDefaultAtoms`, and overridden version of `createImplicitFiles` might call base class `createImplicitFiles` as well as `addDefaultAtoms`. The patch solves both problems above. It creates and populates runtime files right in the createImplicitFiles(), removes `addDefaultAtoms` at all and does not keep references to runtime files in class fields. llvm-svn: 234347
* Replace the `createImplicitFiles` method return type with `void`Simon Atanasyan2015-04-061-3/+2
| | | | | | | All instances of the `createImplicitFiles` always return `true` and this return value is used nowhere. llvm-svn: 234205
* [ARM] Report fatal error for wrong ARM entry pointDenis Protivensky2015-04-021-2/+4
| | | | | | | The case is possible with wrong input, so report an error instead of using llvm_unreachable. llvm-svn: 233899
* [ARM] Set specific flags in ELF headerDenis Protivensky2015-04-011-0/+5
| | | | llvm-svn: 233799
* [ARM] Enhance checks for entry pointDenis Protivensky2015-04-011-4/+14
| | | | llvm-svn: 233798
* ELF: Make findAbsoluteAtom return AtomLayout* instead of an iterator.Rui Ueyama2015-03-311-3/+2
| | | | | | | | | | | All calls of findAbsoluteAtoms seem a bit awkward because of the type of the function. It semantically returns a pointer to an AtomLayout or nothing, so I made the function return AtomLayout*. In this patch, I also expanded some "auto"s because their actual type were not obvious in their contexts. llvm-svn: 233769
* Rename ELFLinkingContext instances "ctx" intead of "context".Rui Ueyama2015-03-271-8/+6
| | | | llvm-svn: 233344
* [ARM] Fix entry point for Thumb codeDenis Protivensky2015-03-231-0/+20
| | | | | | | Test cases for both entry functions in ARM and Thumb code are added. llvm-svn: 232942
* [ELF][ARM] Place gotSymbol in an anonymous namespaceShankar Easwaran2015-03-171-5/+8
| | | | | | Address comments from Espindola. llvm-svn: 232497
* [LinkerScript] Handle symbols defined in linker scriptsRafael Auler2015-03-161-2/+2
| | | | | | | | | | Puts symbols defined in linker script expressions in a runtime file that is added as input to the resolver, making the input object files see symbols defined in linker scripts. http://reviews.llvm.org/D8263 llvm-svn: 232409
* [ELF][ARM] Make gotSymbol a member.Shankar Easwaran2015-03-161-9/+5
| | | | | | | | | | | The gotSymbol need not be a global static variable. Apart from this reason, This variable was creating an issue with self hosting lld, as there seems to be an issue running global initializers, when initializing the guard for this static variable. Program received signal SIGTRAP, Trace/breakpoint trap. llvm-svn: 232341
* [ELF] Ability to resolve undefined symbols lazilyDenis Protivensky2015-03-141-4/+36
| | | | | | | | | Handle resolution of symbols coming from linked object files lazily. Add implementation of handling _GLOBAL_OFFSET_TABLE_ and __exidx_start/_end symbols for ARM platform. Differential Revision: http://reviews.llvm.org/D8159 llvm-svn: 232261
* Use template aliases.Rui Ueyama2015-03-101-3/+3
| | | | | | We dropped Visual Studio 2012 support, so we can use template aliases. llvm-svn: 231756
* [lld] Correct forming of ARM/Thumb atomsDenis Protivensky2015-01-271-0/+11
| | | | | | | | | | | | Symbols addressing Thumb code have zero bit set in st_value to distinguish them from ARM instructions. This caused wrong atoms' forming because of offset of one byte brought in by that corrected st_value. Fixed reading of st_value & st_value-related things in ARMELFFile while forming atoms. Symbol table generation is also fixed for Thumb atoms. Differential Revision: http://reviews.llvm.org/D7161 llvm-svn: 227174
* Fix the ELF shared library build targets - take 2Greg Fitzgerald2015-01-241-0/+1
| | | | | | | | | | lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226976
* Revert " Fix the ELF shared library build targets"Greg Fitzgerald2015-01-231-1/+0
| | | | | | This reverts commit 6a3f545b44cea46321e025d9ab773786af86cb51. llvm-svn: 226928
* Fix the ELF shared library build targetsGreg Fitzgerald2015-01-231-0/+1
| | | | | | | | | | lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226922
* [ELF] Minimal implementation for ARM static linkingGreg Fitzgerald2015-01-211-0/+58
The code is able to statically link the simplest case of: int main() { return 0; } * Only works with ARM code - no Thumb code, no interwork (-marm -mno-thumb-interwork) * musl libc built with no interwork and no Thumb code Differential Revision: http://reviews.llvm.org/D6716 From: Denis Protivensky <dprotivensky@accesssoftek.com> llvm-svn: 226643
OpenPOWER on IntegriCloud