summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Hexagon
Commit message (Collapse)AuthorAgeFilesLines
...
* Add LLVM_LINK_COMPONENTS for the shared object buildGreg Fitzgerald2015-01-161-0/+2
| | | | | | | Differential Revision: http://reviews.llvm.org/D7023 From: Greg Fitzgerald <garious@gmail.com> llvm-svn: 226346
* [ELF] Remove TargetHandler and DefaultTargetHandler constructorsSimon Atanasyan2015-01-161-1/+1
| | | | | | | These classes contain only abstract virtual functions. Explicit constructors are redundant. llvm-svn: 226265
* [ELF] Make `TargetRelocationHandler` a regular non-template classSimon Atanasyan2015-01-161-4/+2
| | | | | | | This class defines a relocation handler interface. The interface does not depend on the template argument so the argument is redundant. llvm-svn: 226259
* Separate file parsing from File's constructors.Rui Ueyama2014-12-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a second patch for InputGraph cleanup. Sorry about the size of the patch, but what I did in this patch is basically moving code from constructor to a new method, parse(), so the amount of new code is small. This has no change in functionality. We've discussed the issue that we have too many classes to represent a concept of "file". We have File subclasses that represent files read from disk. In addition to that, we have bunch of InputElement subclasses (that are part of InputGraph) that represent command line arguments for input file names. InputElement is a wrapper for File. InputElement has parseFile method. The method instantiates a File. The File's constructor reads a file from disk and parses that. Because parseFile method is called from multiple worker threads, file parsing is processed in parallel. In other words, one reason why we needed the wrapper classes is because a File would start reading a file as soon as it is instantiated. So, the reason why we have too many classes here is at least partly because of the design flaw of File class. Just like threads in a good threading library, we need to separate instantiation from "start" method, so that we can instantiate File objects when we need them (which should be very fast because it involves only one mmap() and no real file IO) and use them directly instead of the wrapper classes. Later, we call parse() on each file in parallel to let them do actual file IO. In this design, we can eliminate a reason to have the wrapper classes. In order to minimize the size of the patch, I didn't go so far as to replace the wrapper classes with File classes. The wrapper classes are still there. In this patch, we call parse() immediately after instantiating a File, so this really has no change in functionality. Eventually the call of parse() should be moved to Driver::link(). That'll be done in another patch. llvm-svn: 224102
* [ELF] Remove duplicate constructor code.Rui Ueyama2014-12-111-33/+4
| | | | | | This piece of code was copied multiple times to each archs. llvm-svn: 224001
* [ELF] Make -init/-fini options compatible with the gnu linkerSimon Atanasyan2014-12-102-93/+0
| | | | | | | | | | | | | | The LLD linker searches initializer and finalizer function names and emits DT_INIT/DT_FINI dynamic table tags to point to these symbols. The -init/-fini command line options override initializer ("_init") and finalizer ("_fini") function names used by default. Now the -init/-fini options do not affect .init_array/.fini_array sections. The corresponding code has been removed. Differential Revision: http://reviews.llvm.org/D6578 llvm-svn: 223917
* ELF: Add a standard method for unknown relocation errorsWill Newton2014-12-093-11/+8
| | | | | | | | | | | | | | | | | | | At present each TargetRelocationHandler generates a pretty similar error string and calls llvm_unreachable() when encountering an unknown relocation. This is not ideal for two reasons: 1. llvm_unreachable disappears in release builds but we still want to know if we encountered a relocation we couldn't handle in release builds. 2. Duplication is bad - there is no need to have a per-architecture error message. This change adds a test for AArch64 to test whether or not the error message actually works. The other architectures have not been tested but they compile and check-lld passes. llvm-svn: 223782
* ELF: Use ELF reloc .def files to reduce duplicationWill Newton2014-12-051-92/+5
| | | | | | Tested with check-lld with no regressions. llvm-svn: 223462
* [ELF] Rename align2 to alignment.Shankar Easwaran2014-11-301-8/+8
| | | | | | No change in functionality. llvm-svn: 222975
* [ELF] Create input and output section namesShankar Easwaran2014-11-301-3/+3
| | | | | | No change in functionality. llvm-svn: 222973
* Revert "[ELF] Create input and output section names"Shankar Easwaran2014-11-191-3/+3
| | | | | | | | This reverts commit r222311. Reverting because of failure in the darwin bot. llvm-svn: 222329
* [ELF] Create input and output section namesShankar Easwaran2014-11-191-3/+3
| | | | | | No change in functionality. llvm-svn: 222311
* [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-187-10/+6
| | | | | | | | | 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
* Revert "[ELF][AllArchs] Fix includes"Shankar Easwaran2014-10-085-12/+12
| | | | | | This reverts commit e137dd93e1291a2d2fa7f41c8f8bcdb59c8b3225. llvm-svn: 219313
* [ELF][AllArchs] Fix includesShankar Easwaran2014-10-085-12/+12
| | | | llvm-svn: 219278
* Update for llm api change.Rafael Espindola2014-07-052-5/+6
| | | | llvm-svn: 212372
* More prefixing of error_code.Rafael Espindola2014-06-127-22/+22
| | | | llvm-svn: 210831
* Move Simple.h and Alias.h to include/Core.Rui Ueyama2014-06-111-1/+1
| | | | | | | | Because the files in Core actually depend on these files. Differential Revision: http://reviews.llvm.org/D4000 llvm-svn: 210710
* Initial set of MakefilesIain Sandoe2014-06-041-0/+16
| | | | | | | | This provides support for the autoconfing & make build style. The format, style and implementation follows that used within the llvm and clang projects. TODO: implement out-of-source documentation builds. llvm-svn: 210177
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-315-8/+8
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209948
* [ELF] Add "override" and remove "virtual".Rui Ueyama2014-03-284-19/+20
| | | | llvm-svn: 205056
* [ELF] Remove unused fields (linking context references).Simon Atanasyan2014-03-193-8/+5
| | | | llvm-svn: 204222
* [ELF] Fix MSVC warning on conversion from enum to bool.Rui Ueyama2014-03-121-2/+1
| | | | | | | This function returns a boolean value, so returning STT_COMMON does not make sense. llvm-svn: 203731
* Remove extra space.Rui Ueyama2014-03-081-1/+1
| | | | llvm-svn: 203331
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-062-13/+13
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [C++11] Switch from LLVM_FINAL to just "final" now that all of LLVM isChandler Carruth2014-03-024-5/+5
| | | | | | requiring MSVC 2012 or newer. llvm-svn: 202626
* [Hexagon] Rename the header file.Shankar Easwaran2014-02-272-5/+5
| | | | | | | | This is to accomodate future changes for newer revisions of the DSP. No change in functionality. llvm-svn: 202350
* [ELF] Fix comments.Shankar Easwaran2014-01-273-6/+3
| | | | | | | | | The comments in the files that described the file name as part of each file header ran over 80 columns, which clang-format split over multiple lines. This commit fixes to make them appear properly. llvm-svn: 200181
* [ELF] Make changes to all the targets supported currentlyShankar Easwaran2014-01-279-100/+314
| | | | | | | | X86_64,X86,PPC,Hexagon,Mips No change in functionality. llvm-svn: 200177
* [ELF] Add Target specific Readers.Shankar Easwaran2014-01-275-66/+302
| | | | | | No change in functionality. llvm-svn: 200175
* [ELF] Rename File.h to ELFFile.h to avoid confusion.Shankar Easwaran2014-01-261-1/+1
| | | | | | No change in functionality. llvm-svn: 200166
* The return value of createInternalFiles is unused, so remove it.Joey Gouly2013-12-312-3/+2
| | | | llvm-svn: 198266
* Run clang-format on r197727.Rui Ueyama2013-12-203-11/+9
| | | | llvm-svn: 197788
* [lld] fix unused variable warningsNick Kledzik2013-12-191-2/+1
| | | | llvm-svn: 197737
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-196-179/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes are in: include/lld/Core/Reference.h include/lld/ReaderWriter/Reader.h Everything else is details to support the main change. 1) Registration based Readers Previously, lld had a tangled interdependency with all the Readers. It would have been impossible to make a streamlined linker (say for a JIT) which just supported one file format and one architecture (no yaml, no archives, etc). The old model also required a LinkingContext to read an object file, which would have made .o inspection tools awkward. The new model is that there is a global Registry object. You programmatically register the Readers you want with the registry object. Whenever you need to read/parse a file, you ask the registry to do it, and the registry tries each registered reader. For ease of use with the existing lld code base, there is one Registry object inside the LinkingContext object. 2) Changing kind value to be a tuple Beside Readers, the registry also keeps track of the mapping for Reference Kind values to and from strings. Along with that, this patch also fixes an ambiguity with the previous Reference::Kind values. The problem was that we wanted to reuse existing relocation type values as Reference::Kind values. But then how can the YAML write know how to convert a value to a string? The fix is to change the 32-bit Reference::Kind into a tuple with an 8-bit namespace (e.g. ELF, COFFF, etc), an 8-bit architecture (e.g. x86_64, PowerPC, etc), and a 16-bit value. This tuple system allows conversion to and from strings with no ambiguities. llvm-svn: 197727
* Make anonymous namespace as small as possible.Rui Ueyama2013-12-101-32/+30
| | | | | | Use of static is recommended by the style guide. llvm-svn: 196877
* Revert "Remove makeArrayRef() calls."Rui Ueyama2013-12-101-5/+7
| | | | | | | This reverts commit r196475 because it made the build to fail with GCC 4.7/4.8/4.9. Reported by Mikael Lyngvig. llvm-svn: 196853
* Remove makeArrayRef() calls.Rui Ueyama2013-12-051-7/+5
| | | | | | | Because ArrayRef has implicit conversion from C arrays, we don't need makeArrayRef. llvm-svn: 196475
* Use makeArrayRef to construct ArrayRefs from C arrays.Rui Ueyama2013-12-051-6/+7
| | | | llvm-svn: 196465
* Fix "doesnot", "endsup" typos and "lets" grammar issuesAlp Toker2013-12-021-1/+1
| | | | llvm-svn: 196056
* Fix include guards.Rui Ueyama2013-11-156-16/+16
| | | | llvm-svn: 194776
* Replace ErrorOr<void> with error_code.Rafael Espindola2013-11-053-4/+4
| | | | | | It was never transporting any value in addition to the error_code. llvm-svn: 194028
* [PassManager] add ReaderWriter{Native,YAML} to the Driver.Shankar Easwaran2013-10-292-9/+9
| | | | | | | | | | | | | Enable this for the following flavors a) core b) gnu c) darwin Its disabled for the flavor PECOFF. Convenient markers are added with FIXME comments in the Driver that would be removed and code removed from each flavor. llvm-svn: 193585
* Revert "r193300 - [PassManager] add ReaderWriter{Native, YAML} to the Driver"Rui Ueyama2013-10-241-7/+7
| | | | | | | The patch have completely broken COFF port and disabled many tests. This also reverts r193302 (comment fix). llvm-svn: 193362
* [PassManager] add ReaderWriter{Native,YAML} to the Driver.Shankar Easwaran2013-10-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable tests to be run with REQUIRES: disable. Note disable is not added to the config by the test runner Mkaefiles, so essentially disables the test. Code changes would be required to fix these tests :- test/darwin/hello-world.objtxt test/elf/check.test test/elf/phdr.test test/elf/ppc.test test/elf/undef-from-main-dso.test test/elf/X86_64/note-sections-ro_plus_rw.test test/pecoff/alignment.test test/pecoff/base-reloc.test test/pecoff/bss-section.test test/pecoff/drectve.test test/pecoff/dynamic.test test/pecoff/dynamicbase.test test/pecoff/entry.test test/pecoff/hello.test test/pecoff/imagebase.test test/pecoff/importlib.test test/pecoff/lib.test test/pecoff/multi.test test/pecoff/reloc.test test/pecoff/weak-external.test llvm-svn: 193300
OpenPOWER on IntegriCloud