| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dumpbin tool in the MSVC toolchain cannot handle an executable created
by LLD if the executable contains a long section name.
In PE/COFF, a section name is stored to a section table entry. Because the
section name field in the table is only 8 byte long, a name longer than
that is stored to the string table and the offset in the string table is
stored to the section table entry instead.
In order to look up a string from the string table, tools need to handle
the symbol table, because the string table is defined as it immediately
follows the symbol table.
And seems the dumpbin doesn't like zero-length symbol table.
This patch teaches LLD how to emit a dummy symbol table. The dummy table
has one dummy entry in it.
llvm-svn: 228900
|
|
|
|
| |
llvm-svn: 228887
|
|
|
|
|
|
|
| |
The fix is for r228680.
This makes tests also work.
llvm-svn: 228837
|
|
|
|
| |
llvm-svn: 228753
|
|
|
|
| |
llvm-svn: 228749
|
|
|
|
| |
llvm-svn: 228743
|
|
|
|
|
|
|
| |
This local variable name did not follow the style guide,
and it is not actually needed.
llvm-svn: 228722
|
|
|
|
| |
llvm-svn: 228717
|
|
|
|
|
|
|
|
|
|
| |
When calling ARM code from Thumb and vice versa,
a veneer that switches instruction set should be generated.
Added veneer generation for ARM_JUMP24 ARM_THM_JUMP24 instructions.
Differential Revision: http://reviews.llvm.org/D7502
llvm-svn: 228680
|
|
|
|
|
|
|
|
|
|
|
| |
We used to do like this instead of putting all command line processing
code within one gigantic switch statement. It is converted to a switch
in r188958, which introduced InputGraph.
In this patch I roll that change back. Now all "break"s are removed,
and the nesting is one level shallow.
llvm-svn: 228646
|
|
|
|
|
|
|
| |
Differential Revision: D7489
Reviewed by: shankarke
llvm-svn: 228533
|
|
|
|
| |
llvm-svn: 228476
|
|
|
|
| |
llvm-svn: 228461
|
|
|
|
| |
llvm-svn: 228453
|
|
|
|
| |
llvm-svn: 228450
|
|
|
|
| |
llvm-svn: 228449
|
|
|
|
|
|
|
| |
It looks like the Driver manages search path for each Target lld would support
on the Gnu flavor.
llvm-svn: 228440
|
|
|
|
| |
llvm-svn: 228380
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 228379
|
|
|
|
| |
llvm-svn: 228378
|
|
|
|
|
|
|
|
|
|
| |
After the total number of program headers are determined, virtual addresses
and file offsets need not be reassigned for sections whose virtual addresses and
fileoffsets remained the same.
This doesnot change any functionality.
llvm-svn: 228377
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the environment variable "LLD_RUN_ROUNDTRIP_TEST" in the test that you want
to disable, as
RUN: env LLD_RUN_ROUNDTRIP_TEST= <run>
This was a patch that I made, but I find this a better way to accomplish what we
want to do.
llvm-svn: 228376
|
|
|
|
|
|
|
|
|
| |
Only search library directories explicitly specified
on the command line. Library directories specified in linker
scripts (including linker scripts specified on the command
line) are ignored.
llvm-svn: 228375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we only have File::path() to get the path name of a file.
If a file was a member of an archive file, path() returns a concatenated
string of the file name in the archive and the archive file name.
If we wanted to get a file name or an archive file name, we had to
parse that string. That's of course not good.
This patch adds new member functions, archivePath and memberPath, to File.
http://reviews.llvm.org/D7447
llvm-svn: 228352
|
|
|
|
|
|
|
| |
Make customOrder pareamter mandatory because the argument is
always passed.
llvm-svn: 228342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The real user of the LayoutPass is now only Mach-O, so move that
pass out of the common directory to Mach-O directory.
"Core" architecture were using the LayoutPass. I modified that
to use a simple OrderPass. I think no one actually have authority
what feature should be in Core and what's not, but I believe the
LayoutPass is not very suitable for Core. Before more code starts
depending on the complex pass, it's better to remove that from
Core.
I could have simplified that pass because Mach-O is the only user
of the LayoutPass. For example, the second parameter of the
LayoutPass constructor can be converted from optional to mandatory.
I didn't do that in this patch to keep it simple. I'll do in a
followup patch.
http://reviews.llvm.org/D7311
llvm-svn: 228341
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we incorrectly added the image base address to an absolute
symbol address (that calculation doesn't make any sense) if an
IMAGE_REL_I386_DIR32 relocation is applied to an absolute symbol.
This patch fixes the issue. With this fix, we can link Bochs using LLD.
(Choosing Bochs has no special meaining -- I just picked it up as a
test program and found it didn't work.) This also fixes one of the
issues we currently have to link Chromium using LLD.
llvm-svn: 228279
|
|
|
|
|
|
| |
The reader was discarding certain types of sections from the input file.
llvm-svn: 228268
|
|
|
|
|
|
| |
MemoryBuffer is being released too early. ELFFile owns MemoryBuffer.
llvm-svn: 228260
|
|
|
|
| |
llvm-svn: 228201
|
|
|
|
| |
llvm-svn: 228106
|
|
|
|
|
|
|
|
| |
Differential Revision: D7394
Reported by: ruiu
Reviewed by: ruiu
llvm-svn: 228094
|
|
|
|
|
|
|
|
|
|
| |
This may be a little bit inefficient than the original code
but that should be okay as this is not really in a performance
critical pass.
http://reviews.llvm.org/D7393
llvm-svn: 228077
|
|
|
|
|
|
| |
Reported by: ruiu
llvm-svn: 228069
|
|
|
|
|
|
|
|
|
|
| |
INPUT directive is a variant of GROUP in the sense that that specifies
a list of input files. The only difference is whether the entire file
list is wrapped with a --start-group/--end-group or not.
http://reviews.llvm.org/D7390
llvm-svn: 228060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, no one owns script::Parser buffers, but yet ELFLinkingContext gets
updated with StringRef pointers to data inside Parser buffers. Since this buffer
is locally owned inside GnuLdDriver::evalLinkerScript(), as soon as this
function finishes, all pointers in ELFLinkingContext that comes from linker
scripts get invalid. The problem is that we need someone to own linker scripts
data structures and, since ELFLinkingContext transports references to linker
scripts data, we can simply make it also own all linker scripts data.
Differential Revision: http://reviews.llvm.org/D7323
llvm-svn: 227975
|
|
|
|
|
|
|
|
|
|
| |
Added relocations to perform function calls with and without passing arguments.
ARM-only, Thumb-only and mixed mode code generations are supported.
Only simple veneers (direct instruction modification) are supported as ARM-Thumb interwork.
Differential Revision: http://reviews.llvm.org/D7223
llvm-svn: 227961
|
|
|
|
|
|
|
| |
This patch is to enable to write unit tests for linker script with
less boilerplate code.
llvm-svn: 227902
|
|
|
|
|
|
| |
Reviewed by: ruiu, shankarke
llvm-svn: 227787
|
|
|
|
|
|
|
| |
Differential Revision: D7326
Reviewed by: rafaelauler, shankarke, ruiu
llvm-svn: 227786
|
|
|
|
|
|
|
|
| |
Target specific LinkingContext's determine the default search directory.
No change in functionality.
llvm-svn: 227784
|
|
|
|
|
|
| |
Reported by: shankarke
llvm-svn: 227710
|
|
|
|
|
|
|
|
|
|
|
|
| |
This caused some tests to fail on FreeBSD, and Mac OS X.
Some std::sort() implementations will check for strict-weak-ordering
by comparing with the same element, or will compare an element to
itself for 1-element sequence. Take care of this case. Thanks to
chandlerc for explaning that to me.
Reviewed by: ruiu
llvm-svn: 227709
|
|
|
|
|
|
| |
Reviewed by: shankarke, ruiu
llvm-svn: 227708
|
|
|
|
| |
llvm-svn: 227707
|
|
|
|
|
|
|
| |
The .got and .got.plt sections are already handled as typeGOT. There is no need
to handle these atoms whose contentType is typeData.
llvm-svn: 227706
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed, among others by the FreeBSD kernel linker script.
Patch by Davide Italiano!
Reviewers: ruiu, rafaelauler
Differential Revision: http://reviews.llvm.org/D7220
llvm-svn: 227694
|
|
|
|
| |
llvm-svn: 227671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we applied the LayoutPass to order atoms and then
apply elf::ArrayOrderPass to sort them again. The first pass is
basically supposed to sort atoms in the normal fashion (which
is to sort symbols in the same order as the input files).
The second pass sorts atoms in {init,fini}_array.<priority> by
priority.
The problem is that the LayoutPass is overkill. It analyzes
references between atoms to make a decision how to sort them.
It's slow, hard to understand, and above all, it doesn't seem
that we need its feature for ELF in the first place.
This patch remove the LayoutPass from ELF pass list. Now all
reordering is done in elf::OrderPass. That pass sorts atoms by
{init,fini}_array, and if they are not in the special section,
they are ordered as the same order as they appear in the command
line. The new code is far easier to understand, faster, and
still able to create valid executables.
Unlike the previous layout pass, elf::OrderPass doesn't count
any attributes of an atom (e.g. permissions) except its
position. It's OK because the writer takes care of them if we
have to.
This patch changes the order of final output, although that's
benign. Tests are updated.
http://reviews.llvm.org/D7278
llvm-svn: 227666
|
|
|
|
|
|
|
| |
Differential Revision: D7044
Reviewed by: ruiu
llvm-svn: 227631
|