summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF
Commit message (Collapse)AuthorAgeFilesLines
...
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-241-1/+1
| | | | | | | | | | | | | This patch inverts the return value of these functions, so that they return "true" on success and "false" on failure. The meaning of boolean return value was mixed in LLD; for example, InputGraph::validate() returns true on success. With this patch they'll become consistent. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1748 llvm-svn: 191341
* [lld][ELF] Remove invalid commentShankar Easwaran2013-09-231-3/+1
| | | | llvm-svn: 191207
* [lld][LinkingContext][ELF] Allow different output file types.Shankar Easwaran2013-09-234-9/+19
| | | | | | | | | | This adds an option --output-filetype that can be set to either YAML/Native(case insensitive). The linker would create the outputs associated with the type specified by the user. Changes all the tests to use the new option. llvm-svn: 191183
* [lld][ELF][Hexagon] Cleanup unused dataShankar Easwaran2013-09-192-3551/+595
| | | | | | | | Cleanup structure members that are not being used. Also clang-format it. llvm-svn: 191038
* [lld][ELF] Support non alloc sections in the Writer.Shankar Easwaran2013-09-194-45/+94
| | | | | | | | | This also makes it support debugging executables built with lld. Initial patch done by Bigcheese. This is only a revised patch to have the functionality in the Writer. llvm-svn: 191032
* [lld][ELF] Assign sectionChoice properly to ELF atomsShankar Easwaran2013-09-173-36/+54
| | | | | | | | | This sets the sectionChoice property for DefinedAtoms. The output section name is derived by the property of the atom. This also decreases native file size. Adds a test. llvm-svn: 190840
* Output soname.Joerg Sonnenberger2013-09-141-0/+7
| | | | llvm-svn: 190758
* If .bss doesn't exist, set _end/end based on .data.Joerg Sonnenberger2013-09-141-0/+4
| | | | llvm-svn: 190753
* Add _end symbol for dynamic libraries. At least brk/sbrk in libc onJoerg Sonnenberger2013-09-141-4/+29
| | | | | | NetBSD need it. llvm-svn: 190752
* [lld][ELF] Handle multiple weak symbolsShankar Easwaran2013-09-131-7/+6
| | | | | | | | | | | | This handles multiple weak symbols which appear back to back. This fix is needed which otherwise will lead to symbols getting initialized to arbitrary values. There was a constructor/destructor test that really triggered this to be fixed on X86_64. Adds a test. llvm-svn: 190658
* [lld][ELF] Fix vaddr of the first sectionShankar Easwaran2013-09-124-2/+7
| | | | | | The first section in the output was not aligned to the alignment of the section. llvm-svn: 190610
* [lld][ELF] Fix the readonly section order.Shankar Easwaran2013-09-121-0/+4
| | | | | | | This associates rodata and sections which just have the SHF_ALLOC flag to be set to typeConstant. llvm-svn: 190609
* Handle _DYNAMIC correctly in the x86_64 backend.Joerg Sonnenberger2013-09-092-0/+27
| | | | llvm-svn: 190302
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-072-14/+14
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* [lld][ELF] Change the order of the writable note sectionShankar Easwaran2013-09-051-1/+1
| | | | | | | Writable note sections if they exist should not appear before text they belong in the data segment llvm-svn: 190024
* [lld][ELF] Differentiate between Note sections(RW/RO)Shankar Easwaran2013-09-043-15/+40
| | | | | | | | | | It looks like there is a possibility of seeing RO/RW note sections and we would need to create an appropriate RO/RW segment associated with them. Adds a test too. llvm-svn: 189907
* [lld][ELF] Emit note sectionsShankar Easwaran2013-09-043-0/+14
| | | | | | | | Emit note sections if the input contains a note section. Also emit a note segment. llvm-svn: 189896
* Start a TODO list for the ELF backend.Joerg Sonnenberger2013-09-041-0/+17
| | | | llvm-svn: 189890
* [lld] Remove bitfield for boolean membersShankar Easwaran2013-09-031-1/+1
| | | | llvm-svn: 189876
* [lld][ELF][X86_64] Fix alignment of init_array/fini_array sectionsShankar Easwaran2013-09-031-1/+4
| | | | llvm-svn: 189874
* [lld][ELF] Change the InitFini atom type from Stub to DataShankar Easwaran2013-09-031-1/+1
| | | | llvm-svn: 189873
* [lld][ELF][Hexagon] add Init/Fini option for hexagonShankar Easwaran2013-09-032-0/+88
| | | | | | This adds init/fini support for Hexagon. llvm-svn: 189872
* [lld] handle the case of errors from createLinkerInputShankar Easwaran2013-09-031-2/+5
| | | | | | | | | | This changes the interface of createLinkerInput to use ErrorOr, so that errors from the linker can be captured. Also adds a convenience function for error strings to be returned from file nodes. llvm-svn: 189871
* Finish -rpath implementation to actually create the DT_RPATH entries.Joerg Sonnenberger2013-09-031-0/+9
| | | | llvm-svn: 189847
* Add support for --sysroot.Joerg Sonnenberger2013-09-031-3/+14
| | | | llvm-svn: 189826
* A weak reference to a symbol that is only weakly referenced inJoerg Sonnenberger2013-09-031-1/+3
| | | | | | dependencies should remain weak, not get promoted to undef or dropped. llvm-svn: 189793
* [lld][ELF] Add Init/Fini supportShankar Easwaran2013-08-313-0/+113
| | | | | | | | This creates .init_array/.fini_array section for X86_64 ELF targets and executes init/fini functions specified by the -init/-fini options respectively. llvm-svn: 189719
* [lld][LinkingContext] Atoms created from command line options should be ↵Shankar Easwaran2013-08-317-123/+109
| | | | | | | | | | | | available in YAML This adds an API to the LinkingContext for flavors to add Internal files containing atoms that need to appear in the YAML output as well, when -emit-yaml switch is used. Flavors can add more internal files for other options that are needed. llvm-svn: 189718
* Rename ti -> ctx.Rui Ueyama2013-08-274-16/+16
| | | | | | | This should have been done in r187823 when I renamed LinkingContext from TargetInfo. I missed a few files. llvm-svn: 189298
* [lld][ELF] Cleanup ELF writing, No change in functionalityShankar Easwaran2013-08-269-117/+85
| | | | | | | | | | The cleanup includes :- * Rename ambiguous Header class to ELFHeader * Convert Chunk contentype and kind to be a enumerated class * Remove functions that are not being used, avoids future confusion llvm-svn: 189209
* [lld][ELF] process fini_array sectionsShankar Easwaran2013-08-253-1/+6
| | | | | | | | This change processes fini_array section in addition to processing init_array sections. This also makes functions registered at compile time for initialization and finalization to be run during execution llvm-svn: 189196
* [lld][ELF] Dont ignore zero sized sections.Shankar Easwaran2013-08-231-3/+1
| | | | | | | | There may be relocations that may be pointing to the section even if the section sizes are 0. We shouldnot ignore them for that regard. llvm-svn: 189139
* [lld][ELF][Cleanup] Section associated with the relocation traversedShankar Easwaran2013-08-231-10/+6
| | | | | | | There is no change in functionality, this uses the defined way to access the relocation section that belongs to a particular section. llvm-svn: 189138
* [lld][ELF] Rename typeTLV content type for ELFShankar Easwaran2013-08-233-12/+12
| | | | | | | | | | | typeTLV content type is used by Darwin to represent thread local storage. A new contentType has to be made to represent ELF thread local storage data. These have been set to - typeThreadZeroFill (represents TBSS storage) - typeThreadData (represents TDATA storage) llvm-svn: 189137
* [lld] handle typeZeroFill atoms in ELF/Native/YAMLShankar Easwaran2013-08-233-5/+9
| | | | | | | | | | | | | BSS atoms dont take any file space in the Input file. They are associated with a contentType(typeZeroFill). Similiar zero fill types also exist which have the same meaning in terms of occupying file space in the Input. These atoms have to be handled seperately when writing to the lld's intermediate file or the lld test infrastructure. Also adds a test. llvm-svn: 189136
* [lld][Hexagon] Enable Hexagon sdata sorting testShankar Easwaran2013-08-221-1/+8
| | | | llvm-svn: 188981
* remove trailing whitespaceShankar Easwaran2013-08-222-5/+5
| | | | llvm-svn: 188965
* add InputGraph functionalityShankar Easwaran2013-08-211-15/+6
| | | | llvm-svn: 188958
* Update to llvm changes.Michael J. Spencer2013-08-084-152/+263
| | | | llvm-svn: 188021
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-0652-694/+621
| | | | | | | | | Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
* [lld] rename member variable name.Shankar Easwaran2013-06-241-1/+1
| | | | | | | | | | This renames variable name to reflect initial undefined symbols that are defined by the linker -u option. This doesnot change any functionality in lld, and updates code to reflect Nick's comment. llvm-svn: 184682
* Removed unnecessary "class" keyword.Rui Ueyama2013-06-211-1/+1
| | | | llvm-svn: 184589
* [ELF] add -u/--undefined option, to define undefined symbolsShankar Easwaran2013-06-193-17/+39
| | | | llvm-svn: 184266
* [ELF] Add more sections to the default section map.Shankar Easwaran2013-06-171-0/+8
| | | | | | | | | | | | | This change adds functionality to add more sections like .gcc_except_table, .data.rel.local, .data.rel.ro into the default section map, so that they are all merged into appropriate output sections. This also makes c++ static binaries comparable to what you get with the default linker. Adds a test for testing the functionality. llvm-svn: 184071
* [lld] Move AtomLayout from ELF to ReaderWriter so that it can be used by ↵Rui Ueyama2013-06-1613-46/+37
| | | | | | | | | | | | non-ELF writers. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D977 llvm-svn: 184061
* Fix typo in comment. Found by -Wdocumentation.Benjamin Kramer2013-06-161-2/+2
| | | | llvm-svn: 184058
* [ELF] add NMAGIC/OMAGIC supportShankar Easwaran2013-06-167-18/+144
| | | | llvm-svn: 184055
* [ARM] Remove isThumb() as it's not used and it's not in the right place.Rui Ueyama2013-06-131-6/+0
| | | | | | | | | | | | | | Architecture specific code should reside in architecture specific directory not in Atom. Looks like there are no efforts being made at this moment to support ARM, so let's remove it for now. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D959 llvm-svn: 183877
* [ELF] Remove unused parameter from ELFReference c'tor.Rui Ueyama2013-06-122-10/+15
| | | | | | | | | | Reviewers: shankarke CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D961 llvm-svn: 183850
* [ELF][X86_64] Create GOT entries for external TLS symbols properly without ↵Shankar Easwaran2013-06-121-3/+2
| | | | | | Segfaults. llvm-svn: 183817
OpenPOWER on IntegriCloud