diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2004-11-17 05:39:02 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2004-11-17 05:39:02 +0000 |
commit | 7c8347536fcd9cf01264aba9a3827915f26de05d (patch) | |
tree | f47c4639b62229f963495d861463f9b3de09e56a /gcc/mkmap-flat.awk | |
parent | ace6d09bfa82365b936696aee87ddf48a079eda2 (diff) | |
download | gcc-7c8347536fcd9cf01264aba9a3827915f26de05d.zip gcc-7c8347536fcd9cf01264aba9a3827915f26de05d.tar.gz gcc-7c8347536fcd9cf01264aba9a3827915f26de05d.tar.bz2 |
mkmap-flat.awk, [...]: If the last version assigned to a symbol was '%exclude', do not emit it anywhere.
* 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.
From-SVN: r90792
Diffstat (limited to 'gcc/mkmap-flat.awk')
-rw-r--r-- | gcc/mkmap-flat.awk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/mkmap-flat.awk b/gcc/mkmap-flat.awk index 4ff5bf5..dacd7ca 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; } |