1 # This awk script expects to get command-line files that are each
2 # the output of 'readelf -d' on a single shared object.
3 # It exits successfully (0) if none contained any TEXTREL markers.
4 # It fails (1) if any did contain a TEXTREL marker.
5 # It fails (2) if the input did not take the expected form.
7 BEGIN { result = textrel = sanity = 0 }
9 function check_one(name) {
11 print name ": *** input did not look like readelf -d output";
14 print name ": *** text relocations used";
15 result = result ? result : 1;
23 FILENAME != lastfile {
29 $1 == "Tag" && $2 == "Type" { sanity = 1 }
30 $2 == "(TEXTREL)" { textrel = 1 }
32 for (i = 3; i <= NF; ++i) {