bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12565] NOLOAD sections empty


From: jifl-bugzilla at jifvik dot org
Subject: [Bug ld/12565] NOLOAD sections empty
Date: Thu, 30 Jun 2011 21:25:15 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12565

--- Comment #12 from Jonathan Larmour <jifl-bugzilla at jifvik dot org> 
2011-06-30 21:24:57 UTC ---
(In reply to comment #6)
> 
> I have been looking at PR 12565, and I have to say that I do not 
> understand the linker's behaviour for NOLOAD sections on ELF based 
> targets.  What is the point of having a section that cannot be loaded 
> and that does not have any contents ?

For the avoidance of doubt, my example was for the case when it does have
contents. In which case there are various potential uses, such as for metadata
about an executable or object, but where that metadata may not be from an input
section defined with 'nobits' (or where you can't guarantee every input section
is). You can understand some more applications for it in linker scripts when
you consider compiling executables with -ffunction-sections -fdata-sections.

> Also, as far as I can see, this behaviour is not documented anywhere. 

It is documented in ld.texinfo in the 'Output Section Type' node:
@item NOLOAD
The section should be marked as not loadable, so that it will not be
loaded into memory when the program is run.

Jifl

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]