This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Run (some?) ELF constructors after applying RELRO protection


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]