From: Suprateeka R Hegde <hegdesmailbox@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
Cary Coutant <ccoutant@gmail.com>,
James Y Knight <jyknight@google.com>
Cc: gnu-gabi@sourceware.org
Subject: Re: gABI extension proposal: PT_SHMMAP
Date: Sun, 01 Jan 2017 00:00:00 -0000 [thread overview]
Message-ID: <bb58c4b7-8238-e19c-e8df-70c75f27ef3f@gmail.com> (raw)
In-Reply-To: <491ac00d-e12b-746a-7b31-27726d659d8e@zytor.com>
On 09-Jun-2017 02:33 AM, H. Peter Anvin wrote:
>
> SHF_NOREAD makes total sense
Yes but under processor specific extensions. Not generally.
>> 5. Why dont we try to fit this proposal under the bigger one - program
>> properties - proposed by H.J. ? The theme there is to pass such
>> information to runtime.
>
> I think this is completely orthogonal - that would be a program property
> rather than a per-segment property?
H.J's design, as far as I remember, was extensible to accommodate such
handshakes between linker and loader. I may be wrong though.
> So, a slightly refined proposal (if these numbers conflict with newer
> allocations/proposals please let me know):
>
>
> 0x00000008 (2^3) - PF_SHARED
>
> This segment MUST be memory-mapped using MAP_SHARED. Not
> all operating systems need to support this capability. If this
> is not possible due to lack of operating system support or
> because the underlying image is not possible to memory-map,
> the loading of the image should be aborted with an error.
This is the reason I said it should be OS specific. The above definition
itself is so attached to OS support.
It would make sense to make it part of a generic standard when:
1. There are different loaders provided by different vendors for the same OS
2. (Hypothetically) A loader on one OS is expected to handle/load an ELF
produced by a linker from another OS.
> 0x00001000 (2^12) - SHF_SHARED
>
> This section MUST be made part of a PF_SHARED segment when
> linked.
This again is not complete. A non-ambiguous standard should also tell is
it necessary for a gABI compliant ELF linker to mark sections that go
into shared segments, as SHF_SHARED? Similarly, is it necessary for a
gABI compliant linker to mark PT_LOAD that gets shared, as PF_SHARED?
> OPTIONALLY, new reserved section names:
>
> .shrodata - readonly data section to be mapped shared
> .shdata - writable data section to be mapped shared
> .shbss - zerofill section to be mapped shared
IMHO, these are so trivial that it is only worth to be done under a tool
chain specific option. These are not at all useful in general.
That said,
1. Send the proposal to Generic SYS-V ABI group. Lets see the consensus.
2. I may have to object this if the standards mandates that a gABI
compliant linker *MUST* mark PF_SHARED to mean PT_LOAD as sharable. I am
absolutely fine if marking PF_SHARED is optional -- I will not do it on
HP-UX.
--
Supra
next prev parent reply other threads:[~2017-06-09 13:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-01 0:00 H. Peter Anvin
2017-01-01 0:00 ` James Y Knight via gnu-gabi
2017-01-01 0:00 ` Cary Coutant
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H. Peter Anvin
2017-01-01 0:00 ` Suprateeka R Hegde [this message]
2017-01-01 0:00 ` H. Peter Anvin
2017-01-01 0:00 ` Cary Coutant
2017-01-01 0:00 ` hpa
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb58c4b7-8238-e19c-e8df-70c75f27ef3f@gmail.com \
--to=hegdesmailbox@gmail.com \
--cc=ccoutant@gmail.com \
--cc=gnu-gabi@sourceware.org \
--cc=hpa@zytor.com \
--cc=jyknight@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).