summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* [lld][PECOFF] Support IMAGE_REL_I386_DIR32 relocation.Rui Ueyama2013-06-161-10/+63
| | | | | | | | | | | | | | With this patch, it can now resolve relocations in the same output file. "Hello world" program does not still work because call to the DLL routine is not supported yet. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D985 llvm-svn: 184063
* [lld] Move AtomLayout from ELF to Core so that it can be used by non-ELF ↵Rui Ueyama2013-06-161-0/+1
| | | | | | | | | | | | | | writers. Summary: I'm planning to use AtomLayout in WriterPECOFF. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D977 llvm-svn: 184062
* [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
* [WinLink] Support /nxcompat command line option.Rui Ueyama2013-06-161-4/+6
| | | | llvm-svn: 184050
* [PECOFF] Support .lib archive file.Rui Ueyama2013-06-151-3/+18
| | | | | | | | Archive file in Windows has file extension of ".lib" but the file format is in fact the same as Unix. It's an ar archive holding multiple .obj files. The existing archive reader can read .lib files. llvm-svn: 184036
* [PECOFF] Handle scope of absolute atom correctly.Rui Ueyama2013-06-151-5/+7
| | | | llvm-svn: 184035
* [PECOFF] Fix build error on Win64.Rui Ueyama2013-06-141-1/+1
| | | | llvm-svn: 183965
* [lld][PECOFF] Read relocation entries.Rui Ueyama2013-06-142-161/+463
| | | | | | | | | | | | | | | | | | | Summary: COFFReference class is defined to represent relocation information for COFFDefinedAtom, as ELFReference for ELFDefinedAtom. ReaderCOFF can now read relocation entries and create COFFReferences accordingly. I need to make WriterPECOFF to handle the relocation references created by the reader, but this patch is already big, so I think it's probably better to get it reviewed now. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D976 llvm-svn: 183964
* [PECOFF] Make readSymbolTable a const function.Rui Ueyama2013-06-131-10/+11
| | | | llvm-svn: 183887
* [ARM] Remove isThumb() as it's not used and it's not in the right place.Rui Ueyama2013-06-136-24/+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
* [PECOFF] Define constants for page size and disk sector size.Rui Ueyama2013-06-121-4/+12
| | | | llvm-svn: 183876
* [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
* [ELF] NMAGIC support : Find the BSS section to setup the virtual address of ↵Shankar Easwaran2013-06-121-9/+6
| | | | | | _end. llvm-svn: 183816
* [ELF] TBSS section has to be special cased so that it doesnot occupy memory ↵Shankar Easwaran2013-06-122-2/+15
| | | | | | space llvm-svn: 183815
* [PECOFF][Writer] Structure of pe32_header was changed.Rui Ueyama2013-06-111-8/+13
| | | | | | | | | | | | Change for http://llvm-reviews.chandlerc.com/D952 Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D953 llvm-svn: 183789
* Convert another use of sys::identifyFileType.Rafael Espindola2013-06-111-6/+6
| | | | | | No functionality change. llvm-svn: 183762
* Factor duplicated yamlReader creation.Rafael Espindola2013-06-114-6/+6
| | | | | | | | | | | The yaml reader is not specific to any file format. This patch moves it to TargetInfo and makes validate a non virtual interface so that it can be constructed from a single location. The same method will be used to create a reader for llvm bitcode files. llvm-svn: 183740
* [PECOFF] Refactoring: Split FileCOFF c'tor. No functionality change.Rui Ueyama2013-06-101-102/+123
| | | | | | | | | | | | | | | Split FileCOFF's constructor into mainly two private methods. One method is responsible to iterate over symbol tables, and other method is to atomize defined atoms. This is for readability and no changes in functionality. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D940 llvm-svn: 183708
* [PECOFF][Writer] Set required OS version numbers.Rui Ueyama2013-06-101-5/+8
| | | | llvm-svn: 183705
* [ELF] Refactor File.h.Rui Ueyama2013-06-101-211/+217
| | | | | | | | | | | | | | | - Split createAtom() in lib/ReaderWriter/ELF/File.h into small methods. - Added comments to code in other methods. No functionality changes. Reviewers: shankarke CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D921 llvm-svn: 183696
* Use the StringRef version of identifyFileType.Rafael Espindola2013-06-101-2/+1
| | | | llvm-svn: 183670
* Use early returns.Rafael Espindola2013-06-101-9/+12
| | | | | | No functionality change. llvm-svn: 183659
* [PECOFF][Driver] Add -heap command line option.Rui Ueyama2013-06-082-2/+9
| | | | llvm-svn: 183622
* [PECOFF][Driver] Add -stack command line option.Rui Ueyama2013-06-082-2/+9
| | | | llvm-svn: 183604
* Fix handling of files without a symbol table.Rafael Espindola2013-06-071-1/+5
| | | | | | | | This fixes a recent regression (r183338). Stripped elf files (like installed crtn.o for example), are not required to have a symbol table. Handle that correctly. llvm-svn: 183573
* [PECOFF][Writer] Implement the writer that can emit text section.Rui Ueyama2013-06-071-5/+361
| | | | | | | | | | | | | | lld can now output a valid Windows executable with a text section that does nothing but just returns immediately. It's not able to handle relocations, symbol tables, data sections, etc, so it still can't do anything practical, though. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D892 llvm-svn: 183478
* Update for llvm's r183337.Rafael Espindola2013-06-051-1/+1
| | | | llvm-svn: 183338
* [lld][ELF] Add parser for linker script ENTRY commandRui Ueyama2013-06-031-24/+43
| | | | | | | | | | | | | This is the parser for the ENTRY command. Note that because the parsing result is currentlyd discarded, lld can parse but just ignore the command. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D833 llvm-svn: 183141
* [lld][elf] Add --dynamic-linker option to the ELF linker.Shankar Easwaran2013-05-291-5/+5
| | | | | | | | | Users can override the default value of the dynamic linker to be set to the one that appears in the command line. The path can even be empty!. Added a test for the option. llvm-svn: 182889
* Parallel write.Michael J. Spencer2013-05-283-7/+9
| | | | llvm-svn: 182795
* [ELF] Make addressOfAtom thread safe.Michael J. Spencer2013-05-281-1/+2
| | | | | | The expression _atomToAddressMap[atom] may modify _atomToAddressMap. llvm-svn: 182793
* Instrument things.Michael J. Spencer2013-05-284-5/+24
| | | | llvm-svn: 182789
* [ELF][Reader] Kind in this context refers to File::Kind. Qualify with ↵Michael J. Spencer2013-05-281-2/+2
| | | | | | Reference::Kind. llvm-svn: 182787
* [lld][PECOFF] Add WinLinkDriver and PECOFFTargetInfo.Rui Ueyama2013-05-284-12/+79
| | | | | | | | | | | | | | Add WinLinkDriver and connect it to the existing COFF reader. Remaining parts are still stubs, so while it can now read a COFF file, it still cannot link or output PE/COFF files yet. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D865 llvm-svn: 182784
* [PECOFF] Skip section names in the symbol table because they are not atoms.Rui Ueyama2013-05-261-0/+5
| | | | llvm-svn: 182721
* Remove unreachable statement.Rui Ueyama2013-05-261-3/+0
| | | | llvm-svn: 182714
* Fix indentation.Rui Ueyama2013-05-251-2/+6
| | | | llvm-svn: 182709
* Use new version of countLeadingZeros.Michael J. Spencer2013-05-251-1/+1
| | | | llvm-svn: 182697
* [lld][ELF] Inline header files into the one file using itShankar Easwaran2013-05-214-182/+130
| | | | llvm-svn: 182427
* [lld][ELF][x86_64,hexagon] Changed dynamic atoms to live in anonymous namespaceShankar Easwaran2013-05-202-74/+71
| | | | | | | | so that their names are hidden. This addresses comments raised by Sean/Rafael. llvm-svn: 182230
* [lld][ELF][All Archs] Addend is used by dynamic relocationsShankar Easwaran2013-05-176-12/+57
| | | | | | | | | | | | | | only if they are relative. This removes the FIXME when the relocations are being emitted and checks if the relocation is relative and only then populates the addend information. I couldnt add a testcase for this as llvm-readobj lacks functionality of printing dynamic relocations. When the functionality is added, remove the commented lines from elf/ifunc.test to test functionality. llvm-svn: 182077
* [lld][ELF][X86_64] Reorganize X86_64 Target specific codeShankar Easwaran2013-05-177-206/+266
| | | | | | | | | | | This patch splits X86_64Target specific code so that the dynamic atoms and the Relocation handlers are in seperate files for easier maintenace. The files are sure to grow and this makes it easier to work with. * There is no change in functionality * llvm-svn: 182076
* [lld] Do not create a temporary pair.Rui Ueyama2013-05-161-27/+21
| | | | llvm-svn: 182033
* [lld] Fix inconsistent style and do cleanup.Rui Ueyama2013-05-161-19/+14
| | | | llvm-svn: 182031
* [lld] Fix compiler warning that shift count is too big on P64.Rui Ueyama2013-05-141-1/+1
| | | | llvm-svn: 181852
* [lld][ELF] set ordinals for mergeAtoms and fix testcaseShankar Easwaran2013-05-102-6/+9
| | | | llvm-svn: 181622
* [lld][ELF] fix build failureShankar Easwaran2013-05-071-1/+0
| | | | llvm-svn: 181325
OpenPOWER on IntegriCloud