From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Arch <linux-arch@vger.kernel.org>,
Al Viro <viro@ftp.linux.org.uk>
Subject: Re: [PATCH] cross-architecture ELF clean up
Date: Tue, 26 Jun 2007 15:29:01 -0400 [thread overview]
Message-ID: <468168FD.1080200@goop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0706251531110.4386@scrub.home>
Roman Zippel wrote:
>> This patch cleans up the ELF headers and their users. It does several
>> related things:
>>
>> 1. split linux/elf.h into pieces
>>
>> This splits linux/elf.h into several pieces:
>> linux/elf.h - still the common elf header,
>> functionally unchanged
>> linux/elf-const.h - ELF constants, includable by asm code
>>
>
> We have the __ASSEMBLY__ define for this, so just for asm code we don't
> need a separate header.
>
Hm. The number of __ASSEMBLY__s end up being pretty large, and it just
seemed cleaner to put them in separate headers.
>> linux/elf-decl.h - ELF type declarations, without definitions
>> linux/elf-defn.h - ELF type definitions
>>
>
> What's the point in splitting these two?
>
Because there are other headers which just need some type
forward-declarations, and don't need the whole set of ELF types
defined. In particular, linux/module.h - which is included all over the
place in the kernel - needs a couple of ELF types declared, and
including it all over the place is just a waste. Also, there were some
nasty cyclic header dependency problems around linux/elf.h,
linux/module.h, linux/bug.h and asm/bug.h which ended up leading to some
awkward hacks; I need to remind myself what the problems were and see if
this elf cleanup helps (pretty sure it should).
> After this patch <linux/elf.h> seems to be pretty much empty, I'd rather
> suggest to move the function declarations to elfcore.h and leave the basic
> elf definitions in elf.h. Many small header files have the disadvantage
> that it takes longer to find the needed information.
>
linux/elf.h ends up pulling in a really surprising amount of stuff,
mostly because it ends up including asm/elf.h. asm/elf.h, in turn,
depending on the architecture, pulls in a wide variety of other
headers. When I cleaned this up, I found quite a few buggy .c files
which ended up relying on implicit includes via this chain.
Given that there's been a general push to try and cut down on the number
of header dependency entanglements, I thought I could contribute while
solving my own immediate problems.
linux/elfcore.h is specifically related to ELF core files, so the two
corefile notes-related headers could be moved there.
J
next prev parent reply other threads:[~2007-06-26 19:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070620230854.246399397@goop.org>
2007-06-20 23:08 ` [PATCH] cross-architecture ELF clean up Jeremy Fitzhardinge
2007-06-21 8:20 ` ian
2007-06-21 15:06 ` Jeremy Fitzhardinge
2007-06-21 16:49 ` Chris Zankel
2007-06-21 18:31 ` Jeremy Fitzhardinge
2007-06-25 9:02 ` David Woodhouse
2007-06-25 12:43 ` Jeremy Fitzhardinge
2007-06-25 13:40 ` Roman Zippel
2007-06-25 13:56 ` Clemens Koller
2007-06-25 14:06 ` Roman Zippel
2007-06-25 13:37 ` Roman Zippel
2007-06-26 19:29 ` Jeremy Fitzhardinge [this message]
2007-06-27 23:25 ` Roman Zippel
2007-06-28 15:45 ` Jeremy Fitzhardinge
2007-06-28 21:48 ` Roman Zippel
2007-06-29 14:53 ` Jeremy Fitzhardinge
2007-06-29 18:12 ` Sam Ravnborg
2007-07-01 16:23 ` Jeremy Fitzhardinge
2007-06-25 15:18 ` Roman Zippel
2007-06-26 19:28 ` Jeremy Fitzhardinge
2007-06-29 4:13 ` Paul Mackerras
2007-06-29 5:31 ` Jeremy Fitzhardinge
2007-06-29 4:48 ` Paul Mackerras
2007-06-29 5:31 ` Jeremy Fitzhardinge
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=468168FD.1080200@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
--cc=zippel@linux-m68k.org \
/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;
as well as URLs for NNTP newsgroup(s).