| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 194128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We wrapped the linker internal file with a virtual archive file, so that the
linker internal file was linked only when it's actually used. This was to avoid
__ImageBase being included to the resulting executable. __ImageBase used to
occupy four bytes when emitted to executable.
And then it turned out that the implementation of __ImageBase was wrong -- it
shouldn't have been a regular atom but an absolute atom. Absolute atoms point
to some memory location, but they don't occupy disk space themselves. So it
wouldn't increase executable size (except the symbol table.) That means that
it's OK to link the linker internal file unconditionally.
So this patch does that, removing the wrapper archive file. Doing this
simplifies the code.
llvm-svn: 194127
|
|
|
|
|
|
| |
Errors in .drectve section were silently ignored. This patch fixes the issue.
llvm-svn: 194110
|
|
|
|
| |
llvm-svn: 194037
|
|
|
|
|
|
| |
It was never transporting any value in addition to the error_code.
llvm-svn: 194028
|
|
|
|
|
|
| |
Patch reviewed by Shankar Easwaran.
llvm-svn: 194010
|
|
|
|
|
|
|
| |
MSVC 2012 raises an error in the lambda passed to vector::find_if, while it
seems valid code. Rewrote without high-order functions.
llvm-svn: 193975
|
|
|
|
|
|
|
|
|
|
| |
n_desc field in MachO string table was not initialized. On Unix,
test/darwin/hello-world.objtxt did not fail because I think an nlist object
is always allocated to a fresh heap initialized with zeros. On Windows,
uninitialized fields are filled with 0xCC when compiled with /GZ. Because
of that the test was failing on Windows.
llvm-svn: 193909
|
|
|
|
|
|
|
|
| |
Bugs that would be caught by this assertion would also be caught by
RoundTripYAMLPass test. We've enabled the pass for PECOFF, so we can remove
this.
llvm-svn: 193886
|
|
|
|
| |
llvm-svn: 193885
|
|
|
|
| |
llvm-svn: 193883
|
|
|
|
| |
llvm-svn: 193881
|
|
|
|
|
|
|
|
|
|
|
|
| |
The data directory in the PE/COFF header consisted of list of data directory
atoms. This patch changes it -- now there's only one data directory entry that
contains former data directories. That's easier to handle in the writer as well
as to write to/read from YAML/Native files. The main purpose of this refactoring
is to enable RoundTrip tests for PE/COFF.
There's no functionality change.
llvm-svn: 193854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r193479.
The atoms are already added to the file, so re-adding them caused the YAML
writer to write the same atoms twice. That made the YAML reader to fail with
"duplicate atom name" error.
This is not the only error we've got for RoundTripYAMLPass for PECOFF, so we
cannot enable the test yet. More fixes will come.
Differential Revision: http://llvm-reviews.chandlerc.com/D2069
llvm-svn: 193762
|
|
|
|
| |
llvm-svn: 193662
|
|
|
|
| |
llvm-svn: 193646
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
__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
|
|
|
|
|
|
|
| |
This change has no effect now, but will be needed to emit BSS atoms
to .bss section.
llvm-svn: 193556
|
|
|
|
| |
llvm-svn: 193551
|
|
|
|
| |
llvm-svn: 193482
|
|
|
|
| |
llvm-svn: 193481
|
|
|
|
| |
llvm-svn: 193480
|
|
|
|
| |
llvm-svn: 193479
|
|
|
|
| |
llvm-svn: 193478
|
|
|
|
| |
llvm-svn: 193477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On discussing this with Nick, it looks like the StubAtoms
that contain a lazyImmediate reference kind should be null
and the location needs to be fixed up later with some value
that is an offset into the __LINKEDIT segment.
The drawback is that it allows yaml files with references
that expect a target to be considered without one.
This results in bad yaml files that would need to be handled
in the YAML Reader.
Inorder to fix this, the Stub Atoms use a dummy target such
as itself.
llvm-svn: 193476
|
|
|
|
|
|
|
|
| |
/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: 193451
|
|
|
|
| |
llvm-svn: 193440
|
|
|
|
| |
llvm-svn: 193435
|
|
|
|
| |
llvm-svn: 193385
|
|
|
|
|
|
|
| |
This renames the GOTPLTPass to RelocationPass and refactors it to better
represent the different types of relocations.
llvm-svn: 193379
|
|
|
|
| |
llvm-svn: 193369
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
There is no test as currently there is no call to the NativeWriter.
Future commits will add calls to the NativeWriter.
llvm-svn: 192944
|
|
|
|
| |
llvm-svn: 192939
|
|
|
|
| |
llvm-svn: 192930
|
|
|
|
| |
llvm-svn: 192830
|
|
|
|
| |
llvm-svn: 192627
|
|
|
|
|
|
|
| |
This also reverts the LayoutPass to use std::sort as all files
have an ordinal now.
llvm-svn: 192409
|
|
|
|
| |
llvm-svn: 192401
|
|
|
|
| |
llvm-svn: 192369
|