1 # This is an awk script to process the output of elf/check-localplt.
2 # The first file argument is the file of expected results.
3 # Each line is either a comment starting with # or it looks like:
6 # libfoo.so: function ?
7 # The latter means that a PLT entry for function is optional in libfoo.so.
8 # The former means one is required.
9 # The second file argument is - and this (stdin) receives the output
10 # of the check-localplt program.
14 FILENAME != "-" && /^#/ { next }
17 if (NF != 2 && !(NF == 3 && $3 == "?")) {
18 printf "%s:%d: bad data line: %s\n", FILENAME, FNR, $0 > "/dev/stderr";
21 accept[$1 " " $2] = NF == 2;
27 print "Unexpected output from check-localplt:", $0 > "/dev/stderr";
37 print "Extra PLT reference:", $0;
47 print "Missing required PLT reference:", key;