Specifying Segment Attributes

Nick Clifton nickc@redhat.com
Tue Aug 30 09:47:00 GMT 2005


Hi Prasad,

> 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 ?

How about using memory regions ?  If you decide that the shared memory 
will always start at a specific, high address you could create a MEMORY 
region to describe this, and then assign any sections in the input files 
that need to go into shared memory to this region.

Cheers
   Nick




More information about the Binutils mailing list