Skip to content

Commit 956ebf6

Browse files
authored
Merge pull request #53 from joe-lawrence/import-ns
x86: add module symbol import test
2 parents a51c80a + 70422e7 commit 956ebf6

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

x86_64/import-ns.ORIG.o

4.05 KB
Binary file not shown.

x86_64/import-ns.PATCHED.o

6.13 KB
Binary file not shown.

x86_64/import-ns.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
source $KPATCH_TEST_LIBRARY
3+
4+
TESTFILE=$(basename "$0")
5+
OUTFILE=${TESTFILE%.test}.OUTPUT.o
6+
7+
# Verify there are four namespace imports in the resulting .modinfo section, e.g.
8+
#
9+
# String dump of section '.modinfo':
10+
# [ 0] import_ns=KPATCH_TEST2
11+
# [ 17] import_ns=KPATCH_TEST
12+
# [ 2d] import_ns=DEVMEM
13+
# [ 3e] import_ns=DMA_BUF
14+
15+
[[ $(readelf --wide --string-dump=.modinfo "$OUTFILE" | grep --count -e 'import_ns=') == 4 ]]

0 commit comments

Comments
 (0)