Subject: Elf headers and elk.
To: None <port-alpha@NetBSD.ORG>
From: Tim Rightnour <root@garbled.net>
List: port-alpha
Date: 06/20/1998 05:33:05
I'm trying to compile, and clean up elk for the pkg tree, and I ran into an
interesting problem.  (see the bottom of this message for the make spew)

I did the obvious thing, and grepped for some of these defines, in
/usr/include, found a *bunch* of ones the program wanted in sys/exec_elf.h

However, the below (and more) still remain.  The program initially wanted to
#include <libelf.h>.. obviously from an OS with a different elf handling than
ours.  Some of this I can see how to fix, but I'm not totally sure what the
correct way to handle them is.  It seems almost like we are missing some
defines in there, to provide build compatibility with other OS's.  I can
probably beat together a big list of defines that will fix this particular
application, but in the big picture, its just going to blow up on us somewhere
else.

Or am I missing something and way out in left field?

stab-elf.c:18: `Elf_Data' undeclared (first use this function)
stab-elf.c:18: `elf_data_ptr' undeclared (first use this function)
stab-elf.c:19: parse error before `*'
stab-elf.c:25: `EV_CURRENT' undeclared (first use this function)
stab-elf.c:25: `EV_NONE' undeclared (first use this function)
stab-elf.c:27: `ELF_C_READ' undeclared (first use this function)
stab-elf.c:27: parse error before `)'
stab-elf.c:34: `elf_ehdr_ptr' undeclared (first use this function)
stab-elf.c:37: `shstrndx' undeclared (first use this function)
stab-elf.c:40: `elf_shdr_ptr' undeclared (first use this function)
stab-elf.c:42: `SHT_STRTAB' undeclared (first use this function)
stab-elf.c:47: `section_name' undeclared (first use this function)
stab-elf.c:50: `elf_str_index' undeclared (first use this function)
stab-elf.c:53: `SHT_SYMTAB' undeclared (first use this function)
stab-elf.c:54: `symtab_ptr' undeclared (first use this function)
stab-elf.c:83: `STT_FUNC' undeclared (first use this function)
stab-elf.c:84: `STB_GLOBAL' undeclared (first use this function)

---
Tim Rightnour    -  root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html