Commit bf718682 by Benjamin Kosnik Committed by Benjamin Kosnik

extract_symvers: Add support for tracking TLS symbols.

2010-10-01  Benjamin Kosnik  <bkoz@redhat.com>

	* scripts/extract_symvers: Add support for tracking TLS symbols.
	* testsuite/util/testsuite_abi.h (symbol::category): Add tls type.
	* testsuite/util/testsuite_abi.cc: Set symbol type to tls when
	appropriate, collect size info.

From-SVN: r164892
parent 1cc2d70b
2010-10-01 Benjamin Kosnik <bkoz@redhat.com>
* scripts/extract_symvers: Add support for tracking TLS symbols.
* testsuite/util/testsuite_abi.h (symbol::category): Add tls type.
* testsuite/util/testsuite_abi.cc: Set symbol type to tls when
appropriate, collect size info.
2010-10-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2010-10-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* scripts/extract_symvers: Use pvs if present. * scripts/extract_symvers: Use pvs if present.
......
...@@ -92,7 +92,7 @@ else ...@@ -92,7 +92,7 @@ else
egrep -v ' (LOCAL|UND) ' |\ egrep -v ' (LOCAL|UND) ' |\
awk '{ if ($4 == "FUNC" || $4 == "NOTYPE") awk '{ if ($4 == "FUNC" || $4 == "NOTYPE")
printf "%s:%s\n", $4, $8; printf "%s:%s\n", $4, $8;
else if ($4 == "OBJECT") else if ($4 == "OBJECT" || $4 == "TLS")
printf "%s:%s:%s\n", $4, $3, $8; printf "%s:%s:%s\n", $4, $3, $8;
}' | sort | uniq > $tmp 2>&1 }' | sort | uniq > $tmp 2>&1
# else printf "Huh? What is %s?\n", $8; # else printf "Huh? What is %s?\n", $8;
......
...@@ -43,13 +43,15 @@ symbol::init(string& data) ...@@ -43,13 +43,15 @@ symbol::init(string& data)
type = symbol::function; type = symbol::function;
else if (data.find("OBJECT") == 0) else if (data.find("OBJECT") == 0)
type = symbol::object; type = symbol::object;
else if (data.find("TLS") == 0)
type = symbol::tls;
n = data.find_first_of(delim); n = data.find_first_of(delim);
if (n != npos) if (n != npos)
data.erase(data.begin(), data.begin() + n + 1); data.erase(data.begin(), data.begin() + n + 1);
// Iff object, get size info. // Iff object or TLS, get size info.
if (type == symbol::object) if (type == symbol::object || type == symbol::tls)
{ {
n = data.find_first_of(delim); n = data.find_first_of(delim);
if (n != npos) if (n != npos)
...@@ -130,6 +132,9 @@ symbol::print() const ...@@ -130,6 +132,9 @@ symbol::print() const
case object: case object:
type_string = "object"; type_string = "object";
break; break;
case tls:
type_string = "tls";
break;
case uncategorized: case uncategorized:
type_string = "uncategorized"; type_string = "uncategorized";
break; break;
...@@ -138,7 +143,7 @@ symbol::print() const ...@@ -138,7 +143,7 @@ symbol::print() const
} }
cout << "type: " << type_string << endl; cout << "type: " << type_string << endl;
if (type == object) if (type == object || type == tls)
cout << "type size: " << size << endl; cout << "type size: " << size << endl;
string status_string; string status_string;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
// Encapsulates symbol characteristics. // Encapsulates symbol characteristics.
struct symbol struct symbol
{ {
enum category { function, object, uncategorized }; enum category { function, object, tls, uncategorized };
enum designation { existing, added, subtracted, undesignated }; enum designation { existing, added, subtracted, undesignated };
enum version { none, compatible, incompatible, unversioned }; enum version { none, compatible, incompatible, unversioned };
enum compatibility enum compatibility
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment