diff options
author | Ian Lance Taylor <ian@airs.com> | 2005-08-01 17:43:33 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2005-08-01 17:43:33 +0000 |
commit | 23d28bfe80ebd227936d746e9e4f25afc28c8fb2 (patch) | |
tree | c4411d4993536a1c67ccc6be5091ab905b2fcdba | |
parent | f8aa1785b6ec4cbe2bc10607909bb4b9e18de836 (diff) | |
download | gcc-23d28bfe80ebd227936d746e9e4f25afc28c8fb2.zip gcc-23d28bfe80ebd227936d746e9e4f25afc28c8fb2.tar.gz gcc-23d28bfe80ebd227936d746e9e4f25afc28c8fb2.tar.bz2 |
host-linux.c (linux_gt_pch_get_address): Add new name randomize_va_space for virtual address randomization control.
* config/host-linux.c (linux_gt_pch_get_address): Add new name
randomize_va_space for virtual address randomization control.
From-SVN: r102636
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/host-linux.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 297fca1..042da86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-08-01 Ian Lance Taylor <ian@airs.com> + + * config/host-linux.c (linux_gt_pch_get_address): Add new name + randomize_va_space for virtual address randomization control. + 2005-08-01 Steven Bosscher <stevenb@suse.de> * common.opt (flag_ipa_cp): Put in right place to maintain diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c index a1ec046..795bb55 100644 --- a/gcc/config/host-linux.c +++ b/gcc/config/host-linux.c @@ -114,8 +114,13 @@ linux_gt_pch_get_address (size_t size, int fd) if (TRY_EMPTY_VM_SPACE && addr == (void *) TRY_EMPTY_VM_SPACE) return addr; - /* If we didn't, then we need to look to see if randomization is on. */ - f = fopen ("/proc/sys/kernel/exec-shield-randomize", "r"); + /* If we didn't, then we need to look to see if virtual address + randomization is on. That is recorded in + kernel.randomize_va_space. An older implementation used + kernel.exec-shield-randomize. */ + f = fopen ("/proc/sys/kernel/randomize_va_space", "r"); + if (f == NULL) + f = fopen ("/proc/sys/kernel/exec-shield-randomize", "r"); randomize_on = false; if (f != NULL) { |