hurd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

check-syms script


From: Roland McGrath
Subject: check-syms script
Date: Sun, 23 Dec 2001 02:24:30 -0500 (EST)

This is mostly for Jeff, but here to get it archived too.

I just whipped up the following script.  After you have built a scad of
libio packages and have a libio-based install directory that you think
might sort of work, I'd like you to run this here script on all its
binaries.  It consolidates information, so running it on many binaries in a
single command line is more helpful than running it many times.

This summarizes the undefined dynamic symbols and their version sets.  I
want to look over the list from a goodly set of real program binaries,
especially ones with no special Hurd magic, and convince myself I have the
libc.so.0.3 ABI the way I want it before we let it loose.  (Hopefully I can
get it right so it will be possible to drop in pthreads later without
changing the version sets used by most single-threaded programs.)

Thanks,
Roland


#!/bin/sh
${OBJDUMP:-objdump} --dynamic-syms ${1+"$@"} | ${AWK:-awk} '
$3 == "*UND*" && NF == 6 {
  sets[$5] = sets[$5] "\n\t" $6;
}

$3 == "*UND*" && NF == 5 {
  sets[""] = sets[""] "\n\t" $5;
}

$2 == "w" && $4 == "*UND*" && NF == 7 {
  sets[$6] = sets[$6] "\nweak\t" $7;
}

$2 == "w" && $4 == "*UND*" && NF == 6 {
  sets[""] = sets[""] "\nweak\t" $6;
}

END {
  for (set in sets) {
    if (set != "") {
      printf "%s", set;
      out = "sort -u";
      print sets[set] | out;
      close(out)
    }
  }
  printf "default";
  print sets[""] | "sort -u";
}'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]