* [PATCH] binfmt_elf: allow mips to overrid e_flags
@ 2005-01-16 11:47 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2005-01-16 11:47 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
arch/mips/kernel/binfmt_elfn32.c needs to override e_flags for elf
coredumps. It already defines ELF_CORE_EFLAGS before including
binfmt_elf.c, but the latter doesn't pick up the define yet.
--- 1.98/fs/binfmt_elf.c 2005-01-12 03:07:01 +01:00
+++ edited/fs/binfmt_elf.c 2005-01-16 11:54:37 +01:00
@@ -69,6 +69,10 @@
# define ELF_MIN_ALIGN PAGE_SIZE
#endif
+#ifndef ELF_CORE_EFLAGS
+#define ELF_CORE_EFLAGS 0
+#endif
+
#define ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(ELF_MIN_ALIGN-1))
#define ELF_PAGEOFFSET(_v) ((_v) & (ELF_MIN_ALIGN-1))
#define ELF_PAGEALIGN(_v) (((_v) + ELF_MIN_ALIGN - 1) & ~(ELF_MIN_ALIGN - 1))
@@ -1172,7 +1176,7 @@
elf->e_entry = 0;
elf->e_phoff = sizeof(struct elfhdr);
elf->e_shoff = 0;
- elf->e_flags = 0;
+ elf->e_flags = ELF_CORE_EFLAGS;
elf->e_ehsize = sizeof(struct elfhdr);
elf->e_phentsize = sizeof(struct elf_phdr);
elf->e_phnum = segs;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-16 11:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-16 11:47 [PATCH] binfmt_elf: allow mips to overrid e_flags Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox