summaryrefslogtreecommitdiff
path: root/scripts/abilist.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-28 22:25:57 +0000
committerRoland McGrath <roland@gnu.org>2003-03-28 22:25:57 +0000
commitf0248ca59ce89cd5191553b58ce74863f3af6f24 (patch)
tree28801820fd48178221f5b06a0bbc33e6d1a442ae /scripts/abilist.awk
parent7e30918b7897b7a4b040b128f6d4cc27902579ea (diff)
downloadglibc-f0248ca59ce89cd5191553b58ce74863f3af6f24.tar.gz
* scripts/abilist.awk: If given -v filename_regexp and/or -v
libname_regexp when parsing names, then produce output only for those matching the given regexps. In combine mode, save all stanzas for a final sorting by stanza header at the end. Emit a blank line between stanzas.
Diffstat (limited to 'scripts/abilist.awk')
-rw-r--r--scripts/abilist.awk37
1 files changed, 20 insertions, 17 deletions
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 69da4512bf..c0b123f528 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -10,8 +10,7 @@ BEGIN {
# Per-file header.
/[^ :]+\.so\.[0-9]+:[ ]+.file format .*$/ {
- if (parse_names && soname != "")
- emit(1);
+ emit(0);
sofullname = $1;
sub(/:$/, "", sofullname);
@@ -19,9 +18,14 @@ BEGIN {
sub(/^.*\//, "", soname);
sub(/\.so\.[0-9]+$/, "", soname);
+ suppress = ((filename_regexp != "" && sofullname !~ filename_regexp) \
+ || (libname_regexp != "" && soname !~ libname_regexp));
+
next
}
+suppress { next }
+
# Normalize columns.
/^[0-9a-fA-F]+ / { sub(/ /, " - ") }
@@ -74,6 +78,9 @@ $2 == "g" || $2 == "w" && NF == 7 {
if (desc == "")
desc = " " symbol " " type size;
+ if (combine)
+ version = soname " " version (combine_fullname ? " " sofullname : "");
+
if (version in versions) {
versions[version] = versions[version] "\n" desc;
}
@@ -90,7 +97,13 @@ NF == 0 || /DYNAMIC SYMBOL TABLE/ || /file format/ { next }
print "Don't grok this line:", $0
}
-function emit(tofile) {
+function emit(end) {
+ if (! parse_names || soname == "")
+ return;
+ if (combine && !end)
+ return;
+ tofile = !combine;
+
nverslist = 0;
for (version in versions) {
if (nverslist == 0) {
@@ -119,9 +132,6 @@ function emit(tofile) {
++nverslist;
}
- if (combine)
- tofile = 0;
-
if (tofile) {
out = prefix soname ".symlist";
if (soname in outfiles)
@@ -141,12 +151,9 @@ function emit(tofile) {
outpipe = "sort >> " out;
}
else {
- if (combine_fullname)
- print prefix soname, version, sofullname;
- else if (combine)
- print prefix soname, version;
- else
- print version;
+ if (combine)
+ print "";
+ print prefix version;
outpipe = "sort";
}
print versions[version] | outpipe;
@@ -162,9 +169,5 @@ function emit(tofile) {
}
END {
- if (! parse_names)
- emit(0);
- else if (soname != "") {
- emit(1);
- }
+ emit(1);
}