This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Run (some?) ELF constructors after applying RELRO protection
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>, GCC <gcc at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>
- Date: Tue, 27 Feb 2018 11:01:23 +0100
- Subject: Run (some?) ELF constructors after applying RELRO protection
- Authentication-results: sourceware.org; auth=none
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