mkmap-symver.awk (BEGIN): Set sawsymbol false.

* mkmap-symver.awk (BEGIN): Set sawsymbol false.
        (nm && NF == 3): Set sawsymbol true.
        (END): Exit if no symbols seen.
        (output): Fix map syntax error if no globals for the version.

From-SVN: r59578
This commit is contained in:
Richard Henderson 2002-11-27 12:00:14 -08:00 committed by Richard Henderson
parent 67333e84d7
commit 5a5c00af7d
2 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2002-11-27 Richard Henderson <rth@redhat.com>
* mkmap-symver.awk (BEGIN): Set sawsymbol false.
(nm && NF == 3): Set sawsymbol true.
(END): Exit if no symbols seen.
(output): Fix map syntax error if no globals for the version.
Wed Nov 27 14:45:46 CET 2002 Jan Hubicka <jh@suse.cz>
* builtins.def (DEF_C99_BUILTIN): Fix.

View File

@ -20,6 +20,7 @@
BEGIN {
state = "nm";
sawsymbol = 0;
}
# Remove comment and blank lines.
@ -42,6 +43,7 @@ state == "nm" && ($1 == "U" || $2 == "U") {
state == "nm" && NF == 3 {
def[$3] = 1;
sawsymbol = 1;
next;
}
@ -77,6 +79,11 @@ $1 == "}" {
}
END {
if (!sawsymbol)
{
print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
exit 1;
}
for (l in libs)
output(l);
}
@ -89,10 +96,15 @@ function output(lib) {
output(inherit[lib]);
printf("%s {\n", lib);
printf(" global:\n");
sawglobal = 0;
for (sym in ver)
if ((ver[sym] == lib) && (sym in def))
{
if (!sawglobal)
{
printf(" global:\n");
sawglobal = 1;
}
printf("\t%s;\n", sym);
if (dotsyms)
printf("\t.%s;\n", sym);