summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* Add -help option to Darwin Driver. Use grouping in Options table to better ↵Nick Kledzik2013-07-191-0/+6
| | | | | | format help output llvm-svn: 186640
* Update for llvm API change.Rafael Espindola2013-07-161-1/+1
| | | | llvm-svn: 186450
* [WinLink] Add /LargeAddressAware command line option.Rui Ueyama2013-07-161-2/+5
| | | | llvm-svn: 186428
* [PECOFF][Writer] Replace magic numbers with sizeof().Rui Ueyama2013-07-161-7/+13
| | | | | | | | | | | | This is a follow up patch for r186336. Reviewers: LegalizeAdulthood CC: silvas, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1144 llvm-svn: 186384
* [PECOFF][Writer] Use defined constants instead of magic numbers.Rui Ueyama2013-07-161-2/+4
| | | | llvm-svn: 186382
* [PECOFF] Add default argument to addDir32NBReloc() as the default value 0 is ↵Rui Ueyama2013-07-161-4/+4
| | | | | | reasonable. llvm-svn: 186368
* [PECOFF][Writer] Follow up patch for r186336.Rui Ueyama2013-07-151-3/+3
| | | | | | | - Make a const reference instead of copying an object - Fix a comment llvm-svn: 186355
* [PECOFF][Writer] s/dyn_cast/cast/ where we don't expect null return value.Rui Ueyama2013-07-151-3/+3
| | | | llvm-svn: 186353
* [PECOFF][Writer] Refactoring: Move private methods below public ones.Rui Ueyama2013-07-151-40/+39
| | | | llvm-svn: 186352
* [PECOFF] Fix comment.Rui Ueyama2013-07-151-3/+3
| | | | llvm-svn: 186346
* [PECOFF][Writer] Emit .reloc section.Rui Ueyama2013-07-151-48/+203
| | | | | | | | | | | | | Emit .reloc section. This is the first step to support DLL creation. The executable doesn't need .reloc section, but the DLL does. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1126 llvm-svn: 186336
* [PECOFF] Support linking against DLL.Rui Ueyama2013-07-115-51/+398
| | | | | | | | | | | | | | | This patch adds a new pass, IdataPass, to transform shared atom references to real references and to construct the .idata section data. With this patch lld can produce a working Hello World program by linking it against kernel32.dll and user32.dll. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1096 llvm-svn: 186071
* [PECOFF][Writer] Fixed a bug that an empty section is emit to the section ↵Rui Ueyama2013-07-111-35/+33
| | | | | | header. llvm-svn: 186066
* [PECOFF][Writer] Compute the size of a chunk each time it's added rather ↵Rui Ueyama2013-07-091-42/+34
| | | | | | | | | | | | | | | than all at once. Contents of ".reloc" section depends on the addresses of other sections, so the section cannot be created until all the other sections are created and get their memory addresses (RVAs). That means that computation of section size needs to be at least two pass. Techynically there's no reason to compute it all at once, but instead we can compute the address of a section as added to the output file. Doing so helps us to create ".reloc" section. llvm-svn: 185902
* Remove redundant #include.Rui Ueyama2013-07-081-1/+0
| | | | llvm-svn: 185803
* [PECOFF][Writer] Fix SizeOfImage header. It should include the first ↵Rui Ueyama2013-07-031-6/+4
| | | | | | unmapped page. llvm-svn: 185534
* [PECOFF][Writer] Separate AtomChunk from SectionChunk.Rui Ueyama2013-07-031-15/+31
| | | | | | | | | | | | The optional data directory header contains addresses to some atoms such as the import address table in data section. Such fields can naturally be set by relocation if we make the optional data driectory as an atom. Currently we assume that atoms are always in a section, so we can't create a file header with atoms. This patch separates section chunk from atom chunk, to allow atom-based file header. llvm-svn: 185521
* Add "explicit" to ctors where appropriate.Rui Ueyama2013-07-033-5/+6
| | | | llvm-svn: 185517
* [PECOFF] Handle hint field in Hint/Name table in the import library.Rui Ueyama2013-07-032-19/+31
| | | | | | | | | | A hint is an index of the export pointer table in a DLL, at which PE/COFF loader starts looking for a symbol name. The import library comes with hints and symbol pairs, and as long as hints are in sync with the actual symbol table in DLL, the symbols will be resolved quickly. So, we shouldn't ignore hints but propagate them to an output. llvm-svn: 185516
* [PECOFF][Writer] Simplifies the COFFBaseDefinedAtom ctor by defining a new ↵Rui Ueyama2013-07-032-27/+29
| | | | | | class. llvm-svn: 185515
* [PECOFF][Writer] Set SizeOfInitializedData file header.Rui Ueyama2013-07-011-0/+9
| | | | llvm-svn: 185310
* [PECOFF][Writer] Add setter methods that sets the import address table ↵Rui Ueyama2013-07-011-2/+18
| | | | | | location to file header. llvm-svn: 185309
* [PECOFF][Writer] Do not emit the empty section as Windows loader rejects ↵Rui Ueyama2013-07-011-1/+10
| | | | | | such executable. llvm-svn: 185308
* [PECOFF][Writer] Amend the comment about DLL linking.Rui Ueyama2013-07-011-26/+25
| | | | llvm-svn: 185307
* [PECOFF][Writer] Fix buildbot failure on x86_64-win7.Rui Ueyama2013-06-301-2/+9
| | | | llvm-svn: 185285
* [PECOFF][Reader] Create a jump table for functions exported by DLL.Rui Ueyama2013-06-303-37/+136
| | | | llvm-svn: 185283
* Move a function into assert() so that GCC won't complain that theRui Ueyama2013-06-291-6/+5
| | | | | | function is not used in release build. llvm-svn: 185248
* Remove extra ';'Rui Ueyama2013-06-291-1/+1
| | | | llvm-svn: 185247
* [PECOFF][Writer] Fix wrong section header.Rui Ueyama2013-06-281-4/+7
| | | | llvm-svn: 185205
* [PECOFF][Writer] Remove duplicated code by moving it to parent class.Rui Ueyama2013-06-281-104/+88
| | | | llvm-svn: 185200
* [PECOFF][Writer] Define COFFBaseDefinedAtom as the base class of COFF ↵Rui Ueyama2013-06-281-53/+110
| | | | | | | | | | | | | defined atoms. In order to support linking against DLL, the linker needs to create defined atoms for jump tables and etc. Because such atoms are not read from a file, they lack some information such as an ordinal. With this patch, COFFDefinedAtom is split into two classes; one is the base class of all COFF defined atoms, and another is a concrete class for atoms read from file. More classes inheriting COFFBaseDefinedAtom will be added for jump tables and etc. llvm-svn: 185195
* Add include guard.Rui Ueyama2013-06-281-0/+5
| | | | llvm-svn: 185134
* [PECOFF][Writer] Support DIR32NB and REL32 relocation types.Rui Ueyama2013-06-281-3/+18
| | | | llvm-svn: 185133
* [PECOFF][Writer] Fix a bug that the contents of .data and .rdata were swapped.Rui Ueyama2013-06-281-3/+2
| | | | llvm-svn: 185130
* [PECOFF][Writer] Skip ".debug$S" section in the input object file.Rui Ueyama2013-06-281-0/+7
| | | | llvm-svn: 185129
* [PECOFF][Writer] Use a constant instead of a magic number.Rui Ueyama2013-06-281-2/+2
| | | | llvm-svn: 185128
* [PECOFF][Writer] Templatize connectAtomsWithLayoutEdge()Rui Ueyama2013-06-283-51/+38
| | | | | | | Templatize connectAtomsWithLayoutEdge() so that it can handle other types of defined atoms. llvm-svn: 185125
* [PECOFF][Writer] Fix DLLCharacteristic flag in image header.Rui Ueyama2013-06-271-0/+6
| | | | llvm-svn: 185102
* [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
* [PECOFF] Moves a utility function to Atoms.cpp to remove duplicate code.Rui Ueyama2013-06-224-31/+23
| | | | llvm-svn: 184653
* Fix unused field warning.Rui Ueyama2013-06-221-21/+10
| | | | llvm-svn: 184651
* [PECOFF] Removed unnecessary namespace qualifier.Rui Ueyama2013-06-222-20/+20
| | | | llvm-svn: 184649
* Removed unnecessary "class" keyword.Rui Ueyama2013-06-214-33/+36
| | | | llvm-svn: 184589
* Removed unnecessary "class" keyword.Rui Ueyama2013-06-211-3/+3
| | | | llvm-svn: 184585
* [PECOFF] Add a pass to ensure the correct ordering of grouped sections.Rui Ueyama2013-06-196-31/+185
| | | | | | | | | | Reviewers: shankarke CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D998 llvm-svn: 184327
* [ELF] add -u/--undefined option, to define undefined symbolsShankar Easwaran2013-06-193-17/+39
| | | | llvm-svn: 184266
* [PECOFF] Extract atom definitions as Atoms.h so that we can use them in ↵Rui Ueyama2013-06-172-222/+202
| | | | | | | | | | | | | | | other files. Extract atom definitions as Atoms.h so that we can use them in other files. Also applied clang-format to Atoms.h. Reviewers: shankarke CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D995 llvm-svn: 184124
* [PECOFF] Implement the reader for the import library.Rui Ueyama2013-06-174-1/+188
| | | | | | | | | | | | | This is the first patch toward full DLL support. With this patch, lld can read .lib file for a DLL. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D987 llvm-svn: 184101
* [PECOFF] Connect defined atoms with layout before/after edges.Rui Ueyama2013-06-173-0/+50
| | | | | | | | | | Reviewers: shankarke CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D989 llvm-svn: 184085
* [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
OpenPOWER on IntegriCloud