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:
Ciro Santilli 六四事件 法轮功
2019-06-16 00:00:01 +00:00
parent 4d4b82f248
commit b3874cc72b
14 changed files with 43 additions and 46 deletions

View File

@@ -6,14 +6,14 @@
data_label:
.word 0x1234678
LKMC_PROLOGUE
adr r4, label
adr r4, .Llabel
/* objdump tells us that this uses the literal pool,
* it does not get converted to adr, which is the better
* alternative here.
*/
ldr r5, =label
adrl r6, label
label:
ldr r5, =.Llabel
adrl r6, .Llabel
.Llabel:
LKMC_ASSERT_EQ_REG(r4, r5)
LKMC_ASSERT_EQ_REG(r4, r6)

View File

@@ -3,7 +3,7 @@
#include <lkmc.h>
LKMC_PROLOGUE
/* Jump over the fail. 26-bit PC-relative. */
b ok
b .Lok
LKMC_ASSERT_FAIL
ok:
.Lok:
LKMC_EPILOGUE

View File

@@ -48,7 +48,6 @@ LKMC_PROLOGUE
10:
/* Another example with mov reading from pc. */
pc_addr:
mov r0, pc
/* Why sub 8:
* https://stackoverflow.com/questions/24091566/why-does-the-arm-pc-register-point-to-the-instruction-after-the-next-one-to-be-e

View File

@@ -46,8 +46,8 @@ LKMC_PROLOGUE
* This construct is not possible in ARMv8 for str:
* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-str-instruction
*/
str r1, var_in_same_section
var_in_same_section:
str r1, .Lvar_in_same_section
.Lvar_in_same_section:
#endif
/* = sign just doesn't make sense for str, you can't set the