Browse Source

Ignore VDSO object

Do not try to load symbols from VDSO as it does not correspond to any
file on disk.
master
Thomas Preud'homme 5 years ago
parent
commit
f0aa8400b7
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      pstack.c

+ 4
- 0
pstack.c View File

@@ -115,6 +115,7 @@
115 115
 #define NEXT_FRAME_POINTER_ADDR(fp) (fp)
116 116
 #define NEXT_PROGRAM_COUNTER_ADDR(fp) ((fp) + __SIZEOF_POINTER__)
117 117
 #define DECLARE_REGS_STRUCT(regs) struct user_regs_struct regs
118
+#define VDSO_NAME "linux-vdso.so.1"
118 119
 #elif defined(__ARMEL__) /* armel */
119 120
 #define ELF_MACHINE EM_ARM
120 121
 #define PROGRAM_COUNTER(regs) (regs.ARM_pc)
@@ -122,6 +123,7 @@
122 123
 #define NEXT_FRAME_POINTER_ADDR(fp) ((fp) - __SIZEOF_POINTER__)
123 124
 #define NEXT_PROGRAM_COUNTER_ADDR(fp) (fp)
124 125
 #define DECLARE_REGS_STRUCT(regs) struct user_regs regs
126
+#define VDSO_NAME ""
125 127
 #elif defined(__ppc64__) || defined(__alpha__) || defined(__ia64__) || defined(s390x__)
126 128
 #error Not (yet) supported architecture, patches welcomes :-)
127 129
 #else
@@ -481,6 +483,8 @@ static Symbols loadSyms(const char *fname)
481 483
 
482 484
   if (*fname == '\0')
483 485
     return (Symbols) 0;
486
+  if (!strcmp(VDSO_NAME, fname))
487
+    return (Symbols) 0;
484 488
   syms = newSyms(fname);
485 489
   if ((fd = open(fname, O_RDONLY)) < 0)
486 490
   {

Loading…
Cancel
Save