lld 13.0.0 Release Notes¶
Warning
These are in-progress notes for the upcoming LLVM 13.0.0 release. Release notes for previous releases can be found on the Download Page.
Introduction¶
This document contains the release notes for the lld linker, release 13.0.0. Here we describe the status of lld, including major improvements from the previous release. All lld releases may be downloaded from the LLVM releases web site.
Non-comprehensive list of changes in this release¶
ELF Improvements¶
-z start-stop-gcis now supported and becomes the default. (D96914) (rG6d2d3bd0)--shuffle-sections=<seed>has been changed to--shuffle-sections=<section-glob>=<seed>. If seed is -1, the matched input sections are reversed. (D98445) (D98679)-Bsymbolic -Bsymbolic-functionshas been changed to behave the same as-Bsymbolic-functions. This matches GNU ld. (D102461)-Bno-symbolichas been added. (D102461)A new linker script command
OVERWRITE_SECTIONShas been added. (D103303)-Bsymbolic-non-weak-functionshas been added as aSTB_GLOBALsubset of-Bsymbolic-functions. (D102570)--no-allow-shlib-undefinedhas been improved to catch more cases. (D101996)__rela_iplt_startis no longer defined for -pie/-shared. This makes GCC/Clang-static-piebuilt executables work. (rG8cb78e99)IRELATIVE/TLSDESC relocations now support
-z rel. (D100544)Section groups with a zero flag are now supported. This is used by
comdat nodeduplicatein LLVM IR. (D96636) (D106228)Defined symbols are now resolved before undefined symbols to stabilize the bheavior of archive member extraction. (D95985)
STB_WEAKsymbols are now preferred over COMMON symbols as a fix to a--fortran-commonregression. (D105945)Absolute relocations referencing undef weak now produce dynamic relocations for -pie, matching GOT-generating relocations. (D105164)
Exported symbols are now communicated to the LTO library so as to make LTO based whole program devirtualization (
-flto=thin -fwhole-program-vtables) work with shared objects. (D91583)Whole program devirtualization now respects
local:version nodes in a version script. (D98220) (D98686)local:version nodes in a version script now apply to non-default version symbols. (D107234)If an object file defines both
fooandfoo@v1, now onlyfoo@v1will be in the output. (D107235)Copy relocations on non-default version symbols are now supported. (D107535)
Linker script changes:
.,$, and double quotes can now be used in symbol names in expressions. (D98306) (rGe7a7ad13)Fixed value of
.in the output section description of.tbss. (D107288)NOLOADsections can now be placed in aPT_LOADprogram header. (D103815)OUTPUT_FORMAT(default, big, little)now consults-ELand-EB. (D96214)The
OVERWRITE_SECTIONScommand has been added. (D103303)The section order within an
INSERT AFTERcommand is now preserved. (D105158)
Architecture specific changes:
aarch64_be is now supported. (D96188)
The AMDGPU port now supports
--amdhsa-code-object-version=4object files; (D95811)The ARM port now accounts for PC biases in range extension thunk creation. (D97550)
The AVR port now computes
e_flags. (D99754)The Mips port now omits unneeded dynamic relocations for PIE non-preemptible TLS. (D101382)
The PowerPC port now supports
--power10-stubs=noto omit Power10 instructions from call stubs. (D94625)Fixed a thunk creation bug in the PowerPC port when TOC/NOTOC calls are mixed. (D101837)
The RISC-V port now resolves undefined weak relocations to the current location if not using PLT. (D103001)
R_386_GOTOFFrelocations from .debug_info are now allowed to be compatible with GCC. (D95994)gotEntrySizehas been added to improve support for the ILP32 ABI of x86-64. (D102569)
Breaking changes¶
--shuffle-sections=<seed>has been changed to--shuffle-sections=<section-glob>=<seed>. Specify*as<section-glob>to get the previous behavior.
COFF Improvements¶
MinGW Improvements¶
Support for linking directly against a DLL without using an import library has been added. (D104530 and D104531)
Fix linking with
--export-all-symbolsin combination with-function-sections. (D101522 and D101615)Fix automatic export of symbols from LTO objects. (D101569)
Accept more spellings of some options. (D107237 and D107253)
Mach-O Improvements¶
The Mach-O backend is now able to link several large, real-world programs, though we are still working out the kinks.
arm64 is now supported as a target. (D88629)
arm64_32 is now supported as a target. (D99822)
Branch-range-extension thunks are now supported. (D100818)
-dead_stripis now supported. (D103324)Support for identical code folding (
--icf=all) has been added. (D103292)Support for special
$startand$endsymbols for segment & sections has been added. (D106767, D106629)$ld$previoussymbols are now supported. (`D103505 <https://reviews.llvm.org/D103505 >`_)$ld$install_namesymbols are now supported. (D103746)__mh_*_headersymbols are now supported. (D97007)LC_CODE_SIGNATURE is now supported. (D96164)
LC_FUNCTION_STARTS is now supported. (D97260)
LC_DATA_IN_CODE is now supported. (D103006)
LTO cache support has been added. (D105922)
-application_extensionis now supported. (D105818)-export_dynamicis now partially supported. (D105482)-arch_multipleis now supported. (D105450)-final_outputis now supported. (D105449)-umbrellais now supported. (D105448)--print-dylib-searchis now supported. (D103985)-force_load_swift_libsis now supported. (D103709)-reexport_framework,-reexport_library,-reexport-lare now supported. (D103497).weak_def_can_be_hiddenis now supported. (D101080)-add_ast_pathis now supported. (D100076)-segprotis now supported. (D99389)-dependency_infois now partially supported. (D98559)--time-traceis now supported. (D98419)-mark_dead_strippable_dylibis now supported. (D98262)-[un]exported_symbol[s_list]is now supported. (D98223)-flat_namespaceis now supported. (D97641)-rename_sectionand-rename_segmentare now supported. (D97600)-bundle_loaderis now supported. (D95913)-mapis now partially supported. (D98323)
There were numerous other bug-fixes as well.
