| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 231005
|
|
|
|
|
|
|
| |
While at it, point the correct document where the missing TLS
relocation(s) are described.
llvm-svn: 230937
|
|
|
|
| |
llvm-svn: 230925
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no initial live symbols are set up, and deadStrip() == true,
the Resolver ends up reclaiming all the symbols that aren't absolute. This is wrong.
This patch fixes the issue by setting entrySymbolName() as live, and this allows
us to self-host lld when --gc-sections is enabled. There are still quite a few problems
with --gc-sections (test failures), so the option can't be enabled by default.
Differential Revision: D7926
Reviewed by: ruiu, shankarke
llvm-svn: 230737
|
|
|
|
|
|
| |
This remove(s) include of the filename twice.
llvm-svn: 230733
|
|
|
|
| |
llvm-svn: 230729
|
|
|
|
| |
llvm-svn: 230726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nothing wrong with reinterpret_cast<llvm::support::ulittle32_t *>(loc),
but that's redundant and not great from readability point of view.
The new functions are wrappers for that kind of reinterpet_casts.
Surprisingly or unsurprisingly, there was no use of big endian read
and write. {read,write}{16,32,64}be have no user. But I think they
still worth to be there in the header for completeness.
http://reviews.llvm.org/D7927
llvm-svn: 230725
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 230678
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 230677
|
|
|
|
| |
llvm-svn: 230594
|
|
|
|
| |
llvm-svn: 230593
|
|
|
|
| |
llvm-svn: 230578
|
|
|
|
| |
llvm-svn: 230574
|
|
|
|
|
|
|
| |
Differential Revision: D7820
Reviewed by: shankarke, ruiu
llvm-svn: 230465
|
|
|
|
|
|
|
|
|
|
|
| |
In LLD's model, symbol is a property of the node (atom) and not a property of
edge (reference). Prior to this patch, we stored the symbol in the reference.
From post-commit comments, it seemed better to create a map from the reference
to the symbol instead and use this mapping wherever desired.
Address comments from Ruiu/Simon Atanasyan.
llvm-svn: 230273
|
|
|
|
|
|
| |
Cleanup.
llvm-svn: 230219
|
|
|
|
|
|
| |
Address review comments from Ruiu, and add some more TODO's.
llvm-svn: 230218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SHF_GROUP: Group Member Sections
----------------------------------
A section which is part of a group, and is to be retained or discarded with the
group as a whole, is identified by a new section header attribute: SHF_GROUP
This section is a member (perhaps the only one) of a group of sections, and the
linker should retain or discard all or none of the members. This section must be
referenced in a SHT_GROUP section. This attribute flag may be set in any section
header, and no other modification or indication is made in the grouped sections.
All additional information is contained in the associated SHT_GROUP section.
SHT_GROUP: Section Group Definition
-------------------------------------
Represents a group section.
The section group's sh_link field identifies a symbol table section, and its
sh_info field the index of a symbol in that section. The name of that symbol is
treated as the identifier of the section group.
More information: https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html
Added a lot of extensive tests, that tests functionality.
llvm-svn: 230195
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the GNU linker sees two input sections with the same name, and the name
starts with ".gnu.linkonce.", the linker will only keep one copy and discard the
other. Any section whose name starts with “.gnu.linkonce.” is a COMDAT section.
Some architectures like Hexagon use this section to store floating point constants,
that need be deduped.
This patch adds gnu.linkonce functionality to the ELFReader.
llvm-svn: 230194
|
|
|
|
|
|
|
|
|
| |
Relocation handling need more information about the Symbol that we are creating
references for.
No change in functionality.
llvm-svn: 230191
|
|
|
|
| |
llvm-svn: 230189
|
|
|
|
| |
llvm-svn: 230166
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mainly for back-compatibility with GNU ld.
Ideally --stats should be a general option in LinkingContext, providing
individual stats for every pass in the linking process.
In the GNU driver, a better wording could be used, but there's no need
to change it for now.
Differential Revision: D7657
Reviewed by: ruiu
llvm-svn: 230157
|
|
|
|
|
|
|
|
| |
FIXME code was left around in few places where its already been taken care of.
This removes the FIXME's that are not needed.
llvm-svn: 230139
|
|
|
|
|
|
|
|
|
| |
Now since the correct file path for atoms is available and not clobbered,
commit r222309 which was reverted previously can be added back.
No change in functionality.
llvm-svn: 230138
|
|
|
|
|
|
|
|
| |
The ELFReader was skipping references for sections that contained relocations.
This fixes the bug.
llvm-svn: 230127
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The round-trip passes were introduced in r193300. The intention of
the change was to make sure that LLD is capable of reading end
writing such file formats.
But that turned out to be yet another over-designed stuff that had
been slowing down everyday development.
The passes ran after the core linker and before the writer. If you
had an additional piece of information that needs to be passed from
front-end to the writer, you had to invent a way to save the data to
YAML/Native. These passes forced us to do that even if that data
was not needed to be represented neither in an object file nor in
an executable/DSO. It doesn't make sense. We don't need these passes.
http://reviews.llvm.org/D7480
llvm-svn: 230069
|
|
|
|
|
|
|
| |
Differential Revision: D7693
Reviewed by: shankarke
llvm-svn: 229635
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 229453
|
|
|
|
| |
llvm-svn: 229442
|
|
|
|
| |
llvm-svn: 229441
|
|
|
|
|
|
|
|
| |
separate functions
No functional changes.
llvm-svn: 229440
|
|
|
|
|
|
|
|
|
| |
Wrap functionality was using a std::set to record symbols that need to be
wrapped. This changes the implementation to use a StringSet instead.
No change in functionality.
llvm-svn: 229165
|
|
|
|
|
|
|
| |
Add support for checking overflow when applying a R_AARCH64_ABS32
relocation and add a test to ensure it behaves correctly.
llvm-svn: 229072
|
|
|
|
| |
llvm-svn: 229055
|
|
|
|
| |
llvm-svn: 229030
|
|
|
|
|
|
|
| |
Symbols specified by --wrap was being inserted into a vector, change this to
insert into a set, so that we have unique entries.
llvm-svn: 228968
|
|
|
|
|
|
| |
We can add this function when we really have a need.
llvm-svn: 228907
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a wrapper function for symbol. Any undefined reference to symbol will be
resolved to "__wrap_symbol". Any undefined reference to "__real_symbol" will be
resolved to symbol.
This can be used to provide a wrapper for a system function. The wrapper
function should be called "__wrap_symbol". If it wishes to call the system
function, it should call "__real_symbol".
Here is a trivial example:
void * __wrap_malloc (size_t c)
{
printf ("malloc called with %zu\n", c);
return __real_malloc (c);
}
If you link other code with this file using --wrap malloc, then all calls
to "malloc" will call the function "__wrap_malloc" instead. The call to
"__real_malloc" in "__wrap_malloc" will call the real "malloc" function.
llvm-svn: 228906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the LinkingContext parameter to the ELFReader. Previously the flags in
that were needed in the Context was passed to the ELFReader, this made it very
hard to access data structures in the LinkingContext when reading an ELF file.
This change makes the ELFReader more flexible so that required parameters can be
grabbed directly from the LinkingContext.
Future patches make use of the changes.
There is no change in functionality though.
llvm-svn: 228905
|
|
|
|
|
|
|
| |
The fix is for r228680.
This makes tests also work.
llvm-svn: 228837
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Differential Revision: D7489
Reviewed by: shankarke
llvm-svn: 228533
|
|
|
|
| |
llvm-svn: 228476
|
|
|
|
| |
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
|