[lld] ef95d45 - [lld-macho] Mention string literal deduplication as a difference from ld64

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 16:31:05 PST 2022


Author: Jez Ng
Date: 2022-01-19T16:30:52-08:00
New Revision: ef95d45138ec35d47feff287f3c1e0ca71e49306

URL: https://github.com/llvm/llvm-project/commit/ef95d45138ec35d47feff287f3c1e0ca71e49306
DIFF: https://github.com/llvm/llvm-project/commit/ef95d45138ec35d47feff287f3c1e0ca71e49306.diff

LOG: [lld-macho] Mention string literal deduplication as a difference from ld64

Reviewed By: keith

Differential Revision: https://reviews.llvm.org/D117250

Added: 
    

Modified: 
    lld/MachO/ld64-vs-lld.rst

Removed: 
    


################################################################################
diff  --git a/lld/MachO/ld64-vs-lld.rst b/lld/MachO/ld64-vs-lld.rst
index d40c5a4196666..246481a8f2315 100644
--- a/lld/MachO/ld64-vs-lld.rst
+++ b/lld/MachO/ld64-vs-lld.rst
@@ -4,6 +4,15 @@ LD64 vs LLD-MACHO
 
 This doc lists all significant deliberate 
diff erences in behavior between LD64 and LLD-MachO.
 
+String literal deduplication
+****************************
+LD64 always deduplicates string literals. LLD only does it when the `--icf=` or
+the `--deduplicate-literals` flag is passed. Omitting deduplication by default
+ensures that our link is as fast as possible. However, it may also break some
+programs which have (incorrectly) relied on string deduplication always
+occurring. In particular, programs which compared string literals via pointer
+equality must be fixed to use value equality instead.
+
 ``-no_deduplicate`` Flag
 **********************
 - LD64:


        


More information about the llvm-commits mailing list