Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/asm/jump_arm64_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,29 @@

.file "jump_arm64_aapcs_elf_gas.S"
.text
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
/* Mark this object as requiring BTI, enabling the linker to set BTI on the output */
.pushsection .note.gnu.property, "a", %note
.p2align 3
.long 4 /* namesz */
.long 16 /* descsz (16 bytes) */
.long 5 /* type = NT_GNU_PROPERTY_TYPE_0 */
.asciz "GNU"
.p2align 3
.long 0xc0000000 /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
.long 4 /* datasz = 4 */
.long 1 /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
.long 0 /* pad to 8-byte alignment */
.popsection
#endif
.align 2
.global jump_fcontext
.hidden jump_fcontext
.type jump_fcontext, %function
jump_fcontext:
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
hint #34 /* bti c: valid indirect-entry target */
#endif
# prepare stack for GP + FPU
sub sp, sp, #0xb0

Expand Down
18 changes: 18 additions & 0 deletions src/asm/make_arm64_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,29 @@

.file "make_arm64_aapcs_elf_gas.S"
.text
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
/* Mark this object as requiring BTI, enabling the linker to set BTI on the output */
.pushsection .note.gnu.property, "a", %note
.p2align 3
.long 4 /* namesz */
.long 16 /* descsz (16 bytes) */
.long 5 /* type = NT_GNU_PROPERTY_TYPE_0 */
.asciz "GNU"
.p2align 3
.long 0xc0000000 /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
.long 4 /* datasz = 4 */
.long 1 /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
.long 0 /* pad to 8-byte alignment */
.popsection
#endif
.align 2
.global make_fcontext
.hidden make_fcontext
.type make_fcontext, %function
make_fcontext:
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
hint #34 /* bti c */
#endif
# shift address in x0 (allocated stack) to lower 16 byte boundary
and x0, x0, ~0xF

Expand Down
18 changes: 18 additions & 0 deletions src/asm/ontop_arm64_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,29 @@

.file "ontop_arm64_aapcs_elf_gas.S"
.text
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
/* Mark this object as requiring BTI, enabling the linker to set BTI on the output */
.pushsection .note.gnu.property, "a", %note
.p2align 3
.long 4 /* namesz */
.long 16 /* descsz (16 bytes) */
.long 5 /* type = NT_GNU_PROPERTY_TYPE_0 */
.asciz "GNU"
.p2align 3
.long 0xc0000000 /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
.long 4 /* datasz = 4 */
.long 1 /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
.long 0 /* pad to 8-byte alignment */
.popsection
#endif
.align 2
.global ontop_fcontext
.hidden ontop_fcontext
.type ontop_fcontext, %function
ontop_fcontext:
#if defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)
hint #34 /* bti c */
#endif
# prepare stack for GP + FPU
sub sp, sp, #0xb0

Expand Down
Loading