|
12.0.1
Non-comprehensive list of changes in this release
ELF Improvements
--dependency-file has been added. (Similar to cc -M -MF.) (D82437)
--error-handling-script has been added to allow for user-defined handlers upon missing libraries. (D87758)
--exclude-libs can now localize defined version symbols and bitcode referenced libcall symbols. (D94280)
--gdb-index now works with DWARF v5 and --icf={safe,all}. (D85579) (D89751)
--gdb-index --emit-relocs can now be used together. (D94354)
--icf={safe,all} conservatively no longer fold text sections with LSDA. Previously ICF on -fexceptions code could be unsafe. (D84610)
--icf={safe,all} can now fold two sections with relocations referencing aliased symbols. (D88830)
--lto-pseudo-probe-for-profiling has been added. (D95056)
--no-lto-whole-program-visibility has been added. (D92060)
--oformat-binary has been fixed to respect LMA. (D85086)
--reproduce includes --lto-sample-profile, --just-symbols, --call-graph-ordering-file, --retain-symbols-file files.
-r --gc-sections is now supported. (D84131)
A -u specified symbol will no longer change the binding to STB_WEAK. (D88945)
--wrap support has been improved. + If foo is not referenced, there is no longer an undefined symbol __wrap_foo. + If __real_foo is not referenced, there is no longer an undefined symbol foo.
SHF_LINK_ORDER sections can now have zero sh_link values.
SHF_LINK_ORDER and non-SHF_LINK_ORDER sections can now be mixed within an input section description. (D84001)
LOG2CEIL is now supported in linker scripts. (D84054)
DEFINED has been fixed to check whether the symbol is defined. (D83758)
An input section description may now have multiple SORT_*. The matched sections are ordered by radix sort with the keys being (SORT*, --sort-section, input order). (D91127)
Users can now provide a GNU style linker script to convert .ctors into .init_array. (D91187)
An empty output section can now be discarded even if it is assigned to a program header. (D92301)
Non-SHF_ALLOC sections now have larger file offsets than SHF_ALLOC sections. (D85867)
Some symbol versioning improvements. + Defined foo@@v1 now resolve undefined foo@v1 (D92259) + Undefined foo@v1 now gets an error (D92260)
The AArch64 port now has support for STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS. (D93045)
The AArch64 port now has support for R_AARCH64_LD64_GOTPAGE_LO15.
The PowerPC64 port now detects missing R_PPC64_TLSGD/R_PPC64_TLSLD and disables TLS relaxation. This allows linking with object files produced by very old IBM XL compilers. (D92959)
Many PowerPC PC-relative relocations are now supported.
R_PPC_ADDR24 and R_PPC64_ADDR16_HIGH are now supported.
powerpcle is now supported. Tested with FreeBSD loader and freestanding. (D93917)
RISC-V: the first SHT_RISCV_ATTRIBUTES section is now retained. (D86309)
LTO pipeline now defaults to the new PM if the CMake variable ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER is on. (D92885)
|
|
9.0.0:
Non-comprehensive list of changes in this release
ELF Improvements
ld.lld now has typo suggestions for flags: $ ld.lld --call-shared now prints unknown argument '--call-shared', did you mean '--call_shared'.
--allow-shlib-undefined and --no-allow-shlib-undefined options are added. --no-allow-shlib-undefined is the default for executables.
-nmagic and -omagic options are fully supported.
Segment layout has changed. PT_GNU_RELRO, which was previously placed in the middle of readable/writable PT_LOAD segments, is now placed at the beginning of them. This change permits lld-produced ELF files to be read correctly by GNU strip older than 2.31, which has a bug to discard a PT_GNU_RELRO in the former layout.
-z common-page-size is supported.
Diagnostics messages have improved. A new flag --vs-diagnostics alters the format of diagnostic output to enable source hyperlinks in Microsoft Visual Studio IDE.
Linker script compatibility with GNU BFD linker has generally improved.
The clang --dependent-library form of autolinking is supported.
This feature is added to implement the Windows-style autolinking for Unix. On Unix, in order to use a library, you usually have to include a header file provided by the library and then explicitly link the library with the linker -l option. On Windows, header files usually contain pragmas that list needed libraries. Compilers copy that information to object files, so that linkers can automatically link needed libraries. --dependent-library is added for implementing that Windows semantics on Unix.
AArch64 BTI and PAC are supported.
lld now supports replacing JAL with JALX instructions in case of MIPS-microMIPS cross-mode jumps.
lld now creates LA25 thunks for MIPS R6 code.
Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS segments.
The quality of RISC-V and PowerPC ports have greatly improved. Many applications can now be linked by lld. PowerPC64 is now almost production ready.
The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be linked by lld.
x86-64 TLSDESC is supported.
DF_STATIC_TLS flag is set for i386 and x86-64 when needed.
The experimental partitioning feature is added to allow a program to be split into multiple pieces.
The feature allows you to semi-automatically split a single program into multiple ELF files called “partitions”. Since all partitions share the same memory address space and don’t use PLT/GOT, split programs run as fast as regular programs.
With the mechanism, you can start a program only with a “main” partition and load remaining partitions on-demand. For example, you can split a web browser into a main partition and a PDF reader sub-partition and load the PDF reader partition only when a user tries to open a PDF file.
See the documentation for more information.
If “-” is given as an output filename, lld writes the final result to the standard output. Previously, it created a file “-” in the current directory.
-z ifunc-noplt option is added to reduce IFunc function call overhead in a freestanding environment such as the OS kernel.
Functions resolved by the IFunc mechanism are usually dispatched via PLT and thus slower than regular functions because of the cost of indirection. With -z ifunc-noplt, you can eliminate it by doing text relocations at load-time. You need a special loader to utilize this feature. This feature is added for the FreeBSD kernel but can be used by any operating systems.
--undefined-glob option is added. The new option is an extension to --undefined to take a glob pattern instead of a single symbol name.
COFF Improvements
Like the ELF driver, lld-link now has typo suggestions for flags.
lld-link now correctly reports duplicate symbol errors for object files that were compiled with /Gy.
lld-link now correctly reports duplicate symbol errors when several resource (.res) input files define resources with the same type, name and language. This can be demoted to a warning using /force:multipleres.
lld-link now rejects more than one resource object input files, matching link.exe. Previously, lld-link would silently ignore all but one. If you hit this: Don’t pass resource object files to the linker, instead pass res files to the linker directly. Don’t put resource files in static libraries, pass them on the command line.
Having more than two /natvis: now works correctly; it used to not work for larger binaries before.
Undefined symbols are now printed only in demangled form. Pass /demangle:no to see raw symbol names instead.
Several speed and memory usage improvements.
lld-link now supports resource object files created by GNU windres and MS cvtres, not only llvm-cvtres.
The generated thunks for delayimports now share the majority of code among thunks, significantly reducing the overhead of using delayimport.
IMAGE_REL_ARM{,64}_REL32 relocations are supported.
Range extension thunks for AArch64 are now supported, so lld can create large executables for Windows/ARM64.
The following flags have been added: /functionpadmin
WebAssembly Improvements
Imports from custom module names are supported.
Symbols that are in llvm.used are now exported by default.
Initial support for PIC and dynamic linking has landed.
wasm-ld now add __start_/__stop_ symbols for data sections.
wasm-ld now doesn’t report an error on archives without a symbol index.
The following flags have been added: --emit-relocs
MinGW Improvements
lld now correctly links crtend.o as the last object file, handling terminators for the sections such as .eh_frame properly, fixing DWARF exception handling with libgcc and gcc’s crtend.o.
lld now also handles DWARF unwind info generated by GCC, when linking with libgcc.
PDB output can be requested without manually specifying the PDB file name, with the new option -pdb= with an empty value to the option. (The old existing syntax -pdb <filename> was more cumbersome to use with an empty parameter value.)
--no-insert-timestamp option is added as an alias to /timestamp:0.
Many more GNU ld options are now supported, which e.g. allows the lld MinGW frontend to be called by GCC.
The following options are added: --exclude-all-symbols, --appcontainer, --undefined
|
|
8.0.0:
Non-comprehensive list of changes in this release
* The llvm-cov tool can now export lcov trace files using the -format=lcov option of the export command.
* The add_llvm_loadable_module CMake macro has been removed. The add_llvm_library macro with the MODULE argument now provides the same functionality. See Writing an LLVM Pass.
* For MinGW, references to data variables that might need to be imported from a dll are accessed via a stub, to allow the linker to convert it to a dllimport if needed.
* Added support for labels as offsets in .reloc directive.
* Support for precise identification of X86 instructions with memory operands, by using debug information. This supports profile-driven cache prefetching. It is enabled with the -x86-discriminate-memops LLVM Flag.
* Support for profile-driven software cache prefetching on X86. This is part of a larger system, consisting of: an offline cache prefetches recommender, AutoFDO tooling, and LLVM. In this system, a binary compiled with -x86-discriminate-memops is run under the observation of the recommender. The recommender identifies certain memory access instructions by their binary file address, and recommends a prefetch of a specific type (NTA, T0, etc) be performed at a specified fixed offset from such an instruction’s memory operand. Next, this information needs to be converted to the AutoFDO syntax and the resulting profile may be passed back to the compiler with the LLVM flag -prefetch-hints-file, together with the exact same set of compilation parameters used for the original binary. More information is available in the RFC.
* Windows support for libFuzzer (x86_64).
|