summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/microblaze/vfork.S
diff options
context:
space:
mode:
authorRyan Flux <ryan.flux@emsolutions.com.au>2011-10-04 10:50:49 +1000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-10-06 22:22:25 +0200
commit331b43717229eaad2a95bf420f5100079bd53683 (patch)
tree784606042014321101c611ef4650b1b6aacff76a /libc/sysdeps/linux/microblaze/vfork.S
parentcc5499a6a678e4caf1b06f33192de84d5ab88fd5 (diff)
microblaze mmu/elf/shared lib support
microblaze can either be with mmu or without If with, use elf rather than flat, and support shared libs Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/microblaze/vfork.S')
-rw-r--r--libc/sysdeps/linux/microblaze/vfork.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/microblaze/vfork.S b/libc/sysdeps/linux/microblaze/vfork.S
index c4b4dbf2f..57db5e543 100644
--- a/libc/sysdeps/linux/microblaze/vfork.S
+++ b/libc/sysdeps/linux/microblaze/vfork.S
@@ -36,7 +36,14 @@ __vfork:
blti r4, 1f /* is r3 < -125? */
bri 2f /* normal return */
1: sub r3, r3, r0 /* r3 = -r3 */
+#ifdef __PIC__
+ mfs r3,rpc
+ addik r3,r3,_GLOBAL_OFFSET_TABLE_+8
+ lwi r3,r3,C_SYMBOL_NAME(errno)@GOT
+ sw r3, r0, r3
+#else
swi r3, r0, C_SYMBOL_NAME(errno);
+#endif
/* state restore etc */
2: rtsd r15, 8 /* error return */
nop