This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -32,5 +32,5 @@ kernel_module!(
32
32
HelloWorldModule ,
33
33
author: "Alex Gaynor and Geoffrey Thomas" ,
34
34
description: "An extremely simple kernel module" ,
35
- license : "GPL"
35
+ __module_license_string : "GPL"
36
36
) ;
Original file line number Diff line number Diff line change
1
+ ifneq ($(KERNELRELEASE ) ,)
1
2
obj-m := testmodule.o
2
3
testmodule-objs := $(TEST_LIBRARY )
3
4
EXTRA_LDFLAGS += --entry=init_module
4
5
6
+ $(M ) /$(TEST_LIBRARY ) : $(TEST_LIBRARY_ARCHIVE )
7
+ $(LD ) -r -o $@ --whole-archive $^
8
+ else
5
9
all :
6
10
$(MAKE ) -C /lib/modules/$(shell uname -r) /build M=$(CURDIR )
7
11
8
12
clean :
9
13
$(MAKE ) -C /lib/modules/$(shell uname -r) /build M=$(CURDIR ) clean
14
+ endif
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ def main():
46
46
path
47
47
)
48
48
)
49
+ library_archive , _ = os .path .splitext (os .path .basename (module ))
50
+ library_archive = os .path .join (library_archive , ".a" )
49
51
run (
50
52
"make" , "-C" , BASE_DIR ,
51
53
"TEST_LIBRARY={}" .format (
@@ -54,6 +56,7 @@ def main():
54
56
os .path .basename (module )
55
57
)
56
58
),
59
+ "TEST_LIBRARY_ARCHIVE={}" .format (library_archive ),
57
60
)
58
61
run (
59
62
"rustc" ,
You can’t perform that action at this time.
0 commit comments