summaryrefslogtreecommitdiff
path: root/gcc/mkmap-symver.awk
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 05:39:02 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 05:39:02 +0000
commitc7921ee97efc523ed04af98623b34be92cc12b4b (patch)
treef47c4639b62229f963495d861463f9b3de09e56a /gcc/mkmap-symver.awk
parentcef6e5eaf72d99fd2f35d5bf8595b349c3ac6f59 (diff)
downloadgcc-c7921ee97efc523ed04af98623b34be92cc12b4b.tar.gz
* mkmap-flat.awk, mkmap-symver.awk: If the last version
assigned to a symbol was '%exclude', do not emit it anywhere. If leading_underscore is true, prefix all symbols from the version scripts with a leading underscore before comparing them with nm output or emitting them. Remove support for dot symbols. * config/t-slibgcc-darwin (SHLIB_LINK): Use mkmap-flat.awk. (SHLIB_MAPFILES): Use libgcc-std.ver. (SHLIB_MKMAP_OPTS): Enable leading-underscore mode. (SHLIB_LINK): Add -Wl,-exported_symbols_list,$(SHLIB_MAP). * config/sh/t-linux: Use the normal libgcc-std.ver, plus libgcc-excl.ver and libgcc-glibc.ver. * config/sh/libgcc-excl.ver: New file. * config/sh/libgcc-std.ver, libgcc-darwin.ver: Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mkmap-symver.awk')
-rw-r--r--gcc/mkmap-symver.awk17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/mkmap-symver.awk b/gcc/mkmap-symver.awk
index 7953afcff80..7514b954ec7 100644
--- a/gcc/mkmap-symver.awk
+++ b/gcc/mkmap-symver.awk
@@ -21,6 +21,10 @@
BEGIN {
state = "nm";
sawsymbol = 0;
+ if (leading_underscore)
+ prefix = "_";
+ else
+ prefix = "";
}
# Remove comment and blank lines.
@@ -56,6 +60,8 @@ state == "nm" {
# for beginning and ending each section, and %inherit markers for
# describing version inheritence. A symbol may appear in more than
# one symbol version, and the last seen takes effect.
+# The magic version name '%exclude' causes all the symbols given that
+# version to be dropped from the output (unless a later version overrides).
NF == 3 && $1 == "%inherit" {
inherit[$2] = $3;
@@ -63,7 +69,8 @@ NF == 3 && $1 == "%inherit" {
}
NF == 2 && $2 == "{" {
- libs[$1] = 1;
+ if ($1 != "%exclude")
+ libs[$1] = 1;
thislib = $1;
next;
}
@@ -74,7 +81,11 @@ $1 == "}" {
}
{
- ver[$1] = thislib;
+ sym = prefix $1;
+ if (thislib != "%exclude")
+ ver[sym] = thislib;
+ else
+ delete ver[sym];
next;
}
@@ -106,8 +117,6 @@ function output(lib) {
empty = 0;
}
printf("\t%s;\n", sym);
- if (dotsyms)
- printf("\t.%s;\n", sym);
}
if (empty)