summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2008-10-21 06:32:39 +0000
committerJan Djärv <jan.h.d@swipnet.se>2008-10-21 06:32:39 +0000
commitfd75ddb283632c593665a345df194ff2f0a40a72 (patch)
treea99462def4a12f2dd2af685ad3e72c8e29302307
parent279299b0b11e075720b593e1fae5bf3a48dfd3f3 (diff)
(main): Unconditionally set PER_LINUX32 and exec
temacs when dumping if HAVE_PERSONALITY_LINUX32 is defined
-rw-r--r--src/ChangeLog5
-rw-r--r--src/emacs.c27
2 files changed, 16 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 64b988e7de..ea52334bb0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-21 Jan Djärv <jan.h.d@swipnet.se>
+
+ * emacs.c (main): Unconditionally set PER_LINUX32 and exec
+ temacs when dumping if HAVE_PERSONALITY_LINUX32 is defined
+
2008-10-21 Kenichi Handa <handa@m17n.org>
* coding.c (detect_coding_charset): For iso-8859-* coding systems,
diff --git a/src/emacs.c b/src/emacs.c
index 56ddb73343..4712e9c1d0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -212,8 +212,8 @@ static void *my_heap_start;
/* The gap between BSS end and heap start as far as we can tell. */
static unsigned long heap_bss_diff;
-/* If the gap between BSS end and heap start is larger than this we try to
- work around it, and if that fails, output a warning in dump-emacs. */
+/* If the gap between BSS end and heap start is larger than this
+ output a warning in dump-emacs. */
#define MAX_HEAP_BSS_DIFF (1024*1024)
@@ -861,29 +861,24 @@ main (int argc, char **argv)
}
#ifdef HAVE_PERSONALITY_LINUX32
- /* See if there is a gap between the end of BSS and the heap.
- In that case, set personality and exec ourself again. */
if (!initialized
&& (strcmp (argv[argc-1], "dump") == 0
|| strcmp (argv[argc-1], "bootstrap") == 0)
- && heap_bss_diff > MAX_HEAP_BSS_DIFF)
+ && ! getenv ("EMACS_HEAP_EXEC"))
{
- if (! getenv ("EMACS_HEAP_EXEC"))
- {
- /* Set this so we only do this once. */
- putenv("EMACS_HEAP_EXEC=true");
+ /* Set this so we only do this once. */
+ putenv("EMACS_HEAP_EXEC=true");
- /* A flag to turn off address randomization which is introduced
- in linux kernel shipped with fedora core 4 */
+ /* A flag to turn off address randomization which is introduced
+ in linux kernel shipped with fedora core 4 */
#define ADD_NO_RANDOMIZE 0x0040000
- personality (PER_LINUX32 | ADD_NO_RANDOMIZE);
+ personality (PER_LINUX32 | ADD_NO_RANDOMIZE);
#undef ADD_NO_RANDOMIZE
- execvp (argv[0], argv);
+ execvp (argv[0], argv);
- /* If the exec fails, try to dump anyway. */
- perror ("execvp");
- }
+ /* If the exec fails, try to dump anyway. */
+ perror ("execvp");
}
#endif /* HAVE_PERSONALITY_LINUX32 */