From 15a686af58c659a0c6c336582b9f1f6514a67137 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Mar 2003 11:54:09 +0000 Subject: * scripts/abilist.awk: If variable `parse_names' is set, grok the file header lines and write out foo.symlist files for each foo.so.NN listed. * libio/libioP.h (_IO_wfile_jumps): Remove attribute_hidden. This symbol is exported, and we don't want to hide it. Add libc_hidden_proto instead. (_IO_file_jumps): Add libc_hidden_proto. * libio/wfileops.c (_IO_wfile_jumps): Add libc_hidden_data_def. Remove INTVARDEF. * libio/fileops.c (_IO_file_jumps): Likewise. * libio/stdfiles.c: Don't use INTUSE on them. * libio/iofdopen.c (_IO_new_fdopen): Likewise. * libio/iofopen.c (__fopen_internal): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. * libio/iovdprintf.c (_IO_vdprintf): Likewise. --- scripts/abilist.awk | 56 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/abilist.awk b/scripts/abilist.awk index c25cbc0934..97266496fd 100644 --- a/scripts/abilist.awk +++ b/scripts/abilist.awk @@ -1,6 +1,27 @@ # This awk script processes the output of objdump --dynamic-syms # into a simple format that should not change when the ABI is not changing. +BEGIN { + if (parse_names) + out = "/dev/stderr"; + else + out = "/dev/stdout"; +} + +# Per-file header. +/[^ :]+\.so\.[0-9]+:[ ]+.file format .*$/ { + if (parse_names && soname != "") + emit(1); + + sofullname = $1; + sub(/:$/, "", sofullname); + soname = sofullname; + sub(/^.*\//, "", soname); + sub(/\.so\.[0-9]+$/, "", soname); + + next +} + # Normalize columns. /^[0-9a-fA-F]+ / { sub(/ /, " - ") } @@ -41,11 +62,11 @@ $2 == "g" || $2 == "w" && NF == 7 { size = ""; } else { - print symbol, version, weak, "?", type, $4, $5; + print symbol, version, weak, "?", type, $4, $5 >> out; next; } if (size == " 0x") { - print symbol, version, weak, "?", type, $4, $5; + print symbol, version, weak, "?", type, $4, $5 >> out; next; } @@ -66,10 +87,20 @@ $2 == "g" || $2 == "w" && NF == 7 { NF == 0 || /DYNAMIC SYMBOL TABLE/ || /file format/ { next } { - print "Don't grok this line:", $0 + print "Don't grok this line:", $0 >> out } -END { +function emit(tofile) { + if (tofile) { + out = prefix soname ".symlist"; + if (soname in outfiles) + out = out "." ++outfiles[soname]; + else + outfiles[soname] = 1; + } + else + out = "/dev/stdout"; + nverlist = 0; for (version in versions) { if (nverslist == 0) { @@ -102,9 +133,22 @@ END { for (i = 1; i <= nverslist; ++i) { version = order[i]; - print version; - outpipe = "sort"; + print version >> out; + outpipe = "sort >> " out; print versions[version] | outpipe; close(outpipe); + + delete versions[version]; + } + + if (tofile) + print "wrote", out, "for", sofullname; +} + +END { + if (! parse_names) + emit(0); + else if (soname != "") { + emit(1); } } -- cgit v1.2.3