aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2011-07-14 19:09:27 -0700
committerRoland McGrath <roland@hack.frob.com>2011-07-14 19:09:27 -0700
commit9fa2c03227e159050e9dc4ec1e315e5909901580 (patch)
tree88b205ce926259885826bd312cfbc3514546cb57 /configure
parentdefe906180bad4e356bb55b60b10abd41b7ee3a1 (diff)
downloadglibc-9fa2c03227e159050e9dc4ec1e315e5909901580.tar
glibc-9fa2c03227e159050e9dc4ec1e315e5909901580.tar.gz
glibc-9fa2c03227e159050e9dc4ec1e315e5909901580.tar.bz2
glibc-9fa2c03227e159050e9dc4ec1e315e5909901580.zip
Adjust relro test to work around GNU ld limitations.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index d44659bb2c..2568345f48 100755
--- a/configure
+++ b/configure
@@ -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