Specifying Segment Attributes
Daniel Jacobowitz
drow@false.org
Tue Aug 30 00:51:00 GMT 2005
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
More information about the Binutils
mailing list