Skip to content

Commit fb40a61

Browse files
committed
[ELF][docs] Document "Output section type"
1 parent b8ae323 commit fb40a61

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lld/docs/ELF/linker_script.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ The presence of ``address`` can cause the condition unsatisfied. LLD will warn.
9494
GNU ld from Binutils 2.35 onwards will reduce sh_addralign so that
9595
sh_addr=0 (modulo sh_addralign).
9696

97+
Output section type
98+
-------------------
99+
100+
When an *OutputSection* *S* has ``(type)``, LLD will set ``sh_type`` or
101+
``sh_flags`` of *S*. ``type`` is one of:
102+
103+
- ``NOLOAD``: set ``sh_type`` to ``SHT_NOBITS``.
104+
- ``COPY``, ``INFO``, ``OVERLAY``: clear the ``SHF_ALLOC`` bit in ``sh_flags``.
105+
97106
Output section alignment
98107
------------------------
99108

0 commit comments

Comments
 (0)