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-symver.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-symver.awk')
-rw-r--r-- | gcc/mkmap-symver.awk | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/mkmap-symver.awk b/gcc/mkmap-symver.awk index 7953afc..7514b95 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) |