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
Found that having a method to check the strucutre of the followon graph makes
it easy to debug file readers. The method checks if there's no wrong edge in
followOnNexts and followOnRoots. It is called only when debuggging is enabled
for LayoutPass.
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D922
llvm-svn: 183553
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
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
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
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
DEBUG_TYPE is already defined at the beginning of this file. We don't
want to have two different debug flags for a single pass.
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D845
llvm-svn: 182543
Summary: "W" bit value was not consistent in ContentPermissions enum. It should always be 2.
Reviewers: kledzik
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D810
llvm-svn: 182515
be laid out by their ordinal overrides first, there was a bug that two atoms may
get the same override index due to which atoms were not ordered properly. This
commit fixes the problem.
Now the atoms are ordered by
- Section Position hints
- Atom override (Using layout-after/layout-before/in-group)
- Content Permissions
- Content Type
- File Ordinal
This also fixes the problem of running c++ static executables that
was broken by an earlier patch.
llvm-svn: 182494
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
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
Summary:
Split buildFollowOnTable to small functions to improve
code readability and remove code duplication. No change
in functionality.
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D790
llvm-svn: 181749