elfutils libelf.h compatibility

Jake Page jake@cs.stanford.edu
Thu Dec 7 09:02:00 GMT 2006


Hi,

I noticed that the Elf_Data structure in elfutils is slightly different 
from the one in the GPL "libelf" package at 
http://directory.fsf.org/libelf.html, which bit me in an admittedly weird 
situation.  Looking around, I found that the Solaris & Irix libelf.h 
includes match the one from FSF libelf.

With the below change, the elf-utils libelf is source & binary compatible 
with the FSF libelf (as far as I can tell with my use of it at least...)

Probably not that important as it's not that common to mix up the include 
from the lib (like I did :) but I figured it doesn't hurt to have a 
compatible header (since this is intended to be an implementation of the 
SVR4 libelf, I assume).

-Jake

=========================================

--- /usr/include/libelf.h       2006-02-11 08:48:54.000000000 -0800
+++ libelf.h    2006-12-06 19:44:34.000000000 -0800
@@ -58,10 +58,10 @@
  {
    void *d_buf;                 /* Pointer to the actual data.  */
    Elf_Type d_type;             /* Type of this piece of data.  */
-  unsigned int d_version;      /* ELF version.  */
    size_t d_size;               /* Size in bytes.  */
    off_t d_off;                 /* Offset into section.  */
    size_t d_align;              /* Alignment in section.  */
+  unsigned int d_version;      /* ELF version.  */
  } Elf_Data;





More information about the Systemtap mailing list