Skip to content

Commit

Permalink
[ELF][docs] Document "Output section type"
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Feb 14, 2022
1 parent b8ae323 commit fb40a61
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lld/docs/ELF/linker_script.rst
Expand Up @@ -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
------------------------

Expand Down

0 comments on commit fb40a61

Please sign in to comment.