Update of /cvsroot/linux-vax/glibc/sysdeps/vax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19473
Modified Files:
dl-machine.h
Log Message:
call _dl_start correctly at least
Index: dl-machine.h
===================================================================
RCS file: /cvsroot/linux-vax/glibc/sysdeps/vax/dl-machine.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dl-machine.h 16 Jan 2004 14:55:44 -0000 1.7
+++ dl-machine.h 23 Feb 2004 11:16:32 -0000 1.8
@@ -73,8 +73,12 @@
static inline Elf32_Addr
elf_machine_load_address (void)
{
+ extern void __dl_start asm("_dl_start");
+ Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
+
+ // __asm__("moval _dl_start, %0\n\t" : "=r" (pcrel_addr));
+ return got_addr-2;
#if 0
-
Elf32_Addr gotaddr_diff;
__asm__ ("sub.d [$r0+_dl_start:GOT16],$r0,%0\n\t"
"add.d _dl_start:GOTOFF,%0" : "=r" (gotaddr_diff));
@@ -186,7 +190,18 @@
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
-#define RTLD_START
+#define RTLD_START asm ("\
+ .text\n\
+ .globl _start\n\
+_start:\n\
+ .word 0x0101\n\
+ calls $0,_dl_start\n\
+ .globl _dl_start_user\n\
+ .type _dl_start_user,@function
+_dl_start_user:\n\
+ .word 0x0000\n\
+ .size _dl_start_user, . - _dl_start_user\n \
+ .previous");
#if 0
#endif
|