| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 197006
|
|
|
|
|
|
|
|
| |
If section size is not multiple of 512, the writer added NULL bytes at the end
of it to make it so. That is not required by the PE/COFF spec, and the MSVC's
linker does not do that too. So we don't need to do that, too.
llvm-svn: 197002
|
|
|
|
| |
llvm-svn: 196994
|
|
|
|
|
|
|
| |
The base class has a member function with the same name. We should avoid it
being shadowed.
llvm-svn: 196992
|
|
|
|
| |
llvm-svn: 196991
|
|
|
|
| |
llvm-svn: 196898
|
|
|
|
| |
llvm-svn: 196897
|
|
|
|
| |
llvm-svn: 196896
|
|
|
|
|
|
|
| |
Code to create COFF section header was scattered across many member functions
of SectionChunk. Consolidate it to a member function of SectionHeaderTableChunk.
llvm-svn: 196895
|
|
|
|
| |
llvm-svn: 196891
|
|
|
|
|
|
| |
... because they are used only in the function for relocations.
llvm-svn: 196890
|
|
|
|
| |
llvm-svn: 196884
|
|
|
|
| |
llvm-svn: 196867
|
|
|
|
|
|
|
| |
These member functions are not overriden and not intended to be, so adding
virtual does not make sense.
llvm-svn: 196866
|
|
|
|
| |
llvm-svn: 196767
|
|
|
|
| |
llvm-svn: 196762
|
|
|
|
| |
llvm-svn: 196366
|
|
|
|
|
|
| |
These relocations are used in .debug section.
llvm-svn: 196262
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 196053
|
|
|
|
|
|
|
|
| |
This is a patch to let the PECOFF writer to use the information passed
by the parser for /section option. The implementation of /section should
now be complete.
llvm-svn: 195893
|
|
|
|
|
|
|
| |
/MERGE:foo=bar command line option merges section foo to section bar. If
section bar does not exist, foo is just renamed as bar.
llvm-svn: 195856
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having multiple SectionChunks for each section (.text, .data,
.rdata and .bss), we could have one chunk writer that can emit any sections.
This patch does that -- removing all section-sepcific chunk writers and
replace them with one "generic" writer.
This change should simplify the code because it eliminates similar-but-
slightly-different classes.
It also fixes an issue in the previous design. Before this patch, we could
emit only limited set of sections (i.e. .text, .data, .rdata and .bss). With
this patch, we can emit any sections.
llvm-svn: 195797
|
|
|
|
|
|
| |
This reverts accidental commit r195794.
llvm-svn: 195795
|
|
|
|
| |
llvm-svn: 195794
|
|
|
|
|
|
|
| |
In order not to overrun a StringRef and copy the trailing garbage, we need to
set the maximum length to be copied by strncpy.
llvm-svn: 195688
|
|
|
|
|
|
|
|
|
| |
This patch won't change the output because the layout of linker internal
atoms is forced by layout-{before,after} references. Ordinals of the linker
internal atoms are not currently used. (That's why it's working even if there
are atoms having the same ordinals.)
llvm-svn: 195610
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the attribute from sectionBasedOnContent to sectionCustomRequired
because its the right attribute for atoms read from COFF files to have.
COFF atoms should basically be emitted to the section having the same name
as input. Permissions/attributes should not affect that.
There's no functionality change because the writer doesn't yet use the
section name. The writer will be modified in a following patch, so that atoms
are written to its customSectionName()'s section.
llvm-svn: 195595
|
|
|
|
|
|
|
| |
This should improve code readability as the class definitions are now
more readable than before.
llvm-svn: 195159
|
|
|
|
| |
llvm-svn: 194793
|
|
|
|
| |
llvm-svn: 194791
|
|
|
|
|
|
| |
Also slightly reduces PECOFFLinkingContext's memory footprint (~128B).
llvm-svn: 194787
|
|
|
|
| |
llvm-svn: 194754
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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: 193883
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 193266
|
|
|
|
|
|
|
| |
Because MSVC11 doesn't like this new C++11 feature. The last commit
broke the buildbot.
llvm-svn: 193127
|
|
|
|
| |
llvm-svn: 193122
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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
|