Subject: Re: Reworking ELF to be "normal-looking"
To: Christos Zoulas <christos@zoulas.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-userlevel
Date: 01/31/1999 16:36:28
I miss-spelled tech-userlevel the first time...
for those who missed it, our sys/exec_elf.h doesn't provide
the standard ELF symbolic constants like PT_LOAD, SHT_SYMTAB,
SHN_UNDEF, etc, but uses enum tags like Elf_xxx_yyy instead.
>| Are these mandated by ELF "standards", or just conventional? What're
>| the pros and cons of providing these (and the rest of the equivalents
>| in libbfd's elf/common.h) in, say, sys/exec_elf.h?
>I do, since I wrote them.
Sure, thats why I cc'ed you. :)
>At the time I wrote them, there was no standard.
>I think that we should provide a <sys/elf.h> that has the standard names,
Oh, cool. But going by GNU software, the "standard" seems to be <elf.h>.
>and eventually get rid of <sys/exec_elf.h>. Or have <sys/elf.h> include
><sys/exec_elf.h> and do the magic with the right defines. I like to use
>enums better than #defines, because it makes it easier to debug things.
Thats a fine reason for using enums.
Having an <elf.h> that includes <sys/exec_elf.h> and provides the
standard names would work for me. Especially if we provided the .h
file so that 1.3.x users without it can upgrade. (otherwise `portable'
third-party software has to carry private ifdefs around forever).
I'd say renaming sys/exec_elf.h is a separate issue.