Daily bump.
[gcc.git] / libgcc / mkmap-symver.awk
index 4877e905147ae62ae8ed2e314fe25ac13b316827..e40e4019b7150e6330f0e00b97ec5fd6169ac885 100644 (file)
@@ -1,5 +1,5 @@
 # Generate an ELF symbol version map a-la Solaris and GNU ld.
-#      Copyright (C) 2007, 2008  Free Software Foundation, Inc.
+#      Copyright (C) 2007-2020 Free Software Foundation, Inc.
 #      Contributed by Richard Henderson <rth@cygnus.com>
 #
 # This file is part of GCC.
@@ -33,7 +33,7 @@ BEGIN {
 }
 
 # We begin with nm input.  Collect the set of symbols that are present
-# so that we can not emit them into the final version script -- Solaris
+# so that we cannot emit them into the final version script -- Solaris
 # complains at us if we do.
 
 state == "nm" && /^%%/ {
@@ -47,7 +47,11 @@ state == "nm" && ($1 == "U" || $2 == "U") {
 
 state == "nm" && NF == 3 {
   split ($3, s, "@")
-  def[s[1]] = 1;
+  if (skip_underscore && substr(s[1], 1, 1) == "_")
+      symname = substr(s[1], 2);
+  else
+      symname = s[1];
+  def[symname] = 1;
   sawsymbol = 1;
   next;
 }