[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f1fdb5b 1/4: Align stack bottom properly.
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master f1fdb5b 1/4: Align stack bottom properly. |
Date: |
Tue, 29 Aug 2017 17:58:55 -0400 (EDT) |
branch: master
commit f1fdb5bc575728bd6c9f13a18939d9c271a74e83
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Align stack bottom properly.
This is needed for gcc -Os -flto on x86-64 (Bug#28213).
* src/emacs.c (main): Align stack-bottom variable as a pointer,
since mark_memory requires this.
---
src/emacs.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/emacs.c b/src/emacs.c
index 0fec716..44f6285 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -672,7 +672,10 @@ close_output_streams (void)
int
main (int argc, char **argv)
{
- char stack_bottom_variable;
+ /* Variable near the bottom of the stack, and aligned appropriately
+ for pointers. */
+ void *stack_bottom_variable;
+
bool do_initial_setlocale;
bool dumping;
int skip_args = 0;
@@ -688,7 +691,7 @@ main (int argc, char **argv)
char *original_pwd = 0;
/* Record (approximately) where the stack begins. */
- stack_bottom = &stack_bottom_variable;
+ stack_bottom = (char *) &stack_bottom_variable;
#ifndef CANNOT_DUMP
dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0