https://maskray.me/blog/2022-02-06-all-about-common-symbols#no-define-common In GNU ld, -dc only affects -r links and causes COMMON symbols to be allocated. --no-define-common is defined to make COMMON symbols undefined for -shared. AIUI --no-define-common is a workaround around glibc 2.1 time and not really useful. gold confuses --define-common with -d/FORCE_COMMON_ALLOCATION and implements --define-common with -d semantics. Its --no-define-common is incompatible with GNU ld. In ld.lld, b2a23cf3c08cee45614f27eb2c6d044e506aa6a6 fixed the default -r behavior for COMMON symbols but ported the incompatible gold --[no-]define-common. To the best of my knowledge, no project uses -dp --[no-]define-common. So just remove these options. -d/-dc are used by the following projects: * grub grub-core/genmod.sh.in uses -Wl,-r,-d (https://lists.gnu.org/archive/html/grub-devel/2022-02/msg00088.html) * FreeBSD crunchgen uses -Wl,-dc (https://reviews.freebsd.org/D34215) A no-op implementation works for them. Only when a program inspects relocatable output by itself and does not recognize COMMON symbols, there may be a problem. This is an extremely unlikely case. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D119108
54 lines
1.1 KiB
ReStructuredText
54 lines
1.1 KiB
ReStructuredText
===========================
|
|
lld |release| Release Notes
|
|
===========================
|
|
|
|
.. contents::
|
|
:local:
|
|
|
|
.. only:: PreRelease
|
|
|
|
.. warning::
|
|
These are in-progress notes for the upcoming LLVM |release| release.
|
|
Release notes for previous releases can be found on
|
|
`the Download Page <https://releases.llvm.org/download.html>`_.
|
|
|
|
Introduction
|
|
============
|
|
|
|
This document contains the release notes for the lld linker, release |release|.
|
|
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 <https://llvm.org/releases/>`_.
|
|
|
|
Non-comprehensive list of changes in this release
|
|
=================================================
|
|
|
|
ELF Improvements
|
|
----------------
|
|
|
|
Breaking changes
|
|
----------------
|
|
|
|
* The GNU ld incompatible ``--no-define-common`` has been removed.
|
|
* The obscure ``-dc``/``-dp`` options have been removed.
|
|
* ``-d`` is now ignored.
|
|
|
|
COFF Improvements
|
|
-----------------
|
|
|
|
* ...
|
|
|
|
MinGW Improvements
|
|
------------------
|
|
|
|
* ...
|
|
|
|
MachO Improvements
|
|
------------------
|
|
|
|
* Item 1.
|
|
|
|
WebAssembly Improvements
|
|
------------------------
|
|
|