This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: unwind support for Linux 2.6 vsyscall DSO
- From: Roland McGrath <roland at redhat dot com>
- To: Elena Zannoni <ezannoni at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 8 Oct 2003 17:50:57 -0700
- Subject: Re: unwind support for Linux 2.6 vsyscall DSO
> I think so, on Solaris some of the AT_* values in <sys/auxv.h> don't
> match those in <elf.h> on linux and those in
> gdb/../include/elf/elf.h. The AT_SYSINFO_EHDR seems to be 33 on all of
> those, but other values are different. If we want to extend the auxv
> handling to recognize more types, we may run into problems.
Perhaps you overlooked my explanation of all this on Monday:
However, the AT_* values (except for AT_NULL==0) are neither standardized
nor de facto reliably the same across operating systems (they are part of
the SVR4 ABI spec for each processor I believe). The values in
include/elf/common.h are copied from glibc's <elf.h>, and are what GNU/Linux
uses. Some of the values used on Solaris conflict, though Sun seems to have
taken to using AT_SUN_* names and values >=2000 for recent additions and so
it now seems unlikely they will use values 32 or 33 and thus risk false
matches with the Linux AT_SYSINFO_EHDR tag. (FYI, NetBSD's elf.h header has
all of Sun's values and no GNU/Linux values; however NetBSD itself uses only
the tags <10 which in fact match exactly everywhere.)
Any use of auxv tags will always be OS-specific. There is no universal
generic set to translate them to or anything like that. The fact that
there is an aux vector in a given format with tags and values is common
code worth sharing across platforms, but that is all.