- Nov 15, 2013
-
-
Rui Ueyama authored
We can add multiple undefined atoms having the same name to the symbol table. If such atoms are added, the symbol table compares their canBeNull attributes, and select one having a stronger constraint. If their canBeNulls are the same, the choice is arbitrary. Currently it choose the existing one. This patch changes the preference, so that the symbol table choose the new one if the new atom has a greater canBeNull or a fallback atom. This shouldn't change the behavior except the case described below. A new undefined atom may have a new fallback atom attribute. By choosing the new atom, we can update the fallback atom during Core Linking. PE/COFF actually need that. For example, _lseek is an alias for __lseek on Windows. One of an object file in OLDNAMES.LIB has an undefined atom for _lseek with the fallback to __lseek. When the linker tries to resolve _read, it supposed to read the file from OLDNAMES.LIB and use the new fallback from the file. Currently LLD cannot handle such case because duplicate undefined atoms with the same attributes are ignored. Differential Revision: http://llvm-reviews.chandlerc.com/D2161 llvm-svn: 194777
-
- Nov 14, 2013
-
-
Rui Ueyama authored
llvm-svn: 194671
-
Michael J. Spencer authored
llvm-svn: 194641
-
Rui Ueyama authored
llvm-svn: 194624
-
Rui Ueyama authored
llvm-svn: 194620
-
Rui Ueyama authored
llvm-svn: 194619
-
- Nov 13, 2013
-
-
Rui Ueyama authored
This reverts commit r194551 because it broke the buildbot. llvm-svn: 194552
-
Rui Ueyama authored
llvm-svn: 194551
-
- Nov 06, 2013
-
-
Nick Kledzik authored
llvm-svn: 194177
-
- Nov 05, 2013
-
-
Rui Ueyama authored
llvm-svn: 194037
-
Rafael Espindola authored
It was never transporting any value in addition to the error_code. llvm-svn: 194028
-
- Oct 29, 2013
-
-
Shankar Easwaran authored
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
-
- Oct 24, 2013
-
-
Rui Ueyama authored
The patch have completely broken COFF port and disabled many tests. This also reverts r193302 (comment fix). llvm-svn: 193362
-
Shankar Easwaran authored
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
-
- Oct 16, 2013
-
-
Rui Ueyama authored
Dead-strip root symbols can be undefined atoms, but should not really be nonexistent, because dead-strip root symbols should be added to initial undefined atoms at startup. Whenever you look up its name in the symbol table, some type of atom will always exist. llvm-svn: 192831
-
Rui Ueyama authored
We want to make the program to exit with non-zero exit code if there's an error during dead stripping. llvm-svn: 192771
-
- Oct 11, 2013
-
-
Rui Ueyama authored
llvm-svn: 192424
-
Rui Ueyama authored
llvm-svn: 192422
-
Rui Ueyama authored
llvm-svn: 192416
-
Rui Ueyama authored
This patch also handles errors other than no_more_files error. They were silently ignored. llvm-svn: 192415
-
- Oct 09, 2013
-
-
Shankar Easwaran authored
This change removes code in various places which was setting the File Ordinals. This is because the file ordinals are assigned by the way files are resolved. There was no other way than making the getNextFileAndOrdinal be set const and change the _nextOrdinal to mutable. There are so many places in code, that you would need to cleanup to make LinkingContext non-const! llvm-svn: 192280
-
Shankar Easwaran authored
llvm-svn: 192277
-
Shankar Easwaran authored
This associates resolveState to FileNodes. The control node derive their resolution state from the inputElements that are contained in it. This makes --start-group/--end-group to work with ELF linking. llvm-svn: 192269
-
Rui Ueyama authored
llvm-svn: 192261
-
Rui Ueyama authored
llvm-svn: 192260
-
- Oct 08, 2013
-
-
Shankar Easwaran authored
llvm-svn: 192183
-
Rui Ueyama authored
llvm-svn: 192163
-
Rui Ueyama authored
llvm-svn: 192149
-
Rui Ueyama authored
Summary: The original code with enum "_" is intended to emulate scoped enums. Now we have real scoped enums, so use it. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1852 llvm-svn: 192148
-
- Oct 07, 2013
-
-
Shankar Easwaran authored
Changes :- a) Functionality in InputGraph to insert Input elements at any position b) Functionality in the Resolver to use nextFile c) Move the functionality of assigning file ordinals to InputGraph d) Changes all inputs to MemoryBuffers e) Remove LinkerInput, InputFiles, ReaderArchive llvm-svn: 192081
-
- Sep 23, 2013
-
-
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 19, 2013
-
-
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
-
- Sep 12, 2013
-
-
Rui Ueyama authored
Used the fallback mechanism to implement COFF weak external symbols. llvm-svn: 190633
-
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
-
- Sep 08, 2013
-
-
Joerg Sonnenberger authored
attribute in LinkerInput to isWholeArchive and use that for deciding whether library archives should be expanded. Implement the -all_load option of the Darwin linker using this flag and drop the support for it in GNU mode. llvm-svn: 190275
-
- Sep 07, 2013
-
-
Joerg Sonnenberger authored
reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
-
- Sep 04, 2013
-
-
Shankar Easwaran authored
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
-
Shankar Easwaran authored
Emit note sections if the input contains a note section. Also emit a note segment. llvm-svn: 189896
-
- Sep 03, 2013
-
-
Rui Ueyama authored
llvm-svn: 189775
-
- Aug 31, 2013
-
-
Shankar Easwaran authored
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
-