diff options
author | Magnus Damm <magnus@valinux.co.jp> | 2007-02-15 18:57:06 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-02-16 17:54:02 +0900 |
commit | f09cb6fb977e58e77054107e1df908bb18b92e86 (patch) | |
tree | e774a82b49a5b50b3f5b4bde964ce2c22d1202dc /kexec/arch/ppc64/crashdump-ppc64.c | |
parent | 40f4b56e54c3e42ef32189682a85bcdc1bf240f1 (diff) |
Keep alignment comment in elf code and use ELF_CORE_HEADER_ALIGN
Keep alignment comment in elf code and use ELF_CORE_HEADER_ALIGN
This patch puts back and extends the alignment comment in crashdump-elf.c
and adds a small check to make sure the arch-specific code aligns properly.
Instead of hardcoding 1024 we introduce ELF_CORE_HEADER_ALIGN.
The idea behind the alignment requirement is explained here:
http://lists.osdl.org/mailman/htdig/fastboot/2006-November/005147.html
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Vivek Goyal <vgoyal@in.ibm.com>
Removed trainling whitespace after "kilobytes,"
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc64/crashdump-ppc64.c')
-rw-r--r-- | kexec/arch/ppc64/crashdump-ppc64.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c index 66aa64a..9c0b621 100644 --- a/kexec/arch/ppc64/crashdump-ppc64.c +++ b/kexec/arch/ppc64/crashdump-ppc64.c @@ -344,13 +344,15 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, if (arch_options.core_header_type == CORE_TYPE_ELF64) { if (crash_create_elf64_headers(info, &elf_info64, crash_memory_range, nr_ranges, - &tmp, &sz, 1024) < 0) + &tmp, &sz, + ELF_CORE_HEADER_ALIGN) < 0) return -1; } else { if (crash_create_elf32_headers(info, &elf_info32, crash_memory_range, nr_ranges, - &tmp, &sz, 1024) < 0) + &tmp, &sz, + ELF_CORE_HEADER_ALIGN) < 0) return -1; } |