| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
/merge:<from>=<to> option makes the linker to combine "from" section to "to"
section. This patch is to parse the option. The actual feature will be
implemented in a subsequent patch.
llvm-svn: 193454
|
|
|
|
| |
llvm-svn: 193440
|
|
|
|
| |
llvm-svn: 193385
|
|
|
|
|
|
|
| |
The patch have completely broken COFF port and disabled many tests.
This also reverts r193302 (comment fix).
llvm-svn: 193362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 193266
|
|
|
|
|
|
|
|
| |
This patch won't change LLD's behavior because it's a temporary file and
LLD does not use the file extension to determine file type. But using the
correct file extension is a good thing.
llvm-svn: 193211
|
|
|
|
|
|
|
| |
Because MSVC11 doesn't like this new C++11 feature. The last commit
broke the buildbot.
llvm-svn: 193127
|
|
|
|
| |
llvm-svn: 193122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
INT 3 (machine code 0xCC) will raise an interrupt when executed. That is better
for filling the gap than NOP because we want to stop the execution immediately
when the control reached to non-code address.
llvm-svn: 192945
|
|
|
|
| |
llvm-svn: 192930
|
|
|
|
| |
llvm-svn: 192830
|
|
|
|
| |
llvm-svn: 192401
|
|
|
|
| |
llvm-svn: 192261
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 191583
|
|
|
|
| |
llvm-svn: 191466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch inverts the return value of these functions, so that they return
"true" on success and "false" on failure. The meaning of boolean return value
was mixed in LLD; for example, InputGraph::validate() returns true on success.
With this patch they'll become consistent.
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1748
llvm-svn: 191341
|
|
|
|
| |
llvm-svn: 191276
|
|
|
|
| |
llvm-svn: 191227
|
|
|
|
| |
llvm-svn: 191224
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch changes WriterPECOFF to actually write down the address instead of ignoring it.
Also, it changes the order of adding the BaseReloc chunk as otherwise the address wasn't set yet.
I think a better way of doing it would be to change DataDirectoryAtom to create a Reference
instead of using a number, and to change IdataPass accordingly, but I'm not sure how to do that.
Reviewers: ruiu
Reviewed By: ruiu
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1743
llvm-svn: 191220
|
|
|
|
| |
llvm-svn: 191218
|
|
|
|
| |
llvm-svn: 191217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 190986
|
|
|
|
|
|
| |
Test is coming after submitting http://llvm-reviews.chandlerc.com/D1719.
llvm-svn: 190983
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 190949
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
header
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 190772
|
|
|
|
|
|
| |
This reverts r189881 because that patch caused dangling StringRefs.
llvm-svn: 190725
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Used the fallback mechanism to implement COFF weak external symbols.
llvm-svn: 190633
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Mangling scheme varies on platform, and prepending an underscore is valid only
on 32-bit x86. Added a method to mangle name to PECOFFLinkingContext and use
it to avoid hard coding mangled names.
llvm-svn: 190585
|
|
|
|
| |
llvm-svn: 190254
|
|
|
|
|
|
| |
reference. Move readFile logic into FileNode::createLinkerInput.
llvm-svn: 190253
|
|
|
|
|
|
| |
Patch by Ron Ofir.
llvm-svn: 190210
|
|
|
|
|
|
| |
Patch by Ron Ofir.
llvm-svn: 190198
|
|
|
|
|
|
| |
header.
llvm-svn: 190120
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler is allowed to add a linker option starting with -?<name> to
.drectve section. If the linker can interpret -<name>, it's processed as if
there's no question mark there. If not, such option is silently ignored.
This is a COFF's feature to allow the compiler to emit new linker options
while keeping compatibility with older linkers.
llvm-svn: 189897
|
|
|
|
|
|
| |
calls of allocateString()
llvm-svn: 189881
|
|
|
|
| |
llvm-svn: 189877
|
|
|
|
| |
llvm-svn: 189865
|
|
|
|
|
|
|
|
|
|
|
|
| |
available in YAML
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
|
|
|
|
|
|
|
|
|
| |
We added layout edges to the head atoms in grouped sections. That was wrong,
because the head atom needs to be followed by the other atoms in the *same*
section, not by the other section contents. With this patch, layout edges are
added from tail atom, which is the last atom in a section, to head atom.
llvm-svn: 189573
|