[lld] fb40a61 - [ELF][docs] Document "Output section type"

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 09:52:28 PST 2022


Author: Fangrui Song
Date: 2022-02-14T09:52:20-08:00
New Revision: fb40a61b2f44e88172e72db18b5c0a0a5de9e84c

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

LOG: [ELF][docs] Document "Output section type"

Added: 
    

Modified: 
    lld/docs/ELF/linker_script.rst

Removed: 
    


################################################################################
diff  --git a/lld/docs/ELF/linker_script.rst b/lld/docs/ELF/linker_script.rst
index af29996e92dd0..b94017b17158d 100644
--- a/lld/docs/ELF/linker_script.rst
+++ b/lld/docs/ELF/linker_script.rst
@@ -94,6 +94,15 @@ The presence of ``address`` can cause the condition unsatisfied. LLD will warn.
 GNU ld from Binutils 2.35 onwards will reduce sh_addralign so that
 sh_addr=0 (modulo sh_addralign).
 
+Output section type
+-------------------
+
+When an *OutputSection* *S* has ``(type)``, LLD will set ``sh_type`` or
+``sh_flags`` of *S*. ``type`` is one of:
+
+- ``NOLOAD``: set ``sh_type`` to ``SHT_NOBITS``.
+- ``COPY``, ``INFO``, ``OVERLAY``: clear the ``SHF_ALLOC`` bit in ``sh_flags``.
+
 Output section alignment
 ------------------------
 


        


More information about the llvm-commits mailing list