summaryrefslogtreecommitdiff
path: root/gcc/mkmap-flat.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-flat.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-flat.awk')
-rw-r--r--gcc/mkmap-flat.awk16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/mkmap-flat.awk b/gcc/mkmap-flat.awk
index 4ff5bf5f05d..dacd7ca6d36 100644
--- a/gcc/mkmap-flat.awk
+++ b/gcc/mkmap-flat.awk
@@ -20,6 +20,11 @@
BEGIN {
state = "nm";
+ excluding = 0;
+ if (leading_underscore)
+ prefix = "_";
+ else
+ prefix = "";
}
# Remove comment and blank lines.
@@ -53,21 +58,30 @@ 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" {
next;
}
NF == 2 && $2 == "{" {
+ if ($1 == "%exclude")
+ excluding = 1;
next;
}
$1 == "}" {
+ excluding = 0;
next;
}
{
- export[$1] = 1;
+ sym = prefix $1;
+ if (excluding)
+ delete export[sym];
+ else
+ export[sym] = 1;
next;
}