| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r282021, bringing back r282015.
The problem was that the comparison function was not a strict weak
ordering anymore, which this patch fixes.
Original message:
Only restrict order if both sections are in the script.
This matches gold and bfd behavior and is required to handle some scripts.
The script has to assume where PT_LOADs start in order to align that
spot. If we don't allow section it doesn't know about to move to the
middle, we can need more PT_LOADs and those will not be aligned.
llvm-svn: 282035
|
|
|
|
|
|
| |
This reverts commit r282015. It broke some bots.
llvm-svn: 282021
|
|
|
|
|
|
|
|
|
|
| |
This matches gold and bfd behavior and is required to handle some scripts.
The script has to assume where PT_LOADs start in order to align that
spot. If we don't allow section it doesn't know about to move to the
middle, we can need more PT_LOADs and those will not be aligned.
llvm-svn: 282015
|
|
|
|
|
|
|
| |
This means either relaxing CHECKs or listing more sections and
addresses in linker scripts.
llvm-svn: 282014
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D24685
llvm-svn: 282006
|
|
|
|
|
|
|
|
|
|
| |
This is particularly important when the symbol comes from a linker
script. It is common to use the same linker script for shared
libraries and executables. Without this we would always fail to link
shared libraries with -z,defs and a linker script with an ENTRY
directive.
llvm-svn: 281989
|
|
|
|
|
|
| |
Makes the error output less confusing when this test fails.
llvm-svn: 281985
|
|
|
|
|
|
|
|
| |
Linker scripts are responsible for aliging '.'. Since they are
designed for bfd which has no --rosegment, they don't align the RO to
RX transition.
llvm-svn: 281978
|
|
|
|
|
|
|
|
|
| |
In most cases that means just not checking the address when we don't
need it.
For some tests it is easier to just set . to a known value.
llvm-svn: 281976
|
|
|
|
| |
llvm-svn: 281974
|
|
|
|
|
|
|
| |
We were already not creating them, and with this other parts of the
code don't have to worry about them.
llvm-svn: 281968
|
|
|
|
| |
llvm-svn: 281932
|
|
|
|
|
|
|
| |
That is not what this test is about. This reduces changes in another
patch that changes layout.
llvm-svn: 281929
|
|
|
|
|
|
|
| |
Previously it used llvm-readobj -s, now changed to llvm-objdump -section-headers,
that reduced the output significantly and helps to read/support it.
llvm-svn: 281832
|
|
|
|
|
|
|
|
|
|
|
| |
Our implementation supported integer value previously.
ld can use expression,
for example, it is OK to write
. = SEGMENT_START("foobar", .);
Patch implements that.
llvm-svn: 281831
|
|
|
|
|
|
|
|
|
| |
It was possible situation about some commands just were not processed
(were skipped) because of a bug appeared when constraint checking used.
Testcase is attached.
llvm-svn: 281818
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches gold and bfd, and is pretty much required by some linker
scripts. They end with commands like
foo 0 : { *(bar) }
if we put any SHF_ALLOC sections after they can have an address that
is too low.
llvm-svn: 281778
|
|
|
|
|
|
|
| |
This matches bfd behavior. It also makes future changes simpler as we
don't have to worry about ignoring these commands in multiple places
llvm-svn: 281775
|
|
|
|
|
|
| |
We have to look at all the relevant input sections at once.
llvm-svn: 281772
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes Bug 30385 - SORT_NONE not implemented,
`SORT_NONE' disables section sorting by ignoring the command line
section sorting option.
That is why this patch also implements --sort-section option.
Description of sorting rules
available at https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html
Differential revision: https://reviews.llvm.org/D24604
llvm-svn: 281771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a input section description."
With fix for 2 bots. Details about the fix performed is on a review page.
Initial commit message:
This is PR30387:
From PR description:
We fail to parse
SECTIONS
{
foo :
{
*(sec0 EXCLUDE_FILE (zed1.o) sec1 EXCLUDE_FILE (zed2.o) sec2 )
}
}
The semantics according to bfd are:
Include sec1 from every file but zed1.o
Include sec2 from every file but zed2.o
Include sec0 from every file
Patch implements the support.
Differential revision: https://reviews.llvm.org/D24650
llvm-svn: 281754
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D24450
llvm-svn: 281740
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes pr30367, but more importantly, it changes how we compute offsets.
Now offset computation in a walk over linker script commands, like the
rest of assignAddresses. IMHO this is simpler to understand and if we
ever have to create multiple outputsections or chunks to change how we
handle test/ELF/linkerscript/alternate-sections.s it should be easier
to do it.
llvm-svn: 281736
|
|
|
|
|
|
|
|
|
| |
middle of a input section description.").
It broke build bot:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/27508
llvm-svn: 281723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
section description.
This is PR30387:
From PR description:
We fail to parse
SECTIONS
{
foo :
{
*(sec0 EXCLUDE_FILE (zed1.o) sec1 EXCLUDE_FILE (zed2.o) sec2 )
}
}
The semantics according to bfd are:
Include sec1 from every file but zed1.o
Include sec2 from every file but zed2.o
Include sec0 from every file
Patch implements the support.
Differential revision: https://reviews.llvm.org/D24650
llvm-svn: 281721
|
|
|
|
|
|
|
| |
What bfd and gold do is give up in putting the headers in the PT_LOAD
and just start the PT_LOAD in the second page.
llvm-svn: 281660
|
|
|
|
|
|
| |
We were some times stopping early when using linker scripts.
llvm-svn: 281647
|
|
|
|
|
|
|
|
|
|
|
| |
This is PR30386,
SORT_BY_INIT_PRIORITY is a keyword can be used to sort sections by numerical value of the
GCC init_priority attribute encoded in the section name.
Differential revision: https://reviews.llvm.org/D24611
llvm-svn: 281646
|
|
|
|
| |
llvm-svn: 281608
|
|
|
|
| |
llvm-svn: 281521
|
|
|
|
| |
llvm-svn: 281515
|
|
|
|
| |
llvm-svn: 281496
|
|
|
|
|
|
|
|
|
| |
This also fixes the related problem of non SHF_MERGE sections with
different flags not being merged.
Fixes pr30355.
llvm-svn: 281338
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D24340
llvm-svn: 281024
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D24141
llvm-svn: 280915
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D23925
llvm-svn: 280912
|
|
|
|
| |
llvm-svn: 280904
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
different attributes.
Previously we combined sections by name if linkerscript was used.
For that we had to disable SHF_MERGE handling temporarily, but then
found that implementing it properly will require additional complexity layers like
subsections or something.
At the same time looks we can live with multiple output sections approach for now.
That patch do this change.
Differential revision: https://reviews.llvm.org/D24127
llvm-svn: 280801
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows making section defined symbols absolute:
.foo : {
begin_foo = ABSOLUTE(.);
*(.foo)
}
Differential revision: https://reviews.llvm.org/D24135
llvm-svn: 280788
|
|
|
|
|
|
|
|
|
| |
Patch implements FILL just as alias for =fillexpr.
This allows to make implementation much shorted and simpler than D24186.
Differential revision: https://reviews.llvm.org/D24227
llvm-svn: 280708
|
|
|
|
|
|
|
|
|
|
|
| |
The patch adds support for both '-' and '~' unary expressions. Also it
brings support for signed numbers is expressions.
https://llvm.org/bugs/show_bug.cgi?id=30221
Differential revision: https://reviews.llvm.org/D24128
llvm-svn: 280546
|
|
|
|
| |
llvm-svn: 280541
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D24207
llvm-svn: 280540
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows does not allow opened files to be removed. This patch
fixes two types of errors.
- Output file being the same as input file. Because LLD itself
holds a file descriptor of the input file, it cannot create an
output file with the same name as a new file.
- Removing files before releasing MemoryBuffer objects.
These tests are not failing no because MemoryBuffer happens to
decide not to use mmap on these files. But we shouldn't rely on
that behavior.
llvm-svn: 280507
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both bfd and gold accept:
foo = 1K;
bar = 1M;
zed = 1H;
And lowercase forms: k, m, h.
Patch adds support for that.
Differential revision: https://reviews.llvm.org/D24194
llvm-svn: 280494
|
|
|
|
|
|
|
|
|
| |
Symbol assignments outside of SECTIONS command need to be created
even when SECTIONS command is not used.
Differential Revision: https://reviews.llvm.org/D23751
llvm-svn: 280252
|
|
|
|
|
|
|
|
|
| |
Allows adding start and/or end symbols to special output sections,
like .eh_frame_hdr, which aren't lists of regular input sections.
Differential revision: https://reviews.llvm.org/D23716
llvm-svn: 280205
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D24041
llvm-svn: 280203
|
|
|
|
|
|
|
|
|
|
|
| |
ADDR(section)
Return the absolute address (the VMA) of the named section.
Used in the wild, eg.: https://searchcode.com/file/53617342/arch/x86/kernel/vmlinux.lds.S
Differential revision: https://reviews.llvm.org/D23913
llvm-svn: 280070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filename spec.
FreeBSD/mips script has non-wildcard filename specifications:
.text :
{
start.o(.text*)
Patch adds support for that, this is PR29115.
Differential revision: https://reviews.llvm.org/D23839
llvm-svn: 280069
|