| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The result of sizeof(SymbolTable<ELFT>::SymbolEntry) in DynamicSymbolTable
<ELFT>::write() was different from the same expression in RelocationTable
<ELFT>::write(), although the same template parameters were passed. They were
40 and 32, respectively. As a result, the same vector was treated as a
vector of 40 byte values in some places and a vector of 32 values in other
places. That caused an weird issue, resulting in collapse of the rela.dyn
section.
I suspect that this is a padding size calculation bug in MSVC 2012, but I
may be wrong. Reordering the fields to eliminate padding seems to fix the
issue.
llvm-svn: 194349
|
|
|
|
| |
llvm-svn: 194322
|
|
|
|
| |
llvm-svn: 194305
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 194299
|
|
|
|
| |
llvm-svn: 194290
|
|
|
|
| |
llvm-svn: 194278
|
|
|
|
|
|
| |
CMake files
llvm-svn: 194177
|
|
|
|
| |
llvm-svn: 194172
|
|
|
|
| |
llvm-svn: 194171
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 194166
|
|
|
|
|
|
|
|
| |
These fields are for /align option. Section alignment can be set per-section
basis with /section option too. In order to avoid name conflicts, rename the
existing identifiers to become more specific. No functionality change.
llvm-svn: 194160
|
|
|
|
|
|
|
|
|
|
|
| |
/section command line option is to set/reset attributes of the Characteristics
field in the section header. You can set non-default values with this option.
You can make .data section executable with this, for example.
This patch implements the parser of the command line option. The code to use
the parsed values will be committed in a separate patch.
llvm-svn: 194133
|
|
|
|
|
|
|
| |
I'm not sure if it is really an alias for /nodefaultlib, but I can say that
they are at least similar. Making it an alias would be better than ignoring it.
llvm-svn: 194131
|
|
|
|
| |
llvm-svn: 194130
|
|
|
|
|
|
|
|
| |
/defaultlib options can be specified implicitly via the .drectve section, and
it's pretty common that multiple object files add the same library, such as
user32.lib, to the input. We shouldn't add the same library multiple times.
llvm-svn: 194129
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
msvcrt.lib contains "/disallowlib" command line option in its .drectve section.
I couldn't spot any documentation for the option. Ignore it for now so that we
can link the library without error.
llvm-svn: 194114
|
|
|
|
|
|
| |
Errors in .drectve section were silently ignored. This patch fixes the issue.
llvm-svn: 194110
|
|
|
|
| |
llvm-svn: 194089
|
|
|
|
| |
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: 193882
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 193797
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 193712
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intended for debugging and diagnostic output), just inspect the spelling
to check for specific prefixes in drectve section flags.
In addition to being significantly cheaper and not relying on
a debugging interface, this also avoids creating a temporary string and
binding it to StringRef variable. We then went on to access it after the
memory had been deallocated.
This bug too was caught by ASan. I love ASan so much. =]
llvm-svn: 193487
|
|
|
|
| |
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
|