- Sep 23, 2013
-
-
Rui Ueyama authored
llvm-svn: 191218
-
Rui Ueyama authored
llvm-svn: 191217
-
Ron Ofir authored
Summary: This patch changes WritePECOFF to calculate the value of the SizeOfHeaders PE header field instead of just using 512. Reviewers: rui314, ruiu Reviewed By: ruiu CC: llvm-commits, ruiu Differential Revision: http://llvm-reviews.chandlerc.com/D1708 llvm-svn: 191212
-
Shankar Easwaran authored
llvm-svn: 191207
-
Shankar Easwaran authored
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
-
- Sep 20, 2013
-
-
Ron Ofir authored
llvm-svn: 191079
-
Rui Ueyama authored
GNU LD driver only understood no_such_file_or_directory error and was showing just "Unknown Error" for any other type of error. With this patch, the driver now prints file name and error message string by default. llvm-svn: 191070
-
Rui Ueyama authored
llvm-svn: 191069
-
Rui Ueyama authored
/incremental is an option to enable incremental linking. We will eventually want to implement the feature for better performance, but in the meantime, we want to just ignore the option so that the linker does not output unknown option error when it sees /incremental option. llvm-svn: 191063
-
Rui Ueyama authored
llvm-svn: 191061
-
Rui Ueyama authored
If a subclass does not override the member function, the superclass's method takes care of string conversion of "file not found" error. This is a reasonable default behavior. Subclasses are still able to override to customize error messages. llvm-svn: 191058
-
Rui Ueyama authored
llvm-svn: 191054
-
Rui Ueyama authored
/errorReport is a command line option to let the linker to report internal linker error information to Microsoft. For LLD that option doesn't make any sense, so it just ignores the option. llvm-svn: 191044
-
- Sep 19, 2013
-
-
Shankar Easwaran authored
Cleanup structure members that are not being used. Also clang-format it. llvm-svn: 191038
-
Shankar Easwaran authored
llvm-svn: 191033
-
Shankar Easwaran authored
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
-
Rui Ueyama authored
llvm-svn: 190986
-
Rui Ueyama authored
Test is coming after submitting http://llvm-reviews.chandlerc.com/D1719. llvm-svn: 190983
-
- Sep 18, 2013
-
-
Rui Ueyama authored
Base relocation block should be aligned on a 32-bit boundary. While the PECOFF spec mentions only aligning the blocks, and not padding them, link.exe seems to add an extra IMAGE_REL_I386_ABSOLUTE entry (just a zeroed WORD) in order to pad the blocks. Patch by Ron Ofir. llvm-svn: 190951
-
Rui Ueyama authored
llvm-svn: 190949
-
Shankar Easwaran authored
llvm-svn: 190903
-
- Sep 17, 2013
-
-
Shankar Easwaran authored
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
-
- Sep 16, 2013
-
-
Rui Ueyama authored
This patch changes lld to go through all sections while calculating the size for SizeOfCode, SizeOfInitializedData and SizeOfUninitializedData fields in the PE header, instead of using only a small set of hard-coded sections. This only really changes SizeOfInitializedData which didn't include .reloc section before this patch. Patch by Ron Ofir. llvm-svn: 190799
-
Rui Ueyama authored
This patch sets the IMAGE_SCN_MEM_DISCARDABLE characteristic to the base relocations section in order to match MS PECOFF specification. Patch by Ron Ofir. llvm-svn: 190798
-
Rui Ueyama authored
llvm-svn: 190772
-
- Sep 14, 2013
-
-
Joerg Sonnenberger authored
llvm-svn: 190758
-
Joerg Sonnenberger authored
llvm-svn: 190753
-
Joerg Sonnenberger authored
NetBSD need it. llvm-svn: 190752
-
- Sep 13, 2013
-
-
Rui Ueyama authored
This reverts r189881 because that patch caused dangling StringRefs. llvm-svn: 190725
-
Rui Ueyama authored
There was a bug that if a section has an alignment requirement and there are multiple symbols at offset 0 in the section, only the last atom at offset 0 would be aligned properly. That bug would move only the last symbol to an alignment boundary, leaving other symbols unaligned, although they should be at the same location. That caused a mysterious SEGV error of the resultant executable. With this patch, we manage all symbols at the same location properly, rather than keeping the last one. llvm-svn: 190724
-
Rui Ueyama authored
Alignment(1) does not mean that the atom should be aligned on a 1 byte boundary but on a 2^1 boundary. So, atoms without any specific alignment requirements should have Alignment(0). llvm-svn: 190723
-
Joerg Sonnenberger authored
llvm-svn: 190714
-
Shankar Easwaran authored
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
-
- Sep 12, 2013
-
-
Rui Ueyama authored
Used the fallback mechanism to implement COFF weak external symbols. llvm-svn: 190633
-
Shankar Easwaran authored
llvm-svn: 190629
-
Rui Ueyama authored
llvm-svn: 190628
-
Rui Ueyama authored
So that we can determine what the target architecture is. Adding this field does not mean that we are going to support non-i386 architectures soon; there are many things to do to support them, and I'm focusing on i386 now. But this is the first step toward multi architecture support. llvm-svn: 190627
-
Rui Ueyama authored
In COFF, an undefined symbol can have up to one alternative name. If a symbol is resolved by its regular name, then it's linked normally. If a symbol is not found in any input files, all references to the regular name are resolved using the alternative name. If the alternative name is not found, it's a link error. This mechanism is called "weak externals". To support this mechanism, I added a new member function fallback() to undefined atom. If an undefined atom has the second name, fallback() returns a new undefined atom that should be used instead of the original one to resolve undefines. If it does not have the second name, the function returns nullptr. Differential Revision: http://llvm-reviews.chandlerc.com/D1550 llvm-svn: 190625
-
Shankar Easwaran authored
llvm-svn: 190619
-
Shankar Easwaran authored
llvm-svn: 190612
-