PATCH: Increase the size of .data.rel section for -z relro check
Roland McGrath
roland@hack.frob.com
Tue Jul 12 15:47:00 GMT 2011
> "z relro" check is very sentive to the size of .data.rel section.
> This patch increases the size of .data.rel section to make it more
> reliable. It is needed for x32 port, which I will submit later.
Please elaborate on what goes wrong with the test.
> -const void *relro[] = { &_start, &_exit, 0 };
> +const void *relro[] = { &_start, &_exit, 0, 0 };
I just noticed that this should be:
const void *const relro[] = { &_start, &_exit, 0 };
so that it really goes into .rodata modulo relocation, which is what I was
intending to test. As I had it, this is just in writable data anyway, so
it's not telling us anything about RELRO support.
I'll commit this later tonight when I'm where it's convenient to do it.
If the test still fails in your configuration with this fix, please
elaborate on why what's so and what the size of the section has to do with
it.
Thanks,
Roland
More information about the Libc-alpha
mailing list