From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5153 invoked by alias); 11 Nov 2004 16:00:54 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 5128 invoked from network); 11 Nov 2004 16:00:47 -0000 Received: from unknown (HELO smtp-vbr8.xs4all.nl) (194.109.24.28) by sourceware.org with SMTP; 11 Nov 2004 16:00:47 -0000 Received: from oriel.xs4all.nl (oriel.xs4all.nl [80.126.13.125]) by smtp-vbr8.xs4all.nl (8.12.11/8.12.11) with ESMTP id iABG0k0Z080931 for ; Thu, 11 Nov 2004 17:00:47 +0100 (CET) (envelope-from peter.kourzanov@xs4all.nl) Received: from me (altair.cygnus.nl [192.168.0.7]) by oriel.xs4all.nl (Postfix) with SMTP id 5910512552 for ; Thu, 11 Nov 2004 17:00:46 +0100 (CET) Received: (nullmailer pid 21451 invoked by uid 1000); Thu, 11 Nov 2004 16:00:46 -0000 Date: Thu, 11 Nov 2004 16:00:00 -0000 To: binutils@sources.redhat.com Subject: Re: objcopy --set-section-flags .data=alloc,load,data,share Message-ID: <20041111160045.GR7593@altair.cygnus.nl> References: <1100168375.22757.ezmlm@sources.redhat.com> <20041111102549.GP7593@altair.cygnus.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: X-Virus-Scanned: by XS4ALL Virus Scanner X-SW-Source: 2004-11/txt/msg00190.txt.bz2 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: > 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 >