programs/winedbg/elf.c breaks non-Linux platforms
Hi, I'm afraid the following patch which added programs/winedbg/elf.c date: 2004/02/03 00:14:12; author: julliard; state: Exp; Eric Pouech <pouech-eric(a)wanadoo.fr> - now detecting Dwarf debug information in ELF modules (but don't load it) - separated module management (pe.c, elf.c) from debug information management (stabs.c, msc.c) - worked around new wine-pthread and wine-kthread loaders (no longer use "wine" as default loader) - better convergence of gdb-proxy and winedbg for ELF handling - fixed ELF link-map walking - now using all loaded shared libs - (with the help of Robert Shearman) - added a bit of const correctness breaks building Wine on non-Linux platforms. For example, on FreeBSD 4.9 I'm seeing: elf.c: In function `DEBUG_ProcessElfFile': elf.c:344: error: `DT_NUM' undeclared (first use in this function) elf.c:344: error: (Each undeclared identifier is reported only once elf.c:344: error: for each function it appears in.) elf.c:344: error: `DT_PROCNUM' undeclared (first use in this function) elf.c:344: error: `DT_EXTRANUM' undeclared (first use in this function) elf.c:345: error: `DT_LOOS' undeclared (first use in this function) elf.c:345: error: `DT_HIOS' undeclared (first use in this function) elf.c:346: error: `DT_LOPROC' undeclared (first use in this function) elf.c:346: error: `DT_HIPROC' undeclared (first use in this function) Gerald -- Gerald Pfeifer (Jerry) gerald(a)pfeifer.com http://www.pfeifer.com/gerald/
elf.c: In function `DEBUG_ProcessElfFile': elf.c:344: error: `DT_NUM' undeclared (first use in this function) elf.c:344: error: (Each undeclared identifier is reported only once elf.c:344: error: for each function it appears in.) elf.c:344: error: `DT_PROCNUM' undeclared (first use in this function) elf.c:344: error: `DT_EXTRANUM' undeclared (first use in this function) elf.c:345: error: `DT_LOOS' undeclared (first use in this function) elf.c:345: error: `DT_HIOS' undeclared (first use in this function) elf.c:346: error: `DT_LOPROC' undeclared (first use in this function) elf.c:346: error: `DT_HIPROC' undeclared (first use in this function) Hi Gerald,
are those defined somewhere on BSD ? browsing the web shows that openbsd & netbsd define (some of them) in sys/exec_elf.h (except DT_PROCNUM and DT_EXTRANUM) and freebsd has sys/elf32.h which includes some of them (and DT_COUNT instead of DT_NUM) do you (partially) confirm this ? A+
On Wednesday 04 February 2004 06:26, Eric Pouech wrote:
elf.c: In function `DEBUG_ProcessElfFile': elf.c:344: error: `DT_NUM' undeclared (first use in this function) elf.c:344: error: (Each undeclared identifier is reported only once elf.c:344: error: for each function it appears in.) elf.c:344: error: `DT_PROCNUM' undeclared (first use in this function) elf.c:344: error: `DT_EXTRANUM' undeclared (first use in this function) elf.c:345: error: `DT_LOOS' undeclared (first use in this function) elf.c:345: error: `DT_HIOS' undeclared (first use in this function) elf.c:346: error: `DT_LOPROC' undeclared (first use in this function) elf.c:346: error: `DT_HIPROC' undeclared (first use in this function)
Hi Gerald,
are those defined somewhere on BSD ? browsing the web shows that openbsd & netbsd define (some of them) in sys/exec_elf.h (except DT_PROCNUM and DT_EXTRANUM) and freebsd has sys/elf32.h which includes some of them (and DT_COUNT instead of DT_NUM)
do you (partially) confirm this ?
A+
According to a quick grep in /usr/include solaris doesn't define these either
On Tue, 3 Feb 2004, Eric Pouech wrote:
elf.c: In function `DEBUG_ProcessElfFile': elf.c:344: error: `DT_NUM' undeclared (first use in this function) elf.c:344: error: (Each undeclared identifier is reported only once elf.c:344: error: for each function it appears in.) elf.c:344: error: `DT_PROCNUM' undeclared (first use in this function) elf.c:344: error: `DT_EXTRANUM' undeclared (first use in this function) elf.c:345: error: `DT_LOOS' undeclared (first use in this function) elf.c:345: error: `DT_HIOS' undeclared (first use in this function) elf.c:346: error: `DT_LOPROC' undeclared (first use in this function) elf.c:346: error: `DT_HIPROC' undeclared (first use in this function) are those defined somewhere on BSD ?
According to recursive grep in /usr/include, at least FreeBSD 4.x does not have these.
browsing the web shows that openbsd & netbsd define (some of them) in sys/exec_elf.h (except DT_PROCNUM and DT_EXTRANUM) and freebsd has sys/elf32.h which includes some of them (and DT_COUNT instead of DT_NUM)
do you (partially) confirm this ?
DT_COUNT is present also on FreeBSD 4.x, but the other I couldn't find there. (I'm attaching /usr/include/sys/elf32.h and /usr/include/sys/elf_common.h from a 4.8-RELEASE-p13 system. If you'd like me to check a 5.2 system, I should also be able to do that, but -STABLE is still 4.x.) Gerald -- Gerald Pfeifer (Jerry) gerald(a)pfeifer.com http://www.pfeifer.com/gerald/
Eric, I happily confirm that with your updates of elf.c, FreeBSD 4.x now compiles that code without problems. Thanks for your quick and effective response and the patch! Gerald -- Gerald Pfeifer (Jerry) gerald(a)pfeifer.com http://www.pfeifer.com/gerald/
participants (3)
-
Eric Pouech -
Gerald Pfeifer -
Robert Lunnon