VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / scripts / kallsyms.c
index f4b3289..e21a5d1 100644 (file)
@@ -72,7 +72,20 @@ symbol_valid(struct sym_entry *s)
                        return 0;
        }
 
-       if (strstr(s->sym, "_compiled."))
+       /* Exclude symbols which vary between passes.  Passes 1 and 2 must have
+        * identical symbol lists.  The kallsyms_* symbols below are only added
+        * after pass 1, they would be included in pass 2 when --all-symbols is
+        * specified so exclude them to get a stable symbol list.
+        */
+       if (strstr(s->sym, "_compiled.") ||
+           strcmp(s->sym, "kallsyms_addresses") == 0 ||
+           strcmp(s->sym, "kallsyms_num_syms") == 0 ||
+           strcmp(s->sym, "kallsyms_names") == 0)
+               return 0;
+
+       /* Exclude linker generated symbols which vary between passes */
+       if (strcmp(s->sym, "_SDA_BASE_") == 0 ||        /* ppc */
+           strcmp(s->sym, "_SDA2_BASE_") == 0)         /* ppc */
                return 0;
 
        return 1;