mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
Adjust relro test to work around GNU ld limitations.
This commit is contained in:
parent
defe906180
commit
9fa2c03227
@ -1,3 +1,9 @@
|
||||
2011-07-14 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* configure.in (-z relro check): Adjust test code to add a large
|
||||
writable data section after it.
|
||||
* configure: Regenerated.
|
||||
|
||||
2011-07-11 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* configure.in (-z relro check): Fix test code to make the variable
|
||||
|
7
configure
vendored
7
configure
vendored
@ -6404,7 +6404,14 @@ else
|
||||
|
||||
int _start (void) { return 42; }
|
||||
extern void _exit (int);
|
||||
/* Since these pointers are const, they should go in rodata.
|
||||
Since they refer to functions that have to be resolved by
|
||||
dynamic linking, they should instead go in RELRO data. */
|
||||
const void *const relro[] = { &_start, &_exit, 0 };
|
||||
/* GNU ld fails to produce RELRO data when it's very small and there is no
|
||||
normal writable data following it, or if only uninitialized (.bss) data
|
||||
follows it, or only very small writable data. */
|
||||
int data[0x10000] = { 1, };
|
||||
|
||||
_ACEOF
|
||||
cat > conftest.awk <<\EOF
|
||||
|
@ -1607,7 +1607,14 @@ EOF
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
int _start (void) { return 42; }
|
||||
extern void _exit (int);
|
||||
/* Since these pointers are const, they should go in rodata.
|
||||
Since they refer to functions that have to be resolved by
|
||||
dynamic linking, they should instead go in RELRO data. */
|
||||
const void *const relro[] = { &_start, &_exit, 0 };
|
||||
/* GNU ld fails to produce RELRO data when it's very small and there is no
|
||||
normal writable data following it, or if only uninitialized (.bss) data
|
||||
follows it, or only very small writable data. */
|
||||
int data[0x10000] = { 1, };
|
||||
]])])
|
||||
cat > conftest.awk <<\EOF
|
||||
BEGIN {
|
||||
|
Loading…
Reference in New Issue
Block a user