ELF header files

Corinna Vinschen vinschen@redhat.com
Fri Dec 3 15:19:00 GMT 2010

On Dec  3 15:17, Sebastian Huber wrote:
> On 12/03/2010 02:53 PM, Ralf Corsepius wrote:
> > On 12/03/2010 02:15 PM, Sebastian Huber wrote:
> >> Hi,
> >>
> >> is it possible to add some ELF header files to Newlib, or is this
> >> undesirable?
> > 
> > In general, everything which relies upon machine/toolchain internals is
> > undesirable and is best avoided.
> The GNU C library elf.h has everything in one file (e.g. relocation types for
> various architectures).  Under BSD this architecture dependent stuff is split
> up into different files.  It is possible to merge all these files into a big one.
> Is it possible to use the GNU C library elf.h?  It uses GPL v2.1+.

I don't think it's a good idea to add elf.h or elf.h-like headers to
newlib at all.  Newlib is often used within the same source tree as BFD,
binutils, GCC and GDB.  Part of these source trees is the GNU elf.h file
in the include subdir, parallel to the newlib subdir.  So the stuff is
usually already available.  Apart from the fact that elf.h doesn't match
the job description of a C library well, it would be a duplication of
already available information.  This would not only lead to confusion,
it would also require to maintain the same information in two places.


Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

More information about the Newlib mailing list