+#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)
+ {
+ if (! getenv ("EMACS_HEAP_EXEC"))
+ {
+ /* 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 */
+#define ADD_NO_RANDOMIZE 0x0040000
+ personality (PER_LINUX32 | ADD_NO_RANDOMIZE);
+#undef ADD_NO_RANDOMIZE
+
+ execvp (argv[0], argv);
+
+ /* If the exec fails, try to dump anyway. */
+ perror ("execvp");
+ }
+ }
+#endif /* HAVE_PERSONALITY_LINUX32 */
+
+