Skip to content

Commit

Permalink
tests: check for exported symbols in the data section as well
Browse files Browse the repository at this point in the history
The PowerPC64 ELFv1 ABI puts the function descriptor symbols there,
but why restrict the consistency check to the text section anyway?

Signed-off-by: Ferenc Wágner <wferi@debian.org>
  • Loading branch information
wferi committed Jan 18, 2018
1 parent b41f463 commit 6269ff7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libknet/tests/api-test-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ builddir="$2"/libknet/tests

headerapicalls="$(grep knet_ "$srcdir"/../libknet.h | grep -v "^ \*" | grep -v ^struct | grep -v "^[[:space:]]" | grep -v typedef | sed -e 's/(.*//g' -e 's/^const //g' -e 's/\*//g' | awk '{print $2}')"

exportedapicalls="$(nm -B -D "$builddir"/../.libs/libknet.so | grep ' T ' | awk '{print $3}')"
# The PowerPC64 ELFv1 ABI defines the address of a function as that of a
# function descriptor defined in .opd, a data (D) section. Other ABIs
# use the entry address of the function itself in the text (T) section.
exportedapicalls="$(nm -B -D "$builddir"/../.libs/libknet.so | grep ' [DT] ' | awk '{print $3}')"

echo "Checking for exported symbols NOT available in header file"

Expand Down

0 comments on commit 6269ff7

Please sign in to comment.