From b3366453d847404bcaed6ce61b714cc9d1050498 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Fri, 6 Jul 2007 02:39:49 -0700 Subject: [PATCH] --- yaml --- r: 58220 b: refs/heads/master c: ef7320edb1dd2cf6c969d1dcef4a9499a42f24da h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/binfmt_elf.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ae2e09000e9c..04b1da6e0cce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e8767dddf3ad863a7013c334392e09177b48e2c +refs/heads/master: ef7320edb1dd2cf6c969d1dcef4a9499a42f24da diff --git a/trunk/fs/binfmt_elf.c b/trunk/fs/binfmt_elf.c index fa8ea33ab0be..08e4414b8374 100644 --- a/trunk/fs/binfmt_elf.c +++ b/trunk/fs/binfmt_elf.c @@ -1499,6 +1499,9 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) #endif int thread_status_size = 0; elf_addr_t *auxv; +#ifdef ELF_CORE_WRITE_EXTRA_NOTES + int extra_notes_size; +#endif /* * We no longer stop all VM operations. @@ -1628,7 +1631,8 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) sz += thread_status_size; #ifdef ELF_CORE_WRITE_EXTRA_NOTES - sz += ELF_CORE_EXTRA_NOTES_SIZE; + extra_notes_size = ELF_CORE_EXTRA_NOTES_SIZE; + sz += extra_notes_size; #endif fill_elf_note_phdr(&phdr, sz, offset); @@ -1674,6 +1678,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) #ifdef ELF_CORE_WRITE_EXTRA_NOTES ELF_CORE_WRITE_EXTRA_NOTES; + foffset += extra_notes_size; #endif /* write out the thread status notes section */