Commit 23d28bfe by Ian Lance Taylor Committed by Ian Lance Taylor

host-linux.c (linux_gt_pch_get_address): Add new name randomize_va_space for…

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
parent f8aa1785
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> 2005-08-01 Steven Bosscher <stevenb@suse.de>
* common.opt (flag_ipa_cp): Put in right place to maintain * common.opt (flag_ipa_cp): Put in right place to maintain
......
...@@ -114,8 +114,13 @@ linux_gt_pch_get_address (size_t size, int fd) ...@@ -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) if (TRY_EMPTY_VM_SPACE && addr == (void *) TRY_EMPTY_VM_SPACE)
return addr; return addr;
/* If we didn't, then we need to look to see if randomization is on. */ /* If we didn't, then we need to look to see if virtual address
f = fopen ("/proc/sys/kernel/exec-shield-randomize", "r"); 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; randomize_on = false;
if (f != NULL) if (f != NULL)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment