# 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.
}
# 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" && /^%%/ {
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;
}