mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
gas_data_sizes.S: make PIE for all ISAs
This commit is contained in:
@@ -11788,7 +11788,7 @@ Conclusion:
|
|||||||
|
|
||||||
[options="header"]
|
[options="header"]
|
||||||
|===
|
|===
|
||||||
|byte |word |long |quad |octa
|
|.byte |.word |.long |.quad |.octa
|
||||||
|
|
||||||
|x86
|
|x86
|
||||||
|1
|
|1
|
||||||
@@ -11813,7 +11813,7 @@ Conclusion:
|
|||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
and also keep in mind that:
|
and also keep in mind that according to the manual:
|
||||||
|
|
||||||
* `.int` is the same as `.long`
|
* `.int` is the same as `.long`
|
||||||
* `.hword` is the same as `.short` which is usually the same as `.word`
|
* `.hword` is the same as `.short` which is usually the same as `.word`
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#ifndef COMMON_ARCH_H
|
#ifndef COMMON_ARCH_H
|
||||||
#define COMMON_ARCH_H
|
#define COMMON_ARCH_H
|
||||||
|
|
||||||
|
/* This and other macros may make C function calls, and therefore can destroy
|
||||||
|
* non-callee saved registers. */
|
||||||
#define ASSERT_EQ(general1, general2) \
|
#define ASSERT_EQ(general1, general2) \
|
||||||
mov general2, %rdi; \
|
mov general2, %rdi; \
|
||||||
push %rdi; \
|
push %rdi; \
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
ENTRY
|
ENTRY
|
||||||
#define ASSERT_DIFF(label1, label2, result) \
|
#define ASSERT_DIFF(label1, label2, result) \
|
||||||
mov $label2, %rax; \
|
lea label2(%rip), %rax; \
|
||||||
sub $label1, %rax; \
|
lea label1(%rip), %rbx; \
|
||||||
|
sub %rbx, %rax; \
|
||||||
ASSERT_EQ(%rax, $result)
|
ASSERT_EQ(%rax, $result)
|
||||||
|
|
||||||
ASSERT_DIFF(mybyte, myword, 1)
|
ASSERT_DIFF(mybyte, myword, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user