diff options
author | kan <kan@FreeBSD.org> | 2003-07-11 03:40:53 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-07-11 03:40:53 +0000 |
commit | b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180 (patch) | |
tree | f6b0610f4a17fd26aa234354f050080f789861a4 /contrib/gcc/mkmap-symver.awk | |
parent | 52e69d78eee5612ac195e0701a5cebe40d1ab0e1 (diff) | |
download | FreeBSD-src-b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180.zip FreeBSD-src-b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180.tar.gz |
Gcc 3.3.1-pre as of 2003-07-11.
Diffstat (limited to 'contrib/gcc/mkmap-symver.awk')
-rw-r--r-- | contrib/gcc/mkmap-symver.awk | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/gcc/mkmap-symver.awk b/contrib/gcc/mkmap-symver.awk index 51b6df2..e4bc58e 100644 --- a/contrib/gcc/mkmap-symver.awk +++ b/contrib/gcc/mkmap-symver.awk @@ -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); |