Mark Wielaard <mjw(a)redhat.com> writes:
On Mon, 2015-03-30 at 09:40 +0200, Mark Wielaard wrote:
> On Sat, 2015-03-28 at 23:41 +0100, Mark Wielaard wrote:
> > I do like the idea. But there is one extra issue if we want this to be
> > an installed header like known-dwarf.h now is (and I think we do).
> > It is generated against libelf/elf.h which is our local copy of elf.h
> > from glibc. We do that to make sure we have the latest version with
> > all relevant constants. But that means it might be different from the
> > version of elf.h on the installed system. So to make it useful we
> > also need to install our elf.h as elfutils/elf.h. I think that is fine
> > but it is also a little weird since it really is glibc's elf.h.
>
> And I just realized libelf.h includes elf.h. So mixing
> libelf/known-elf.h with libelf.h would be slightly tricky.
That should have been elfutils/known-elf.h of course.
The issue really is that a user could have their own #include <elf.h>
already. So we cannot just change libelf.h to #include <elfutils/elf.h>.
I am not sure how to nicely make known-elf.h work if we make it an
installed header given we don't fully control elf.h. Maybe we can just
make known-elf.h include the correct elf.h itself. And tell users to
never use #include <elf.h> when using libelf.h and/or known-elf.h?
Does it make sense to base the contents of known-elf.h on the installed
elf.h then?
But known-elf.h could still be useful even if we only use it as
internal
header. So I would still like to see it.
That would make the whole deal much less useful. Essentially I would
have to carry known-elf.awk with dwgrep.
Thanks,
Petr