aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-12-02 12:31:19 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-12-02 12:31:19 +0000
commit360a48dc690b5a565716a0098752c82d6cb44b39 (patch)
treeeff17246bd2d45baaa993373e9598dc5ce5db244 /scripts
parentAdd /dev/shm to write path. (diff)
downloadsandbox-360a48dc690b5a565716a0098752c82d6cb44b39.tar.gz
sandbox-360a48dc690b5a565716a0098752c82d6cb44b39.tar.bz2
sandbox-360a48dc690b5a565716a0098752c82d6cb44b39.zip
Do not add unversioned symbols if we have a versioned libc.
Do not add duplicates. This is mostly due to unstripped libc .. bug #114200. URL: http://bugs.gentoo.org/114200 Signed-off-by: Martin Schlemmer <azarah@gentoo.org> Reported-by: James <James@superbug.demon.co.uk>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen_symbol_header.awk22
-rw-r--r--scripts/gen_symbol_version_map.awk21
2 files changed, 41 insertions, 2 deletions
diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk
index 1270d3e..c73e634 100644
--- a/scripts/gen_symbol_header.awk
+++ b/scripts/gen_symbol_header.awk
@@ -8,7 +8,27 @@ BEGIN {
if ($8 ~ sym_regex) {
split($8, symbol_array, /@|@@/);
- SYMBOL_LIST[symbol_array[1]] = SYMBOL_LIST[symbol_array[1]] " " $8;
+ # Don't add local symbols of versioned libc's
+ if (VERSIONED_LIBC && !symbol_array[2])
+ continue;
+
+ # We have a versioned libc
+ if (symbol_array[2])
+ VERSIONED_LIBC = 1;
+
+ ADD = 1;
+ # Check that we do not add duplicates
+ for (x in PROCESSED_SYMBOLS) {
+ if (x == $8) {
+ ADD = 0;
+ break;
+ }
+ }
+
+ if (ADD) {
+ SYMBOL_LIST[symbol_array[1]] = SYMBOL_LIST[symbol_array[1]] " " $8;
+ PROCESSED_SYMBOLS[$8] = $8;
+ }
}
}
}
diff --git a/scripts/gen_symbol_version_map.awk b/scripts/gen_symbol_version_map.awk
index 5feb44f..d81fcd1 100644
--- a/scripts/gen_symbol_version_map.awk
+++ b/scripts/gen_symbol_version_map.awk
@@ -8,11 +8,30 @@ BEGIN {
if ($8 ~ sym_regex) {
split($8, symbol_array, /@|@@/);
+ # Don't add local symbols of versioned libc's
+ if (VERSIONED_LIBC && !symbol_array[2])
+ continue;
+
# Handle non-versioned libc's like uClibc ...
if (!symbol_array[2])
symbol_array[2] = "";
+ else
+ # We have a versioned libc
+ VERSIONED_LIBC = 1;
- SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1];
+ ADD = 1;
+ # Check that we do not add duplicates
+ for (x in PROCESSED_SYMBOLS) {
+ if (x == $8) {
+ ADD = 0;
+ break;
+ }
+ }
+
+ if (ADD) {
+ SYMBOL_LIST[symbol_array[2]] = SYMBOL_LIST[symbol_array[2]] " " symbol_array[1];
+ PROCESSED_SYMBOLS[$8] = $8;
+ }
}
}
}