From: Kai W. <kai...@gm...> - 2010-07-19 22:34:13
|
On Tue, Jul 20, 2010 at 12:15:31AM +0200, Joerg Sonnenberger wrote: > Hi all, > the first time I looked at libelf, it didn't work on NetBSD due to > various macros and types missing from NetBSD's elf.h. This has been > addressed in the mean time by adding another bunch of #if's. The same > applies for FreeBSD. When people want to use libelf on Solaris or Linux, > I expect it to grow another set of conditionals. That's strange. We already have a bunch of #if's for NetBSD. You meant we need more to make it compile? > This brings me to my question of whether this is really the best > approach. Wouldn't it be much easier if libelf provide its own elf.h > replacement with predictable content based on the libelf version and > nothing else? This would also make it easier to use ELF (and DWARF) as > intermediate formats for compiler and other toolchain stuff. You are right. We've thought about this as well and we're going to create our own ELF include files (including arch specific ELF definitions), similar with Binutils' include dir, I guess. However some #if's will still be necessary. Kai |