This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Specifying Segment Attributes
- From: Daniel Jacobowitz <drow at false dot org>
- To: Prasad Venkata Boddupalli <bprasad at CS dot Arizona dot EDU>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 29 Aug 2005 20:50:44 -0400
- Subject: Re: Specifying Segment Attributes
- References: <Pine.GSO.4.58.0508291209020.19278@lectura.CS.Arizona.EDU>
On Mon, Aug 29, 2005 at 12:25:22PM -0700, Prasad Venkata Boddupalli wrote:
> Hello,
>
> I am writing a loader for a multi-threaded processor in which multiple
> instances of an application run on different threads. Multiple
> instances, besides their data segments mapped to a different physical
> location also have a shared memory. The loader needs to recognize this
> shared segment in the elf-executable. From the elf specification and the
> linker script command language, I realized that one of the ways of
> specifying the segment attribute as 'shared' is to use the 'PHDRS' command
> and specify the attribute as part of the 'flags' of that segment.
>
> Is there any other way as the use of PHDRS command will force one to
> describe all segments ?
Not without changing the linker.
>From something I sent to Ian last week, off list, so increment the
"third":
> This is the third time in the last couple of weeks that I've felt we
> needed a mechanism to add an additional program header explicitly:
> give it a name, add one to the number estimated by SIZEOF_HEADERS,
> allow sections to be assigned to it... do you think it could be
> feasibly implemented? I haven't looked at the magic behind
> SIZEOF_HEADERS.
>
> But making folks define PHDRS manually when they really just want to
> extend it is a real nuisance.
Ian made some other suggestions, that I'll let him share if he wants
to, but I'm still attached to mine :-)
--
Daniel Jacobowitz
CodeSourcery, LLC