summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64/sys/exect.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/amd64/sys/exect.S')
-rw-r--r--lib/libc/amd64/sys/exect.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/amd64/sys/exect.S b/lib/libc/amd64/sys/exect.S
index 180a309..d71a94b 100644
--- a/lib/libc/amd64/sys/exect.S
+++ b/lib/libc/amd64/sys/exect.S
@@ -51,4 +51,9 @@ ENTRY(exect)
pushq %r8
popfq
KERNCALL
- jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */
+#ifdef PIC
+ movq PIC_GOT(HIDENAME(cerror)),%rdx
+ jmp *%rdx
+#else
+ jmp HIDENAME(cerror)
+#endif
OpenPOWER on IntegriCloud