diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-02-18 16:48:11 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-02-18 16:48:11 +0000 |
commit | 8182e7cfe7d9c60567e48b876282594395062530 (patch) | |
tree | bb743948c6e926539b030102b804b5708222e8d4 /mdk-stage1/dietlibc/libdl/_dl_jump.S | |
parent | c93f95560d3fde9eaefcc62c454c67b8b5626fa7 (diff) | |
download | drakx-backup-do-not-use-8182e7cfe7d9c60567e48b876282594395062530.tar drakx-backup-do-not-use-8182e7cfe7d9c60567e48b876282594395062530.tar.gz drakx-backup-do-not-use-8182e7cfe7d9c60567e48b876282594395062530.tar.bz2 drakx-backup-do-not-use-8182e7cfe7d9c60567e48b876282594395062530.tar.xz drakx-backup-do-not-use-8182e7cfe7d9c60567e48b876282594395062530.zip |
Merge in CVS dietlibc 0.21 for IA-64 and X86-64 support. However, drop the
following architectures we currently don't support: arm, mips, mipsel, parisc,
s390, sparc64.
Diffstat (limited to 'mdk-stage1/dietlibc/libdl/_dl_jump.S')
-rw-r--r-- | mdk-stage1/dietlibc/libdl/_dl_jump.S | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/mdk-stage1/dietlibc/libdl/_dl_jump.S b/mdk-stage1/dietlibc/libdl/_dl_jump.S index 134f31ea5..bd7115258 100644 --- a/mdk-stage1/dietlibc/libdl/_dl_jump.S +++ b/mdk-stage1/dietlibc/libdl/_dl_jump.S @@ -1,8 +1,55 @@ .text .global _dl_jump _dl_jump: + +#ifdef __i386__ +.type _dl_jump,@function + + pushl %eax # save register args... + pushl %ecx + pushl %edx + + pushl %ebx + + pushl 20(%esp) # 2. arg from plt + pushl 20(%esp) # 1. arg from plt + +#ifdef __DYN_LIB + call 1f +1: popl %ebx + addl $_GLOBAL_OFFSET_TABLE_+[.-1b],%ebx + call do_rel@PLT +#else call do_rel - pop %edx - pop %edx - jmp *%eax +#endif + addl $8, %esp + + popl %ebx + + popl %edx # restore register args... + popl %ecx + + xchgl %eax, (%esp) # restore eax and save function pointer (for return) + + ret $8 # remove arguments from plt and jump to REAL function + +#endif + +#ifdef __arm__ +.type _dl_jump,function + + stmdb sp!, {r0, r1, r2, r3} + sub r1, ip, lr + sub r1, r1, #4 + add r1, r1, r1 /* dyntab entry */ + ldr r0, [lr, #-4] /* dynlib handle */ +#ifdef __DYN_LIB + bl do_rel(PLT) +#else + bl do_rel +#endif + mov r12, r0 + ldmia sp!, {r0, r1, r2, r3, lr} + mov pc, r12 +#endif |