Commit 4cc2f7a8 authored by Paul Brook's avatar Paul Brook Committed by Russell King

[ARM] 4074/1: Flat loader stack alignment

The ARM EABI requires doubleword (8-byte) stack alignment at all public entry
points.  The patch below makes the bFLT loader honour this.
It's always safe to start with a doubleword aligned stack so it doesn't seem
worth making this conditional on CONFIG_AEABI.

Paul
Signed-off-by: default avatarPaul Brook <paul@codesourcery.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 431d2cd9
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
#ifndef __ARM_FLAT_H__ #ifndef __ARM_FLAT_H__
#define __ARM_FLAT_H__ #define __ARM_FLAT_H__
#define flat_stack_align(sp) /* nothing needed */ /* An odd number of words will be pushed after this alignment, so
deliberately misalign the value. */
#define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4)
#define flat_argvp_envp_on_stack() 1 #define flat_argvp_envp_on_stack() 1
#define flat_old_ram_flag(flags) (flags) #define flat_old_ram_flag(flags) (flags)
#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) #define flat_reloc_valid(reloc, size) ((reloc) <= (size))
......
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