| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 326912
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I originally tried to simplify code and then noticed that lld doesn't
do what it tells to the user by warn(). It says "unable to order
discarded symbol" but it actually can for sections eliminated by ICF.
With this patch, lld doesn't sort such sections.
Reviewers: jhenderson, rafael
Subscribers: emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D44180
llvm-svn: 326911
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLD uses the debug info and debug line sections to determine the location of
e.g. references to undefined symbols, when producing error messages. In the
event that debug info was present, but debug line parsing failed for some
reason, then a nullptr would end up being dereferenced by the location-lookup
code.
Differential Revision: https://reviews.llvm.org/D44205
Reviewers: grimar
llvm-svn: 326899
|
|
|
|
| |
llvm-svn: 326896
|
|
|
|
|
|
|
|
|
|
|
|
| |
With fix: add missing "RUN:" prefix to test case.
Original commit message:
We do not report LMA region overflows currently.
Both GNU linkers do that. The patch implements it.
Differential revision: https://reviews.llvm.org/D44094
llvm-svn: 326895
|
|
|
|
|
|
|
| |
Bots are still unhappy:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/26259
llvm-svn: 326894
|
|
|
|
|
|
| |
Removed excessive line from testcase.
llvm-svn: 326893
|
|
|
|
|
|
|
|
|
| |
We do not report LMA region overflows currently.
Both GNU linkers do that. The patch implements it.
Differential revision: https://reviews.llvm.org/D44094
llvm-svn: 326892
|
|
|
|
|
|
|
|
|
| |
Currently, LLD segfaults when linker script attempts to discard
one of the hash sections. This patch fixes that.
Differential revision: https://reviews.llvm.org/D44012
llvm-svn: 326891
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D44146
llvm-svn: 326888
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D44149
llvm-svn: 326885
|
|
|
|
| |
llvm-svn: 326850
|
|
|
|
| |
llvm-svn: 326841
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D39348
llvm-svn: 326835
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like the problem that caused us to originally warn instead of
error was that of a symbol being assigned to the same version twice.
Now we don't warn if a symbol is assigned to the same version twice,
but error if it is assigned to multiple.
This fixes pr28342.
llvm-svn: 326813
|
|
|
|
| |
llvm-svn: 326753
|
|
|
|
|
|
|
|
| |
This matches LLVM change D43940.
Differential Revision: https://reviews.llvm.org/D43946
llvm-svn: 326693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do not expand memory region correctly for following scripts:
.foo.1 :
{
*(.foo.1)
. += 0x1000;
} > ram
Patch generalizes expanding of output sections and memory
regions in one place and fixes the issue.
Differential revision: https://reviews.llvm.org/D43999
llvm-svn: 326688
|
|
|
|
|
|
|
|
|
|
|
| |
"division by zero" or "modulo by zero" are not
very informative errors and even probably confusing
as does not let to know that error is coming from linker script.
Patch adds location reporting.
Differential revision: https://reviews.llvm.org/D43934
llvm-svn: 326686
|
|
|
|
|
|
|
| |
Since r321982 we don't set VersionId in scanShlibUndefined, which
makes InVersionScript redundant.
llvm-svn: 326641
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43849
llvm-svn: 326615
|
|
|
|
| |
llvm-svn: 326583
|
|
|
|
|
|
|
|
| |
This fixes a TODO introduced in rLLD325861.
Differential Revision: https://reviews.llvm.org/D43930
llvm-svn: 326581
|
|
|
|
|
|
|
|
|
| |
This avoids the Writer unnecessarily having a member to retain ownership
of the function body.
Differential Revision: https://reviews.llvm.org/D43933
llvm-svn: 326580
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43947
llvm-svn: 326579
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLD can not catch a memory area overflow when using a data command.
If we have the script below:
.foo :
{
*(.foo)
BYTE(0x1)
} > ram
where BYTE overflows the ram region, we do not report it currently.
Patch fixes that.
Differential revision: https://reviews.llvm.org/D43948
llvm-svn: 326545
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove the space between --lto-O and value, as the option with a
space is not accepted at present.
Leave --opt-remarks-filename as it does not currently accept the = form.
llvm.org/pr36563
llvm-svn: 326536
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43966
llvm-svn: 326509
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is a usage error to feed a .dll file instead of a .dll to COFF linker.
Previously, lld failed with a mysterious error message. Now we reject
it at the driver.
Fixes https://bugs.llvm.org/show_bug.cgi?id=36440
Differential Revision: https://reviews.llvm.org/D43964
llvm-svn: 326507
|
|
|
|
|
|
|
|
|
| |
GNU linkers by convention supports both `--foo bar` and `--foo=bar` styles
for all long options that take arguments.
Differential Revision: https://reviews.llvm.org/D43972
llvm-svn: 326506
|
|
|
|
| |
llvm-svn: 326504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
If an executable needs text relocations, it should be marked as such so
that the loader can prepare for text relocations. We currently create a
dummy segment with DT_TEXTREL for that purpose.
Generic ABI as of 2000 [1] mentioned that "Its [DT_TEXTREL's] use
has been superseded by the DF_TEXTREL flag". However, it's actually not
superseded even after 18 years. OpenBSD and musl recognize only DT_TEXTREL.
So we still need to set both.
[1] http://www.sco.com/developers/gabi/2000-07-17/ch5.dynamic.html
Reviewers: rafael
Subscribers: emaste, llvm-commits, arichardson
Differential Revision: https://reviews.llvm.org/D43920
llvm-svn: 326503
|
|
|
|
| |
llvm-svn: 326498
|
|
|
|
|
|
|
|
| |
Currently --start-group=foo is accidentally accepted by the MinGW driver.
Differential Revision: https://reviews.llvm.org/D43836
llvm-svn: 326478
|
|
|
|
|
|
|
|
|
| |
The argument is section=address, not just address.
(For compatibility with GNU linkers we need to, but do not yet, accept
--section-start=section=address.)
llvm-svn: 326463
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We intend to maintain compatibility with GNU ld, and in the GNU world
long options are conventionally specified as --long-option=value. For
whatever reason GNU ld.bfd accepts both --long-option value and
--long-option=value, but documents the former. Follow suit.
Some lld long options do not accept the = form; this is probably a bug
to be fixed (along with a man page update).
Reported by Ingo Schwarze, for --entry.
llvm-svn: 326459
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43922
llvm-svn: 326455
|
|
|
|
|
|
|
|
|
|
| |
For now this is NFC, but this small refactor opens the door to
letting us embed a hash of the PDB in the build id field of the
PDB.
Differential Revision: https://reviews.llvm.org/D43913
llvm-svn: 326453
|
|
|
|
|
|
| |
Patch by Ingo Schwarze
llvm-svn: 326446
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current code if the script has a PHDRS we always obey and try
to allocate a header. This can cause Min - HeaderSize to underflow.
It looks like bfd actually prints an error for this case. With this
patch we do the same.
Found while looking at pr36515.
llvm-svn: 326441
|
|
|
|
|
|
|
|
|
|
|
| |
LLD crashes with broken scripts shown in testcase,
because fails to read memory regon name and accesses
MemoryRegions's element which is nullptr.
Patch fixes it.
Differential revision: https://reviews.llvm.org/D43866
llvm-svn: 326431
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is PR36515.
Currenly if we have a script like .debug_info 0 : { *(.debug_info) },
we would not remove this section and keep it in the output.
That does not work, because it is common case for
debug sections to have a zero address expression.
Patch changes behavior so that we remove only sections
that do not use symbols in its expressions.
Differential revision: https://reviews.llvm.org/D43863
llvm-svn: 326430
|
|
|
|
|
|
| |
Was broken after recent testcases changes.
llvm-svn: 326427
|
|
|
|
|
|
|
|
| |
This fixes a TODO introduced in rLLD325861.
Differential Revision: https://reviews.llvm.org/D43877
llvm-svn: 326424
|
|
|
|
| |
llvm-svn: 326415
|
|
|
|
| |
llvm-svn: 326411
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we didn't try to make effort to put .note sections next
to each other in the output file, so two .note sections were likely
to be stored to two separate NOTE segments. That's undesirable because
we should create as few segments as possible in general.
Differential Revision: https://reviews.llvm.org/D43858
llvm-svn: 326410
|
|
|
|
|
|
|
|
|
| |
It now includes both linkerscript and non linkerscript variants.
Extracted from a patch by Rui while I was trying to figure out what
exactly was changing.
llvm-svn: 326409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change removes large "echo" commands from the test by writing
tests themselves as linker scripts.
Reviewers: rafael
Subscribers: emaste, javed.absar, llvm-commits, arichardson
Differential Revision: https://reviews.llvm.org/D43900
llvm-svn: 326403
|
|
|
|
|
|
|
| |
With this the meaning of the Live bit in output sections is clear: we
have at some point added a input section into it.
llvm-svn: 326401
|