- 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
-
Rui Ueyama authored
llvm-svn: 194768
-
- Nov 14, 2013
-
-
Rui Ueyama authored
Writing arguments after the redirection of input ("< somefile") seems a bit strange. Changes the order. llvm-svn: 194727
-
Rui Ueyama authored
llvm-svn: 194723
-
- Nov 13, 2013
-
-
Rui Ueyama authored
llvm-svn: 194550
-
- Nov 09, 2013
-
-
Nick Kledzik authored
llvm-svn: 194292
-
- Nov 08, 2013
-
-
Nick Kledzik authored
llvm-svn: 194280
-
Michael J. Spencer authored
llvm-svn: 194278
-
- Nov 06, 2013
-
-
Nick Kledzik authored
This patch adds support for converting normalized mach-o to and from binary mach-o. It also changes WriterMachO (which previously directly wrote a mach-o binary given a set of Atoms) to instead do it in two steps. The first step uses normalizedFromAtoms() to convert Atoms to normalized mach-o, and the second step uses writeBinary() which to generate the mach-o binary file. llvm-svn: 194167
-
Rui Ueyama authored
Errors in .drectve section were silently ignored. This patch fixes the issue. llvm-svn: 194110
-
- Nov 04, 2013
-
-
Rui Ueyama authored
llvm-svn: 194003
-
Rui Ueyama authored
llvm-svn: 193982
-
Rui Ueyama authored
This patch should fix the test when it runs on Windows, by allowing drive letter separator (colon) in the path. Now all LLD ELF tests passed on MSVC 2012 32-bit. Hooray! llvm-svn: 193978
-
Rui Ueyama authored
llvm-svn: 193974
-
- Nov 02, 2013
-
-
Rafael Espindola authored
llvm-svn: 193913
-
Rui Ueyama authored
llvm-svn: 193911
-
Rui Ueyama authored
These tests assume that the created objects are for x86_64. These tests failed on non-x86_64 environments, such as 32 bit Windows. llvm-svn: 193910
-
Rui Ueyama authored
On Windows, neither "(" nor ")" are shell special characters, so -\( is passed as-is to LLD. Because of that this test was failing on Windows. llvm-svn: 193905
-
Rui Ueyama authored
This patch adds "-target x86_64" to the command line. Without this option, a 32 bit object file would be created on 32 bit machine, resulting in test failure. llvm-svn: 193904
-
- Oct 30, 2013
-
-
Michael J. Spencer authored
llvm-svn: 193662
-
- Oct 29, 2013
-
-
Shankar Easwaran authored
llvm-svn: 193586
-
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
-
Rui Ueyama authored
__ImageBase is an absolute symbol whose address is the same as the image base address. What we did before this patch was to create __ImageBase symbol as a symbol whose *contents* (not location) is the image base address, which is clearly wrong. llvm-svn: 193565
-
- Oct 26, 2013
-
-
Shankar Easwaran authored
llvm-svn: 193483
-
Shankar Easwaran authored
llvm-svn: 193481
-
Michael J. Spencer authored
llvm-svn: 193451
-
- Oct 25, 2013
-
-
Rui Ueyama authored
llvm-svn: 193385
-
Michael J. Spencer authored
This renames the GOTPLTPass to RelocationPass and refactors it to better represent the different types of relocations. llvm-svn: 193379
-
Rui Ueyama authored
llvm-svn: 193375
-
- Oct 24, 2013
-
-
Michael J. Spencer authored
llvm-svn: 193369
-
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 23, 2013
-
-
Rui Ueyama authored
Because it depends on "-mllvm -debug" flag, the test fails in Release build. llvm-svn: 193271
-
Rui Ueyama authored
llvm-svn: 193259
-
Rui Ueyama authored
llvm-svn: 193207
-
- Oct 22, 2013
-
-
Rui Ueyama authored
llvm-svn: 193121
-
- Oct 19, 2013
-
-
Rui Ueyama authored
This patch fixes a bug in r190608. The results of a comparison function passed to std::sort must be transitive, which is, if a < b and b < c, and if a != b, a < c must be also true. CompareAtoms::compare did not actually guarantee the transitivity. As a result the sort results were sometimes just wrong. Consider there are three atoms, X, Y, and Z, whose file ordinals are 1, 2, 3, respectively. Z has a property "layout-after X". In this case, all the following conditionals become true: X < Y because X's ordinal is less than Y's Y < Z because Y's ordinal is less than Z's Z < X because of the layout-after relationship This is not of course transitive. The reason why this happened is because we used follow-on relationships for comparison if two atoms falls in the same follow-on chain, but we used each atom's properties if they did not. This patch fixes the issue by using follow-on root atoms for comparison to get consistent results. Differential Revision: http://llvm-reviews.chandlerc.com/D1980 llvm-svn: 193029
-
Rui Ueyama authored
We should dead-strip atoms only if they are created for COMDAT symbols. If we remove non-COMDAT atoms from a binary, it will no longer be guaranteed that the binary will work correctly. In COFF, you can manipulate the order of section contents in the resulting binary by section name. For example, if you have four sections .data$unique_prefix_{a,b,c,d}, it's guaranteed that the contents of A, B, C, and D will be consecutive in the resulting .data section in that order. Thus, you can access B's and C's contents by incrementing a pointer pointing to A until it reached to D. That's why we cannot dead-strip B or C even if no one is directly referencing to them. Some object files in the standard library actually use that technique. llvm-svn: 193017
-
- Oct 18, 2013
-
-
Shankar Easwaran authored
llvm-svn: 192939
-
- 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
-