Skip to content

Commit 3a80d7b

Browse files
committed
rt: Set hidden visibility on __morestack
Each crate will have its own copy of this function, which should not be exported.
1 parent 28745aa commit 3a80d7b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/rt/arch/i386/morestack.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@
5252
.globl UPCALL_CALL_C_STACK
5353
.globl MORESTACK
5454

55+
// FIXME: What about _WIN32?
56+
#if defined(__linux__)
57+
.hidden MORESTACK
58+
#else
59+
#if defined(__APPLE__)
60+
.private_extern MORESTACK
61+
#endif
62+
#endif
63+
5564
#ifdef __ELF__
5665
.type MORESTACK,@function
5766
#endif

src/rt/arch/x86_64/morestack.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@
3535
.globl UPCALL_CALL_C
3636
.globl MORESTACK
3737

38+
// FIXME: What about _WIN32?
39+
#if defined(__linux__)
40+
.hidden MORESTACK
41+
#else
42+
#if defined(__APPLE__)
43+
.private_extern MORESTACK
44+
#endif
45+
#endif
46+
3847
#ifdef __ELF__
3948
.type MORESTACK,@function
4049
#endif

0 commit comments

Comments
 (0)