This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: PATCH: Increase the size of .data.rel section for -z relro check


On Mon, Jul 11, 2011 at 4:14 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> "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 tried it and it failed for -m32, -m64 and -mx32 with GCC 4.7.0.

> 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.
>

I will let you know when I figure out why it happens.


-- 
H.J.


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