[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building libabigail on Ubuntu 14.10 -- problems with elfutils/libebl.h



On Mon, 2015-01-26 at 12:39 -0500, Eric Fiselier wrote:
> I'm trying to build libabigail on Ubuntu 14.10. When configuring I
> always run into an issue finding
> elfutils/libebl.h. I can't find an Ubuntu package that actually
> provides this header. Is this a known issue?

libebl.h is an internal elfutils header that should only be used when
hacking on a elfutils backend. It isn't a supported interface and might
horribly break between (minor) elfutils releases.

It seems to be used only for the following hack in abg-dwarf-reader.cc
to get a string representing of the architecture of the current ELF
file:
  elf_architecture_ = ebl_backend_name(ebl_openbackend(elf_handle()));

All this really does is map the EM_ constant found in the ELF ehdr to an
(internal) name for for the elfutils backend for that machine
architecture.

Please don't use ebl directly, it really isn't meant to provide a
interface outside internal elfutils development purposes.

There isn't really a good way to map EM_ values to machine architecture
names. I am afraid you will have to write something yourself using the
comments in elf.h describing each EM_ constant. Or use the descriptions
from the gabi spec:
http://refspecs.linuxbase.org/elf/gabi4+/ch4.eheader.html#e_machine

Cheers,

Mark