[PATCH] Adjust abilist.awk for Alpha
Richard Henderson
rth@twiddle.net
Sat May 26 17:03:00 GMT 2012
Alpha uses the ST_OTHER field, which gets printed as field 7. E.g.
000000000007d600 g DF .text 0000000000000204 GLIBC_2.2 0x88 putwchar
with an additional complication of e.g.
00000000000fe7c0 g D .text 0000000000000060 GLIBC_2.0 0x80 __divlu
which is done so that callers of the division routines do *not* go through
a plt entry. (Non-standard calling conventions.)
Sanity tested on x86_64. Ok?
r~
-------------- next part --------------
* scripts/abilist.awk: Accept 8 fields. Handle Alpha functions
marked to avoid plt entry.
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 6a08839..f2e3857 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -37,14 +37,14 @@ $4 == "*UND*" { next }
# Skip locals.
$2 == "l" { next }
-$2 == "g" || $2 == "w" && NF == 7 {
+$2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
weak = $2;
type = $3;
size = $5;
sub(/^0*/, "", size);
size = " 0x" size;
version = $6;
- symbol = $7;
+ symbol = (NF == 8 ? $8 : $7);
gsub(/[()]/, "", version);
if (version == "GLIBC_PRIVATE") next;
@@ -60,6 +60,12 @@ $2 == "g" || $2 == "w" && NF == 7 {
type = "O";
seen_opd = 1;
}
+ else if (type == "D" && NF == 8 && $7 == "0x80") {
+ # Alpha functions avoiding plt entry in users
+ type = "F";
+ size = "";
+ seen_opd = -1;
+ }
else if ($4 == "*ABS*") {
type = "A";
size = "";
More information about the Libc-alpha
mailing list