[Top][All Lists]

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

[Bug ld/12565] NOLOAD sections empty

From: nickc at redhat dot com
Subject: [Bug ld/12565] NOLOAD sections empty
Date: Fri, 1 Jul 2011 13:10:51 +0000


--- Comment #18 from Nick Clifton <nickc at redhat dot com> 2011-07-01 13:10:20 
UTC ---
Hi Ian,

> If you look in the libgloss linker scripts you will see a bunch of uses
> of NOLOAD.
> I'm not sure whether any of them are really necessary, but they are
> certainly there.

Apart from a few .bss sections and one target which uses them to get the 
addresses of its hardware I/O ports, all of the rest are for debugging 
sections.  Which brings us back to the original point of this PR.  In 
theory it makes sense to mark debug sections as NOLOAD, since you do not 
need them in the running executable.  But, for ELF based targets, this 
must not be done because NOLOAD will also obliterate their contents on disk.

Maybe we need a new ELF section type, eg SHT_GNU_NOLOAD, which can be 
used to mark sections which *do* have contents on disk but which should 
not be loaded into running memory.  Or maybe we could use SHT_NOTE instead.

At the moment the linker identifies debugging sections by their name and 
arranges for them to be excluded from any loadable segments.  But it 
would be much cleaner if we could just examine the section type and if 
it was SHT_GNU_NOLOAD then decide not to map it to a loadable segment.


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]