[PATCH] Filter out s390(x) symbols that are local labels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Because s390 kernel System.map contains symbols that repeat very often

    grep -c 'L2^B1$' System.map-2.6.27.7-4-default
    276

and the limit for symbols with the same name in get_syment_array() is 200,
we filter out that symbols by modifying s390_verify_symbol() and
s390x_verify_symbol().

The symbols are not needed in crash anyway, because that are only local
labels and not global symbols needed by crash.

This is is a workaround. Andreas Krebbel already worked to resolve the problem
in binutils which prevents that symbols from being included in System.map.
http://sourceware.org/ml/binutils/2009-01/msg00181.html

However, since there are kernels (all 2.6.28 at least) out that contain that
problem, we should also workaround that in crash in my opinion.


Signed-off-by: Bernhard Walle <bwalle@xxxxxxx>


2 files changed, 8 insertions(+)
s390.c  |    4 ++++
s390x.c |    4 ++++


Because s390 kernel System.map contains symbols that repeat very often

    grep -c 'L2^B1$' System.map-2.6.27.7-4-default
    276

and the limit for symbols with the same name in get_syment_array() is 200,
we filter out that symbols by modifying s390_verify_symbol() and
s390x_verify_symbol().

The symbols are not needed in crash anyway, because that are only local
labels and not global symbols needed by crash.

This is is a workaround. Andreas Krebbel already worked to resolve the problem
in binutils which prevents that symbols from being included in System.map.
http://sourceware.org/ml/binutils/2009-01/msg00181.html

However, since there are kernels (all 2.6.28 at least) out that contain that
problem, we should also workaround that in crash in my opinion.


Signed-off-by: Bernhard Walle <bwalle@xxxxxxx>

diff --git a/s390.c b/s390.c
--- a/s390.c
+++ b/s390.c
@@ -409,6 +409,10 @@
 	if (STREQ(name, "Letext") || STREQ(name, "gcc2_compiled."))
 		return FALSE;
 
+	/* reject L2^B symbols */
+	if (strstr(name, "L2\002") == name)
+	    	return FALSE;
+
 	/* throw away all symbols containing a '.' */
 	for(i = 0; i < strlen(name);i++){
 		if(name[i] == '.')
diff --git a/s390x.c b/s390x.c
--- a/s390x.c
+++ b/s390x.c
@@ -418,6 +418,10 @@
 	if (STREQ(name, "Letext") || STREQ(name, "gcc2_compiled."))
 		return FALSE;
 
+        /* reject L2^B symbols */
+	if (strstr(name, "L2\002") == name)
+	    	return FALSE;
+
 	/* throw away all symbols containing a '.' */
 	for(i = 0; i < strlen(name);i++){
 		if(name[i] == '.')
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux