mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
asm: make use regular asserts that will just work on baremetal
Previously had wonky line pointer in asm_main. New interface simpler and more portable. Add tests for ASSERT_EQ_ and family in arm and aarch64, previously on x86_64. ASSERT_EQ_ and family in ARM can now either take =123, =addr or var, before this the = was added on macros so var was not possible. Define the main function directly in assembly, the C driver was useless.
This commit is contained in:
@@ -60,25 +60,6 @@ Default: build all examples that have their package dependencies met, e.g.:
|
||||
extra_deps=[self.env['common_h']],
|
||||
link=False,
|
||||
)
|
||||
extra_obj_userland_asm = os.path.join(
|
||||
build_dir,
|
||||
'arch',
|
||||
'main' + self.env['obj_ext']
|
||||
)
|
||||
extra_obj_userland_asm_relpath = os.path.join(
|
||||
'arch',
|
||||
'main' + self.env['c_ext']
|
||||
)
|
||||
self._build_one(
|
||||
in_path=os.path.join(
|
||||
self.env['userland_source_dir'],
|
||||
extra_obj_userland_asm_relpath
|
||||
),
|
||||
out_path=extra_obj_userland_asm,
|
||||
cc_flags=cc_flags,
|
||||
extra_deps=[self.env['common_h']],
|
||||
link=False,
|
||||
)
|
||||
with thread_pool.ThreadPool(
|
||||
self._build_one,
|
||||
nthreads=self.env['nproc'],
|
||||
@@ -94,7 +75,6 @@ Default: build all examples that have their package dependencies met, e.g.:
|
||||
my_thread_pool.submit({
|
||||
'cc_flags': cc_flags,
|
||||
'extra_objs_lkmc_common': [extra_obj_lkmc_common],
|
||||
'extra_objs_userland_asm': [extra_obj_userland_asm],
|
||||
'in_path': in_path,
|
||||
'out_path': self.resolve_userland_executable(in_path),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user