|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
85cfd917 |
| 24-Jul-2022 |
Fangrui Song <[email protected]> |
[ELF] Optimize some non-constant alignTo with alignToPowerOf2. NFC
My x86-64 lld executable is 2KiB smaller. .eh_frame writing gets faster as there were lots of divisions.
|
| #
b95cca03 |
| 26-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Improve compound assignment tests
Also use strchr instead of is_contained.
|
| #
0a0effdd |
| 26-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Support -= *= /= <<= >>= &= |= in symbol assignments
|
| #
21bf6bb3 |
| 26-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Fix assertion failure when PROVIDE/HIDDEN/PROVIDE_HIDDEN does not have =
|
| #
fe0de25b |
| 26-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Allow an expression to follow = in a symbol assignment
GNU ld doesn't require whitespace before =. Match it.
|
| #
b0d6dd39 |
| 25-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Fix precedence of ? when there are 2 or more operators on the left hand side
For 1 != 1 <= 1 ? 1 : 2, the current code incorrectly considers that ? has a higher precedence than != (minPrec).
[ELF] Fix precedence of ? when there are 2 or more operators on the left hand side
For 1 != 1 <= 1 ? 1 : 2, the current code incorrectly considers that ? has a higher precedence than != (minPrec).
Also, add a test for right associativity.
show more ...
|
| #
d479b2e4 |
| 25-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Fix precedence of == and != in expressions
In GNU ld, the == and != operators have lower precedence than < > <= >=. This behavior matches C.
|
| #
4cb05dc3 |
| 25-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Support quoted name in the TARGET command
|
| #
363b2956 |
| 25-Jun-2022 |
Fangrui Song <[email protected]> |
[ELF] Support quoted symbol in the ENTRY command
This matches GNU ld and matches other places we unquote the symbol name.
Fixes #56208
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
8527f32f |
| 12-May-2022 |
Ben Shi <[email protected]> |
[lld][ELF] Support BFD name elf32-avr
Reviewed By: MaskRay
differential Revision: https://reviews.llvm.org/D125544
|
| #
177fd72f |
| 13-May-2022 |
Fangrui Song <[email protected]> |
[ELF] Disallow input section description without a filename
GNU ld does not allow `.foo : { (*foo) }`, but we may recognize it as three input section descriptions: file "(" with any section name, fi
[ELF] Disallow input section description without a filename
GNU ld does not allow `.foo : { (*foo) }`, but we may recognize it as three input section descriptions: file "(" with any section name, file "*foo" with any section name, file ")" with any section name. Disallow the error-prone usage.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D125523
show more ...
|
| #
5a44980f |
| 04-May-2022 |
Fangrui Song <[email protected]> |
[ELF] Support custom sections between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END
We currently hard code RELRO sections. When a custom section is between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_
[ELF] Support custom sections between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END
We currently hard code RELRO sections. When a custom section is between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END, we may report a spurious `error: section: ... is not contiguous with other relro sections`. GNU ld makes such sections RELRO.
glibc recently switched to default --with-default-link=no. This configuration places `__libc_atexit` and others between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. This patch allows such a ld.bfd --verbose linker script to be fed into lld.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D124656
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
6c814931 |
| 08-Mar-2022 |
Fangrui Song <[email protected]> |
[ELF] Don't use multiple inheritance for OutputSection. NFC
Add an OutputDesc class inheriting from SectionCommand. An OutputDesc wraps an OutputSection. This change allows InputSection::getParent t
[ELF] Don't use multiple inheritance for OutputSection. NFC
Add an OutputDesc class inheriting from SectionCommand. An OutputDesc wraps an OutputSection. This change allows InputSection::getParent to be inlined.
Differential Revision: https://reviews.llvm.org/D120650
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
9e9c86fd |
| 28-Feb-2022 |
Fangrui Song <[email protected]> |
[ELF] Change some non-null pointer parameters to references. NFC
To decrease difference for D120650. Also, rename some `OutputSection *sec` (and `cmd`) to the more common `osec`.
|
| #
b01430a0 |
| 24-Feb-2022 |
Fangrui Song <[email protected]> |
[ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC
|
| #
66f8ac8d |
| 17-Feb-2022 |
Fangrui Song <[email protected]> |
[ELF] Support (TYPE=<value>) to customize the output section type
The current output section type allows to set the ELF section type to SHT_PROGBITS or SHT_NOLOAD. This patch allows an arbitrary sec
[ELF] Support (TYPE=<value>) to customize the output section type
The current output section type allows to set the ELF section type to SHT_PROGBITS or SHT_NOLOAD. This patch allows an arbitrary section value to be specified. Some common SHT_* literal names are supported as well.
``` SECTIONS { note (TYPE=SHT_NOTE) : { BYTE(8) *(note) } init_array ( TYPE=14 ) : { QUAD(14) } fini_array (TYPE = SHT_FINI_ARRAY) : { QUAD(15) } } ```
When `sh_type` is specified, it is an error if an input section has a different type.
Our syntax is compatible with GNU ld 2.39 (https://sourceware.org/bugzilla/show_bug.cgi?id=28841).
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D118840
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1 |
|
| #
27bb7990 |
| 08-Feb-2022 |
Fangrui Song <[email protected]> |
[ELF] Clean up headers. NFC
|
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
83d59e05 |
| 20-Jan-2022 |
Alexandre Ganea <[email protected]> |
Re-land [LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers wi
Re-land [LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inherit from this structure and add their own global state, in the same way as for the existing COFFLinkerContext.
See discussion in https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html
The previous land f860fe362282ed69b9d4503a20e5d20b9a041189 caused issues in https://lab.llvm.org/buildbot/#/builders/123/builds/8383, fixed by 22ee510dac9440a74b2e5b3fe3ff13ccdbf55af3.
Differential Revision: https://reviews.llvm.org/D108850
show more ...
|
| #
e6b15394 |
| 16-Jan-2022 |
Alexandre Ganea <[email protected]> |
Revert [LLD] Remove global state in lldCommon
It seems to be causing issues on https://lab.llvm.org/buildbot/#/builders/123/builds/8383
|
| #
f860fe36 |
| 16-Jan-2022 |
Alexandre Ganea <[email protected]> |
[LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inher
[LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inherit from this structure and add their own global state, in the same way as for the existing COFFLinkerContext.
See discussion in https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html
Differential Revision: https://reviews.llvm.org/D108850
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
64038ef8 |
| 27-Dec-2021 |
Fangrui Song <[email protected]> |
[ELF] ScriptParser: change std::vector to SmallVector
|
| #
a1c2ee01 |
| 26-Dec-2021 |
Fangrui Song <[email protected]> |
[ELF] LinkerScript/OutputSection: change other std::vector members to SmallVector
11+KiB smaller .text with both libc++ and libstdc++ builds.
|
| #
7051aeef |
| 26-Nov-2021 |
Fangrui Song <[email protected]> |
[ELF] Rename BaseCommand to SectionCommand. NFC
BaseCommand was picked when PHDRS/INSERT/etc were not implemented. Rename it to SectionCommand to match `sectionCommands` and make it clear that the c
[ELF] Rename BaseCommand to SectionCommand. NFC
BaseCommand was picked when PHDRS/INSERT/etc were not implemented. Rename it to SectionCommand to match `sectionCommands` and make it clear that the commands are used in SECTIONS (except a special case for SymbolAssignment).
Also, improve naming of some BaseCommand variables (base -> cmd).
show more ...
|
| #
6188fd49 |
| 26-Nov-2021 |
Fangrui Song <[email protected]> |
[ELF] Rename OutputSection::sectionCommands to commands. NFC
This partially reverts r315409: the description applies to LinkerScript, but not to OutputSection.
The name "sectionCommands" is used in
[ELF] Rename OutputSection::sectionCommands to commands. NFC
This partially reverts r315409: the description applies to LinkerScript, but not to OutputSection.
The name "sectionCommands" is used in both LinkerScript::sectionCommands and OutputSection::sectionCommands, which may lead to confusion. "commands" in OutputSection has no ambiguity because there are no other types of commands.
show more ...
|
| #
8cdf1c1e |
| 24-Nov-2021 |
Igor Kudrin <[email protected]> |
[ELF] Support the "read-only" memory region attribute
The attribute 'r' allows (or disallows for the negative case) read-only sections, i.e. ones without the SHF_WRITE flag, to be assigned to the me
[ELF] Support the "read-only" memory region attribute
The attribute 'r' allows (or disallows for the negative case) read-only sections, i.e. ones without the SHF_WRITE flag, to be assigned to the memory region. Before the patch, lld could put a section in the wrong region or fail with "error: no memory region specified for section".
Differential Revision: https://reviews.llvm.org/D113771
show more ...
|