summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/AArch64
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] Remove is64bits() and isLittlEndian().Shankar Easwaran2014-11-071-4/+0
| | | | | | | | | | ELFLinkingContext had these two functions, which is really not needed since the Writer uses a llvm::object template composed of Endianness, Alignment, Is32bit/64bit. We could just use that and not duplicate functionality. No Change In Functionality. llvm-svn: 221523
* [ELF] Implement isLittleEndian for all architecturesShankar Easwaran2014-11-061-0/+4
| | | | llvm-svn: 221427
* [ELF] Remove duplicate code.Shankar Easwaran2014-10-211-54/+9
| | | | | | | The base class ELFObjectReader/ELFDSOReader implement the canParse functionaity with this change. llvm-svn: 220261
* [ELF] Check for target architecture.Shankar Easwaran2014-10-202-1/+24
| | | | | | | | | | The canParse function for all the ELF subtargets check if the input files match the subtarget. There were few mismatches in the input files that didnt match the subtarget for which the link was being invoked, which also acts as a test for this change. llvm-svn: 220182
* [ELF] Add Readers for all the ELF subtargets.Shankar Easwaran2014-10-189-19/+175
| | | | | | | | | This would permit the ELF reader to check the architecture that is being selected by the linking process. This patch also sorts the include files according to LLVM conventions. llvm-svn: 220129
* [CMake] lld: Introduce ${cmake_2_8_12_INTERFACE} onto each ↵NAKAMURA Takumi2014-10-171-1/+1
| | | | | | | target_link_libraries. [PR20254] FIXME: Dependencies should be reorganized. llvm-svn: 220000
* Reapply [ELF] Only mark as DT_NEEDED libs that are strictly necessary (r219353)Rafael Auler2014-10-091-0/+9
| | | | | | | | | | | | | | | | | | | | When committed in r219353, this patch originally caused problems because it was not tested in debug build. In such scenarios, Driver.cpp adds two additional passes. These passes serialize all atoms via YAML and reads it back. Since the patch changed ObjectAtom to hold a new reference, the serialization was removing the extra data. This commit implements r219853 in another way, similar to the original MIPS way, by using a StringSet that holds the names of all copied atoms instead of directly holding a reference to the copied atom. In this way, this commit is simpler and eliminate the necessity of changing the DefinedAtom hierarchy to hold a new data. Reviewers: shankarke http://reviews.llvm.org/D5713 llvm-svn: 219449
* Revert "[ELF] Only mark as DT_NEEDED libs that are strictly necessary"Rui Ueyama2014-10-092-10/+1
| | | | | | This reverts commit r219353 because that seems to break buildbots. llvm-svn: 219369
* [ELF] Only mark as DT_NEEDED libs that are strictly necessaryRafael Auler2014-10-082-1/+10
| | | | | | | | | | | | | | | | | | | | | Enhances the creation of an ELF dynamic executable by avoiding recording unnecessary shared libraries as NEEDED to load a program. To do this, we must keep track of not only symbols that were referenced but also of COPY relocations, which steal the symbol from a shared library but does not store from which lib this symbol came from. To fix this, this commit changes ObjectSymbol to store the original library from which this symbol came. With this information, we are able to build a list of the exact shared libraries that must be marked as DT_NEEDED, instead of blindly marking all shared libraries as needed. This logic originally came from the MIPS backend with some adaptation. Reviewers: atanasyan, shankar.easwaran http://reviews.llvm.org/D5574 llvm-svn: 219353
* Revert "[ELF][AllArchs] Fix includes"Shankar Easwaran2014-10-083-6/+6
| | | | | | This reverts commit e137dd93e1291a2d2fa7f41c8f8bcdb59c8b3225. llvm-svn: 219313
* [ELF][AllArchs] Fix includesShankar Easwaran2014-10-083-6/+6
| | | | llvm-svn: 219278
* [lld] [ELF] Support for general dynamic TLS relocations on X86_64Rafael Auler2014-09-292-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the general dynamic TLS access model for X86_64 (see www.akkadia.org/drepper/tls.pdf). To properly support TLS, the patch also changes the __tls_get_addr atom to be a shared library atom instead of a regularly defined atom (the previous lld approach). This closely models the reality of a function that will be resolved at runtime by the dynamic linker and loader itself (ld.so). I was tempted to force LLD to link against ld.so itself to resolve these symbols, but since GNU ld does not need the ld.so library to resolve this symbol, I decided to mimic its behavior and keep hardwired a definition of __tls_get_addr in the lld code. This patch also moves some important logic that previously was only available to the MIPS lld backend to be used to all ELF backends. This logic, which now lives in the DefaultLayout class, will monitor which external (shared lib) symbols are really imported by the current module and will only populate the dynamic symbol table with used symbols, as opposed to the previous approach of dumping all shared lib symbols in the dynamic symbol table. This is important to this patch to avoid __tls_get_addr from getting injected into all dynamic symbol tables. By solving the previous problem of always adding __tls_get_addr, now the produced symbol tables are slightly smaller. But this impacted several tests that relied on hardwired/predefined sizes of the symbol table, requiring this patch to update such tests. Test Plan: Added a LIT test case that exercises a simple use case of TLS variable in a shared library. Reviewers: ruiu, rafael, Bigcheese, shankarke Reviewed By: Bigcheese, shankarke Subscribers: emaste, shankarke, joerg, kledzik, mcrosier, llvm-commits Projects: #lld Differential Revision: http://reviews.llvm.org/D5505 llvm-svn: 218633
* [AArch64] Fix an incorrect PLT entry.Chad Rosier2014-09-241-1/+2
| | | | | | | | | | This patch is difficult to test in isolation, so a subsequent patch will test further. Patch by Daniel Stewart <stewartd@codeaurora.org>! Phabricator Revision: http://reviews.llvm.org/D5377 llvm-svn: 218418
* [ELF][Cleanup] Remove unused functionsShankar Easwaran2014-09-082-16/+0
| | | | | | Remove unused functions in the Target relocation handler. llvm-svn: 217354
* Fixed typo (from r215544) that caused the lld-sphinx-docs buildbotDan Liew2014-08-211-1/+1
| | | | | | to fail. llvm-svn: 216165
* AArch64: replace __func__ with LLVM_FUNCTION_NAMEHans Wennborg2014-08-132-123/+123
| | | | | | MSVC doesn't define __func__. llvm-svn: 215578
* Remove unused private fields from r215544 to appease buildbots.Chad Rosier2014-08-132-8/+2
| | | | llvm-svn: 215547
* [AArch64] Initial ELF/AArch64 SupportChad Rosier2014-08-1314-0/+1682
This patch adds the initial ELF/AArch64 support to lld. Only a basic "Hello World" app has been successfully tested for both dynamic and static compiling. Differential Revision: http://reviews.llvm.org/D4778 Patch by Daniel Stewart <stewartd@codeaurora.org>! llvm-svn: 215544
OpenPOWER on IntegriCloud