[haiku-development] Re: elf.h

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 22 Jan 2012 15:19:33 +0100

On 2012-01-22 at 09:15:09 [+0100], Donn Cave <donn@xxxxxxxxxxx> wrote:
> I upgraded my snapshot level and am trying to rebuild the GHC
> Haskell compiler (to deal with size change of sigset_t, I think.)
> 
> GHC expects '#include <elf.h>' to work, of course on platforms with
> ELF object format.  There doesn't seem to be any such file on Haiku,
> making it nearly unique among ELF platforms (minus OpenBSD, the
> exception that proves the rule.)

<elf.h> at least isn't a standard POSIX header. IIRC there's a libelf, 
which might provide that header. I haven't checked whether it is available 
at HaikuPorts.

> I seem to have found one somewhere in the past, but I'm sorry to say
> I don't recall where.  (but I did have to supplement it with some
> defines, like ELFMAG0, from gdb/include/elf/common.h.)
> 
> I've browsed around in the source a little and have found several
> elf.h files and similar, but not the one that declares Elf32_Sym
> and so forth.  (and again ideally those would be typedef'd, but in
> whatever previously available elf.h they were just structs.)
> 
> Would anyone happen to have an opinion on the right place to find
> these definitions?

It isn't so much an opinion as a fact, headers/private/system/elf32.h is 
the private header used by our boot loader, kernel, and runtime loader.

CU, Ingo

Other related posts: