This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 1/3] ld: Orphan section documentation
On Wed, Feb 22, 2017 at 12:04:05AM +0000, Andrew Burgess wrote:
> Make more explicit mention of the fact that orphan sections cause a new
> output section to be created. Though this information is clearly
> implied in the manual it might not be clear enough.
> A user _might_ (incorrectly) think that orphan sections could be
> inserted into an existing output section.
> * ld.texinfo (Orphan Sections): Add more detail.
OK, with one change.
> ld/ld.texinfo | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
> diff --git a/ld/ld.texinfo b/ld/ld.texinfo
> index b128451..24504da 100644
> --- a/ld/ld.texinfo
> +++ b/ld/ld.texinfo
> @@ -5762,10 +5762,12 @@
> Orphan sections are sections present in the input files which
> are not explicitly placed into the output file by the linker
> script. The linker will still copy these sections into the
> -output file, but it has to guess as to where they should be
> -placed. The linker uses a simple heuristic to do this. It
> -attempts to place orphan sections after non-orphan sections of the
> -same attribute, such as code vs data, loadable vs non-loadable, etc.
> +output file, creating a new output section to hold the orphans,
s/a new output section/new output sections/
> +but it has to guess as to where the new output section should
> +be placed. The linker uses a simple heuristic to do this. It
> +attempts to place orphan sections after non-orphan sections of
> +the same attribute, such as code vs data, loadable vs
> +non-loadable, etc.
> If there is not enough room to do this then it places
> at the end of the file.
Australia Development Lab, IBM