Skip to content

Commit 8341ee4

Browse files
committed
powerpc: rough platform support
1 parent 7a05dc2 commit 8341ee4

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/rt/arch/powerpc/morestack.S

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "macros.S"
2+
3+
// Mark stack as non-executable
4+
#if defined(__linux__) && defined(__ELF__)
5+
.section .note.GNU-stack, "", %progbits
6+
#endif
7+
8+
/* See i386/morestack.S for the lengthy, general explanation. */
9+
10+
.global rust_stack_exhausted
11+
12+
.hidden __morestack
13+
14+
// FIXME(POWERPC): this might not be perfectly right but works for now
15+
__morestack:
16+
.cfi_startproc
17+
bl rust_stack_exhausted
18+
// the above function ensures that it never returns
19+
.cfi_endproc
20+
.end __morestack

src/rt/arch/powerpc/record_sp.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Mark stack as non-executable
2+
#if defined(__linux__) && defined(__ELF__)
3+
.section .note.GNU-stack, "", %progbits
4+
#endif

0 commit comments

Comments
 (0)