This repository was archived by the owner on Mar 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Fixed invalid module format & recent nightly support #67
Closed
+33
−15
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
9aba3a5
Updated to work with recent nightly
TheDan64 77405f0
Fix kernel_module todo
TheDan64 c017df5
Manually pass the correct target to bindgen/clang in the top-level bu…
ahomescu 1a37aa0
Use an older toolchain to build the module (nightly-2018-06-20), whic…
ahomescu 9928052
Link libhello_world.a into an object file before linking it into the …
ahomescu 7ea79fe
Updated hello-world makefile to check if inside the kernel build syst…
ahomescu feddc85
Fixed rust-toolchain file
ahomescu 1e08b63
Bumped nightly up to 2018-10-11 (last known good nightly), bumped bin…
ahomescu 24fedec
Removed extern C from oom function (omitted from previous commit)
ahomescu ffbe33a
Add needs-plt option to target spec to prevent the compiler from usin…
ahomescu e5e83e1
Remove rust-toolchain file, now that the build works with any nightly
ahomescu 2f2183d
Use the latest version of bindgen again
ahomescu 0525b4b
Fixed dead code for travis
TheDan64 742b833
Added const_str_as_bytes feature to sysctl-tests
TheDan64 745c74f
Attempt to fix tests
TheDan64 5253b58
Fix .a path generation
TheDan64 f9f2367
Fixed tests Makefile. Removed no_copy. Fixed run_test script
TheDan64 4cb0789
Added rustfmt to travis install
TheDan64 bf4487f
See what happens if we disable PLT
alex 40cabf0
Fix merge
alex cb35691
Re-enable needs-plt
TheDan64 d279b77
Add accidentally removed comment
TheDan64 3cfcb0b
Addded desc_struct to opaque list due to it being packed and aligned
TheDan64 5aaf0ec
Revert Makefile path change to what's on master
TheDan64 b0ca675
Fixed KDIR location in makefiles
TheDan64 ef7ec88
Remove alloc feature as it is stable
alex b43e795
Disable trusty build in travis
TheDan64 40dc3bf
Remove trusty from travis build matrix
TheDan64 26d6d69
Add TODO to kernel module macro
TheDan64 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
ifneq ($(KERNELRELEASE),) | ||
obj-m := helloworld.o | ||
helloworld-objs := target/x86_64-linux-kernel-module/debug/libhello_world.a | ||
helloworld-objs := libhello_world.o | ||
EXTRA_LDFLAGS += --entry=init_module | ||
|
||
$(M)/libhello_world.o: target/x86_64-linux-kernel-module/debug/libhello_world.a | ||
$(LD) -r -o $@ --whole-archive $^ | ||
else | ||
KDIR ?= /lib/modules/$(shell uname -r)/build | ||
|
||
all: | ||
$(MAKE) -C $(KDIR) M=$(CURDIR) | ||
|
||
clean: | ||
$(MAKE) -C $(KDIR) M=$(CURDIR) clean | ||
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
ifneq ($(KERNELRELEASE),) | ||
obj-m := testmodule.o | ||
testmodule-objs := $(TEST_LIBRARY) | ||
testmodule-objs := $(TEST_LIBRARY_OBJECT) | ||
EXTRA_LDFLAGS += --entry=init_module | ||
|
||
$(M)/$(TEST_LIBRARY_OBJECT): target/x86_64-linux-kernel-module/debug/$(TEST_LIBRARY_ARCHIVE) | ||
$(LD) -r -o $@ --whole-archive $^ | ||
else | ||
KDIR ?= /lib/modules/$(shell uname -r)/build | ||
|
||
all: | ||
$(MAKE) -C $(KDIR) M=$(CURDIR) | ||
|
||
clean: | ||
$(MAKE) -C $(KDIR) M=$(CURDIR) clean | ||
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#![no_std] | ||
#![feature(const_str_as_bytes)] | ||
|
||
#[macro_use] | ||
extern crate linux_kernel_module; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#![no_std] | ||
#![feature(const_str_as_bytes)] | ||
|
||
use core::sync::atomic::AtomicBool; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.