unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: GNU C Library <libc-alpha@sourceware.org>, GCC <gcc@gcc.gnu.org>,
	Binutils <binutils@sourceware.org>
Subject: Run (some?) ELF constructors after applying RELRO protection
Date: Tue, 27 Feb 2018 11:01:23 +0100	[thread overview]
Message-ID: <255b0226-8eb1-93f1-280d-ed004e52ca0e@redhat.com> (raw)

I think it would be a nice addition to the toolchain if it were possible 
to programatically initialize data in the RELRO section.  We do this in 
glibc, but I don't think this is currently supported for general use.

One important application is to allocate a memory region with mmap, on 
which protection flags can be changed as needed.  This way, the 
application can have a read-only path to its own configuration data, for 
example.

Do you think this would be worthwhile to implement?  Any suggestions how 
we should do it, without needing binutils/GCC/glibc updates?

Thanks,
Florian


             reply	other threads:[~2018-02-27  9:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 10:01 Florian Weimer [this message]
2018-06-11 14:50 ` Run (some?) ELF constructors after applying RELRO protection Rich Felker
2018-06-11 17:50   ` Florian Weimer
2018-06-11 18:59     ` Rich Felker
2018-07-05 19:49       ` Florian Weimer

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=255b0226-8eb1-93f1-280d-ed004e52ca0e@redhat.com \
    --to=fweimer@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=libc-alpha@sourceware.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: 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).