public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "LpSolit at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/95637] Read-only data assigned to `.sdata' rather than `.rodata' Date: Tue, 30 Jun 2020 00:05:10 +0000 [thread overview] Message-ID: <bug-95637-4-KxXnHQbbzz@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95637-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95637 --- Comment #6 from Maciej W. Rozycki <macro at orcam dot me.uk> --- Thanks WRT Ada clarification. Otherwise I don't think there's anything stopping a language definition from requiring an attempt to modify read-only data to be trapped as an exceptional condition, leaving it up to the implementation as to whether to use a hardware feature if available, or whether to rely purely on software mechanisms, such as manually validating pointers to ensure they refer to a location within the boundaries of a memory region designated for writable data before any dereference for the purpose of a write. For example the Linux kernel while it still supported the original 80386 processor used to manually validate kernel write accesses to user pages, because crippled hardware would not trap on kernel writes to read-only pages (this limitation was lifted with the CR0.WP bit from the 80486 on). From the Linux user ABI's point of view the solution was transparent.
prev parent reply other threads:[~2024-01-14 21:55 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-11 11:15 [Bug target/95637] New: " macro@linux-mips.org 2020-06-11 21:06 ` [Bug target/95637] " wilson at gcc dot gnu.org 2020-06-12 21:37 ` macro@linux-mips.org 2020-06-15 23:21 ` wilson at gcc dot gnu.org 2020-06-23 22:58 ` macro@linux-mips.org 2020-06-28 10:40 ` ebotcazou at gcc dot gnu.org 2020-06-30 0:05 ` LpSolit at gmail dot com [this message]
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=bug-95637-4-KxXnHQbbzz@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).