]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
readstabs.c: Don't include a.out.h, just define the stabs symbol nlist entry.
authorMark Wielaard <mark@klomp.org>
Sat, 6 Sep 2014 19:29:51 +0000 (19:29 +0000)
committerMark Wielaard <mark@klomp.org>
Sat, 6 Sep 2014 19:29:51 +0000 (19:29 +0000)
readstabs.c tries to include a.out.h to get the stabs symbol list entry
definition. STABS isn't specifically tied to the a.out format though.
The symbol entry structure just happens to be defined in the a.out.h
header. The header isn't really standard though. It might be provided
by glibc or the kernel in different locations. And not all arches support
the a.out format so the header might not even exist. Just define the
needed nlist struct entry directly in readstabs.c for VGO_linux. All
arches in glibc and the kernel use the same one anyway.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14484

coregrind/m_debuginfo/readstabs.c

index e9892dc91b0051488df072688b27fa41e85cb088..0882f45b0f1b762b78f16d12b0394fab79aa5ee4 100644 (file)
 
 /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
 #if defined(VGO_linux)
-#  include <a.out.h> /* stabs defns */
+/* stabs symbol list entry definition. */
+struct nlist {
+  union {
+    char *n_name;
+    struct nlist *n_next;
+    long n_strx;
+  } n_un;
+  unsigned char n_type;
+  char n_other;
+  short n_desc;
+  unsigned long n_value;
+};
 #elif defined(VGO_darwin)
 #  include <mach-o/nlist.h>
 #  define n_other n_sect