This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objcopy --set-section-flags .data=alloc,load,data,share


  Ian,

  I was suspecting this. Can you briefly explain what the "share"
section flag does in formats that support it? What I am trying to
achieve is a shared copy-on-write section, which I know I pretty
much impossible on standard UNIX but nevertheless... The idea is to
have the .data of one process be accessible from another process,
with copied-on-write pages notwithstanding. To do that, the kernel's
loader needs to distinguish these "copy-on-write shared" sections 
from normal ones, hence my question.

  Pjotr.


On Thu, Nov 11, 2004 at 10:21:48AM -0500, Ian Lance Taylor wrote:
> <peter.kourzanov@xs4all.nl> writes:
> 
> >   I've got a question about semantics of the "share" section flag
> > in objcopy. It seems not be documented anywhere and all links I
> > could google up refer to COFF binaries, with unexplained semantics
> > as well. Is there a possibility to mark a "shared" section in ELF,
> > so that OS's that need it can map the section as shared?
> 
> The "share" section flag can not be represented in ELF.
> 
> I'm not sure exactly what you mean by "map the section as shared," but
> the answer is probably no: there is no way to do that in ELF.  Note
> that typical ELF systems will automatically share read-only text
> segments.
> 
> Ian
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]