tech-toolchain archive

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

Re: ELF sections vs. segments

On Thu, Jan 19, 2017 at 07:02:15PM +0300, Valery Ushakov wrote:
 > Normally, it doesn't matter, as there's a note segment for each note
 > section.  However I'm playing with a forth system that cross-compiles
 > and writes out its own ELF image and that standalone image only has
 > segments, but no sections.
 > I'm inclined to think that a standalone ELF binary should be able to
 > get away with this kind of arrangement.  Sections are for linkers,
 > segments are for loaders.  The binary is intended to be loaded, so it
 > provides info about its segments and that should be enough.
 > Comments?  Shall we fix the check to look for note segments?

Sounds reasonable to me. The point of having a second table of
segments is so program loaders don't have to wade through sections.

David A. Holland

Home | Main Index | Thread Index | Old Index