This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER
- From: "David O'Brien" <obrien at FreeBSD dot org>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Nick Clifton <nickc at cambridge dot redhat dot com>, GNU Binutils mailing list <binutils at sources dot redhat dot com>
- Date: Sun, 17 Feb 2002 06:06:41 -0800
- Subject: Re: [PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER
- Organization: The NUXI BSD group
- References: <20020217013910.A61175@dragon.nuxi.com> <Pine.BSF.email@example.com>
- Reply-to: obrien at FreeBSD dot org
On Sun, Feb 17, 2002 at 05:33:25AM -0500, Hans-Peter Nilsson wrote:
> > > And when you actually do need to override stuff, what's
> > > wrong with the #ifndef approach: having a new file, defining
> > > stuff and including the original file, like is used in
> > > elf32-sh-lin.c?
> > Please explain how to use this approach.
> Not much to explain that shouldn't be obvious from a quick look
> at elf32-sh-lin.c. In old file, add "#ifndef the_item" wrappers
> for the defined item and likewise for the vector name. In the
> new file, "#define the_item new_value" together with a new
> vector name and "#include the_original_file".
That is what I first proposed and it was rejected by a global maintainer.
I ifndef'ed ELF_DYNAMIC_INTERPRETER in elf*-<cpu>.c, so that I could
include elf*-<cpu>.c in elf*-<cpu>-foo.c. elf*-<cpu>-foo.c would
define ELF_DYNAMIC_INTERPRETER so that elf*-<cpu>.c's would not be
> > > Why add some new mechanism for generalization needlessly and for what
> > > seems a thought-up reason,
> > The need is real for open source OS's; and OS's that are not the vendor
> > of the hardware platform.
> Again, why not correct it where it's known to be wrong?
Isn't that what I am doing??
-- David (obrien@FreeBSD.org)