[lld-macho][nfc] Fix formatting in ld64-vs-lld.rst

This commit is contained in:
Jez Ng 2022-03-10 18:33:18 -05:00 committed by GitHub
parent ca808e8924
commit fc968bcba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,12 +4,12 @@ LD64 vs LLD-MACHO
This doc lists all significant deliberate differences in behavior between LD64 and LLD-MachO.
String literal deduplication
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
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 compare string literals via pointer
equality must be fixed to use value equality instead.
@ -20,13 +20,13 @@ them more compactly. This should not result in any meaningful semantic
difference.
``-no_deduplicate`` Flag
**********************
************************
- LD64:
* This turns off ICF (deduplication pass) in the linker.
- LLD
* This turns off ICF and string merging in the linker.
ObjC symbols treatment
ObjC Symbols Treatment
**********************
There are differences in how LLD and LD64 handle ObjC symbols loaded from archives.