From: Daisuke HATAYAMA <d.hatayama@jp.fujitsu.com>
To: mhiramat@redhat.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
jdike@addtoit.com, tony.luck@intel.com
Subject: Re: [RFC, PATCH 1/4] cleanup elf_core_dump(): remove ELF_CORE_EXTRA_* macro
Date: Wed, 16 Dec 2009 13:07:44 +0900 (JST) [thread overview]
Message-ID: <20091216.130744.183025994.d.hatayama@jp.fujitsu.com> (raw)
In-Reply-To: <4B27A7CD.1040008@redhat.com>
From: Masami Hiramatsu <mhiramat@redhat.com>
Subject: Re: [RFC, PATCH 1/4] cleanup elf_core_dump(): remove ELF_CORE_EXTRA_* macro
Date: Tue, 15 Dec 2009 10:14:21 -0500
> Daisuke HATAYAMA wrote:
> > elf_core_dump() uses #ifdef and the corresponding macro for hiding
> > _multiline_ logics in functions. This patch removes #ifdef and
> > replaces ELF_CORE_EXTRA_* by corresponding functions. For
> > architectures not implemeonting ELF_CORE_EXTRA_*, we use weak
> > functions in order to reduce a range of modification.
> >
> > This cleanup is for my next patches, but I think this cleanup itself
> > is worth doing regardless of my firnal purpose.
> >
> > Signed-off-by: Daisuke HATAYAMA <d.hatayama@jp.fujitsu.com>
> > ---
> > arch/ia64/kernel/Makefile | 2 +
> > arch/ia64/kernel/elfcore.c | 75 ++++++++++++++++++++++++++++++++++++++++++
> > arch/um/sys-i386/Makefile | 2 +
> > arch/um/sys-i386/elfcore.c | 78 ++++++++++++++++++++++++++++++++++++++++++++
> > fs/binfmt_elf.c | 36 +++++++++++++++-----
> > include/linux/elf.h | 2 +
>
> Hmm, why don't you remove ELF_CORE_EXTRA_* macros too??
> And also, you have to update fs/binfmt_elf_fdpic.c too.
>
> Thank you,
The reason relates to the fact that elf_core_extra_* functions for
architectures with no extra data are defined as the weak ones. As I've
written in the patch description, they are useful to reduce a range of
modification.
If I modify fs/binfmt_elf.c, I need to prepare another file in order
for binfmt_elf{,_fdpic}.c to share the weak functions. (Now the week
functions are defined in fs/binfmt_elf.c.)
The problem is that I don't know where to put new file elfcore.c for
weak functions. I am not familiar with such convension.
For example, is it right to put fs/elfcore.c or kernel/elfcore.c?
Thanks.
prev parent reply other threads:[~2009-12-16 4:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 2:41 Daisuke HATAYAMA
2009-12-15 7:58 ` Américo Wang
2009-12-16 2:23 ` Daisuke HATAYAMA
2009-12-15 14:05 ` Andi Kleen
2009-12-15 15:14 ` Masami Hiramatsu
2009-12-16 4:07 ` Daisuke HATAYAMA [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091216.130744.183025994.d.hatayama@jp.fujitsu.com \
--to=d.hatayama@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®