Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151234008
D22421.id64468.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22421.id64468.diff
View Options
Index: lib/libc/powerpc64/gen/_ctx_start.S
===================================================================
--- lib/libc/powerpc64/gen/_ctx_start.S
+++ lib/libc/powerpc64/gen/_ctx_start.S
@@ -32,8 +32,14 @@
.globl CNAME(abort)
ENTRY(_ctx_start)
+#if !defined(_CALL_ELF) || _CALL_ELF == 1
+ /* Load values from function descriptor */
ld %r2,8(%r14)
ld %r14,0(%r14)
+#else
+ /* Load global entry point */
+ mr %r12,%r14
+#endif
mtlr %r14
blrl /* branch to start function */
mr %r3,%r15 /* pass pointer to ucontext as argument */
Index: lib/libc/powerpc64/gen/makecontext.c
===================================================================
--- lib/libc/powerpc64/gen/makecontext.c
+++ lib/libc/powerpc64/gen/makecontext.c
@@ -113,7 +113,12 @@
* Use caller-saved regs 14/15 to hold params that _ctx_start
* will use to invoke the user-supplied func
*/
+#if !defined(_CALL_ELF) || _CALL_ELF == 1
+ /* Cast to ensure this is treated as a function descriptor. */
mc->mc_srr0 = *(uintptr_t *)_ctx_start;
+#else
+ mc->mc_srr0 = (uintptr_t) _ctx_start;
+#endif
mc->mc_gpr[1] = (uintptr_t) sp; /* new stack pointer */
mc->mc_gpr[14] = (uintptr_t) start; /* r14 <- start */
mc->mc_gpr[15] = (uintptr_t) ucp; /* r15 <- ucp */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 12:50 AM (10 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31060663
Default Alt Text
D22421.id64468.diff (1 KB)
Attached To
Mode
D22421: [PowerPC] Fix *context on ELFv2
Attached
Detach File
Event Timeline
Log In to Comment