aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-11-27 12:00:14 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-11-27 12:00:14 -0800
commit5a5c00af7d3e89fc51c0ec11de510e3e5aee05a4 (patch)
tree054e17f1f6649a13f79715fe878a8c67b9afa455
parent67333e84d7705bb62c07dc169411942266638550 (diff)
downloadgcc-5a5c00af7d3e89fc51c0ec11de510e3e5aee05a4.zip
gcc-5a5c00af7d3e89fc51c0ec11de510e3e5aee05a4.tar.gz
gcc-5a5c00af7d3e89fc51c0ec11de510e3e5aee05a4.tar.bz2
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/mkmap-symver.awk14
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 26b4919..b03495c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/mkmap-symver.awk b/gcc/mkmap-symver.awk
index 51b6df2..e4bc58e 100644
--- a/gcc/mkmap-symver.awk
+++ b/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);