mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 21:14:27 +01:00
asm: make all text section labels .L local
To help with backtraces if we ever fix them due to the lkmc_asm_main_after_prologue debacle.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include <lkmc.h>
|
||||
|
||||
LKMC_PROLOGUE
|
||||
jmp after_fail
|
||||
jmp .Lafter_fail
|
||||
LKMC_ASSERT_FAIL
|
||||
after_fail:
|
||||
.Lafter_fail:
|
||||
LKMC_EPILOGUE
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
LKMC_PROLOGUE
|
||||
/* Address in memory. */
|
||||
.section .rodata
|
||||
label_address: .quad memory_label
|
||||
label_address: .quad .Lmemory_label
|
||||
.text
|
||||
jmp *label_address
|
||||
LKMC_ASSERT_FAIL
|
||||
memory_label:
|
||||
.Lmemory_label:
|
||||
|
||||
/* Address in register. */
|
||||
lea register_label(%rip), %rax
|
||||
lea .Lregister_label(%rip), %rax
|
||||
jmp *%rax
|
||||
LKMC_ASSERT_FAIL
|
||||
register_label:
|
||||
.Lregister_label:
|
||||
LKMC_EPILOGUE
|
||||
|
||||
@@ -13,9 +13,9 @@ LKMC_PROLOGUE
|
||||
*/
|
||||
mov $0, %rax
|
||||
mov $3, %rcx
|
||||
loop_label:
|
||||
.Lloop_label:
|
||||
inc %rax
|
||||
loop loop_label
|
||||
loop .Lloop_label
|
||||
LKMC_ASSERT_EQ(%rax, $3)
|
||||
|
||||
/* LOOPE
|
||||
@@ -37,10 +37,10 @@ loop_label:
|
||||
/* Array length. */
|
||||
mov $4, %rcx
|
||||
mov $-1, %rax
|
||||
loope_label:
|
||||
.Lloope_label:
|
||||
inc %rax
|
||||
cmpb $0, loope_array(%rax)
|
||||
loope loope_label
|
||||
loope .Lloope_label
|
||||
/* The first non-zero item (1) was at index 2. */
|
||||
LKMC_ASSERT_EQ(%rax, $2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user