diff options
author | Paul Brook <paul@codesourcery.com> | 2006-12-27 19:54:16 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-30 12:05:08 -0500 |
commit | 4cc2f7a84d64d25a16bb9383148c1467284e2356 (patch) | |
tree | 17b128620d6b6fd4633791ac0461ae7725527f1c /include | |
parent | 431d2cd99f9721ad09f859dc65895f30385cc5c6 (diff) |
[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: Paul Brook <paul@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/flat.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-arm/flat.h b/include/asm-arm/flat.h index 966946478589..16f5375e57b8 100644 --- a/include/asm-arm/flat.h +++ b/include/asm-arm/flat.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #ifndef __ARM_FLAT_H__ | 5 | #ifndef __ARM_FLAT_H__ |
6 | #define __ARM_FLAT_H__ | 6 | #define __ARM_FLAT_H__ |
7 | 7 | ||
8 | #define flat_stack_align(sp) /* nothing needed */ | 8 | /* An odd number of words will be pushed after this alignment, so |
9 | deliberately misalign the value. */ | ||
10 | #define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4) | ||
9 | #define flat_argvp_envp_on_stack() 1 | 11 | #define flat_argvp_envp_on_stack() 1 |
10 | #define flat_old_ram_flag(flags) (flags) | 12 | #define flat_old_ram_flag(flags) (flags) |
11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |