about summary refs log tree commit diff
path: root/sysdeps/arm
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-20 17:40:36 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-20 17:40:36 +0000
commitdf777c40c1d8bc15dcc71a7da183f2a2c99bda62 (patch)
tree77399ad67d41ea0cad918434d6d84f962c459d04 /sysdeps/arm
parent0c6cee5d656d933100b86b7d58803bdbd549e456 (diff)
downloadglibc-df777c40c1d8bc15dcc71a7da183f2a2c99bda62.tar.gz
glibc-df777c40c1d8bc15dcc71a7da183f2a2c99bda62.tar.xz
glibc-df777c40c1d8bc15dcc71a7da183f2a2c99bda62.zip
Update.
1998-08-20 16:01  Ulrich Drepper  <drepper@cygnus.com>

	* elf/ldd.sh.in: Redirect warnings and error messages to stderr.
	* elf/ldd.bash.in: Likewise.

	* elf/sln.c: Avoid warning for no main prototype.

	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Remove O_READ and
	O_WRITE.
	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.

	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Add F_SETSIG and
	F_GETSIG.
	* sysdeps/unix/sysv/linux/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.

1998-08-20  Philip Blundell  <pb@nexus.co.uk>

	* sysdeps/arm/fpu/ieee754.h: Move to...
	* sysdeps/arm/ieee754.h: ... here.

	* sysdeps/arm/__longjmp.S: Put return value in correct register.
	Don't set the condition flags unnecessarily.
	* sysdeps/arm/fpu/__longjmp.S: Likewise.  Restore floating point
	registers correctly.

	* sysdeps/arm/dl-machine.h: Fix problems with profiling code
	(patch from Scott Bambrough).

	* sysdeps/arm/sysdep.h (CALL_MCOUNT): Add missing semicolons.

	* csu/initfini.c (_init): Don't check whether __gmon_start__ is
	NULL, just call it unconditionally.
	(__gmon_start__): Provide stub version as a weak symbol.

1998-07-30  Philip Blundell  <philb@gnu.org>

	* sysdeps/unix/sysv/linux/arm/init-first.h: New file (from patch
	by Scott Bambrough)

	* sysdeps/unix/sysv/linux/arm/errlist.c: New file; ARM tools don't
	like `@' in .type directives.

	* sysdeps/arm/bsd-setjmp.S: Use PLT for procedure call.
	* sysdeps/arm/bsd-_setjmp.S: Likewise.

	* sysdeps/arm/dl-machine.h: Set __libc_stack_end.

1998-08-20  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN): Correct value.
	(F_GETOWN): Likewise.

	* sysdeps/unix/sysv/linux/bits/siginfo.h (SI_SIGIO): Add it (from
	Linux 2.1.117).

1998-08-20  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/glob.c [_LIBC]: Define __stat only if not
	already defined.

1998-08-14  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/nss_compat/compat-grp.c: Set errno to ENOENT if we have no
	more entries.
	* nis/nss_compat/compat-initgroups.c: Likewise.
	* nis/nss_compat/compat-pwd.c: Likewise.
	* nis/nss_compat/compat-spwd.c: Likewise.
	* nis/nss_nis/nis-alias.c: Likewise.
	* nis/nss_nis/nis-ethers.c: Likewise.
	* nis/nss_nis/nis-grp.c: Likewise.
	* nis/nss_nis/nis-hosts.c: Likewise.
	* nis/nss_nis/nis-initgroups.c: Likewise.
	* nis/nss_nis/nis-network.c: Likewise.
	* nis/nss_nis/nis-proto.c: Likewise.
	* nis/nss_nis/nis-pwd.c: Likewise.
	* nis/nss_nis/nis-rpc.c: Likewise.
	* nis/nss_nis/nis-service.c: Likewise.
	* nis/nss_nis/nis-spwd.c: Likewise.

	* nis/rpcsvc/yp.h: Generate new without 1024 byte limits.

	* nis/ypclnt.c: Try binding dir only first time, could be to old.

	* nis/yp_xdr.c: Remove 1024 byte limit.
	* nis/ypupdate_xdr.c: Likewise.

	* nis/nss_nis/nis-publickey.c: Make sure, nobody could send
	wrong data.
Diffstat (limited to 'sysdeps/arm')
-rw-r--r--sysdeps/arm/__longjmp.S6
-rw-r--r--sysdeps/arm/bsd-_setjmp.S2
-rw-r--r--sysdeps/arm/bsd-setjmp.S2
-rw-r--r--sysdeps/arm/dl-machine.h60
-rw-r--r--sysdeps/arm/fpu/__longjmp.S10
-rw-r--r--sysdeps/arm/ieee754.h (renamed from sysdeps/arm/fpu/ieee754.h)0
-rw-r--r--sysdeps/arm/sysdep.h4
7 files changed, 48 insertions, 36 deletions
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 239b0cfc85..742e0baa16 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -25,9 +25,9 @@
 /* __longjmp(jmpbuf, val) */
 
 ENTRY (__longjmp)
-	movs	r2, r0
+	mov	ip, r0
 	movs	r0, r1		/* get the return value in place */
-	moveq	r1, #1		/* can't let setjmp() return zero! */
+	moveq	r0, #1		/* can't let setjmp() return zero! */
 
-	LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+	LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
 END (__longjmp)
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index 6ae6da6457..5cecc2a0be 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -25,5 +25,5 @@
 
 ENTRY (_setjmp)
 	mov	r1, #0
-	b	C_SYMBOL_NAME(__sigsetjmp)
+	b	PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
 END (_setjmp)
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
index 52622e2155..bfa9552afb 100644
--- a/sysdeps/arm/bsd-setjmp.S
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -25,5 +25,5 @@
 
 ENTRY (setjmp)
 	mov	r1, #1
-	b	C_SYMBOL_NAME(__sigsetjmp)
+	b	PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
 END (setjmp)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 912f7863fb..c40f9d7260 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -99,7 +99,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	 end in this function.  */
       if (profile)
 	{
-	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
+	  //got[2] = (Elf32_Addr) &_dl_runtime_profile;
+	  got[2] = (Elf32_Addr) &_dl_runtime_resolve;
 	  /* Say that we really want profiling and the timers are started.  */
 	  _dl_profile_map = l;
 	}
@@ -144,7 +145,6 @@ _dl_runtime_resolve:
 	stmdb	sp!,{r0-r3,sl,fp}
 
 	@ prepare to call fixup()
-
 	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
 	sub	r1, ip, lr
 	sub	r1, r1, #4
@@ -153,6 +153,7 @@ _dl_runtime_resolve:
 	@ get pointer to linker struct
 	ldr	r0, [lr, #-4]
 
+	@ call fixup routine
 	" CALL_ROUTINE(fixup) "
 
 	@ save the return
@@ -165,21 +166,15 @@ _dl_runtime_resolve:
 	mov	pc, ip
 
 	.size _dl_runtime_resolve, .-_dl_runtime_resolve
-
+	
 	.globl _dl_runtime_profile
 	.type _dl_runtime_profile, #function
 	.align 2
 _dl_runtime_profile:
-	@ we get caled with
-	@ 	stack[0] contains the return address from this call
-	@	ip contains &GOT[n+3] (pointer to function)
-	@	lr points to &GOT[2]
-
-	@ save almost everything; return add is already on the stack
-	stmdb	sp!,{r0-r3,fp}
+	@ save almost everything; lr is already on the stack
+	stmdb	sp!,{r0-r3,sl,fp}
 
 	@ prepare to call fixup()
-
 	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
 	sub	r1, ip, lr
 	sub	r1, r1, #4
@@ -188,18 +183,19 @@ _dl_runtime_profile:
 	@ get pointer to linker struct
 	ldr	r0, [lr, #-4]
 
+	@ call profiling fixup routine
 	" CALL_ROUTINE(profile_fixup) "
 
 	@ save the return
 	mov	ip, r0
 
 	@ restore the stack
-	ldmia	sp!,{r0-r3,fp,lr}
+	ldmia	sp!,{r0-r3,sl,fp,lr}
 
 	@ jump to the newly found address
 	mov	pc, ip
 
-	.size _dl_runtime_profile, .-_dl_runtime_profile
+	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 	.previous
 ");
 #else // PROF
@@ -212,15 +208,33 @@ _dl_runtime_profile:
 	.align 2
 _dl_runtime_resolve:
 _dl_runtime_profile:
-	stmdb	sp!,{r0-r3,fp}
-	ldr	r1,[sp,#0x34]
+	@ we get called with
+	@ 	stack[0] contains the return address from this call
+	@	ip contains &GOT[n+3] (pointer to function)
+	@	lr points to &GOT[2]
+
+	@ save almost everything; return add is already on the stack
+	stmdb	sp!,{r0-r3,sl,fp}
+
+	@ prepare to call fixup()
+	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
 	sub	r1, ip, lr
 	sub	r1, r1, #4
 	add	r1, r1, r1
+
+	@ get pointer to linker struct
 	ldr	r0, [lr, #-4]
+
+	@ call profiling fixup routine
 	" CALL_ROUTINE(fixup) "
+
+	@ save the return
 	mov	ip, r0
-	ldmia	sp!,{r0-r3,fp,lr}
+
+	@ restore the stack
+	ldmia	sp!,{r0-r3,sl,fp,lr}
+
+	@ jump to the newly found address
 	mov	pc, ip
 
 	.size _dl_runtime_profile, .-_dl_runtime_profile
@@ -251,6 +265,10 @@ _dl_start_user:
 	ldr	sl, .L_GET_GOT
 	add	sl, pc, sl
 .L_GOT_GOT:
+	@ Store the highest stack address
+	ldr	r1, .L_STACK_END
+	ldr	r1, [sl, r1]
+	str	sp, [r1]
 	@ See if we were run as a command with the executable file
 	@ name as an extra leading argument.
 	ldr	r1, .L_SKIP_ARGS
@@ -299,6 +317,8 @@ _dl_start_user:
 	.word	_dl_starting_up(GOT)
 .L_FINI_PROC:
 	.word	_dl_fini(GOT)
+.L_STACK_END:
+	.word	__libc_stack_end(GOT)
 .previous\n\
 ");
 
@@ -421,14 +441,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	    *reloc_addr += value;
 	    break;
 	  }
-	case R_ARM_PC24:
-	  {
-	    long int disp = (value - (Elf32_Addr) reloc_addr) / 4;
-	    if ((disp >= (1<<24)) || (disp <= -(1<<24)))
-	      assert (! "address out of range for PC24 reloc");
-	    *reloc_addr += disp;
-	  }
-	  break;
 	default:
 	  assert (! "unexpected dynamic reloc type");
 	  break;
diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S
index 8afa177b20..25ba6b39fa 100644
--- a/sysdeps/arm/fpu/__longjmp.S
+++ b/sysdeps/arm/fpu/__longjmp.S
@@ -25,12 +25,12 @@
 /* __longjmp(jmpbuf, val) */
 
 ENTRY (__longjmp)
-	movs	r2, r0
+	mov	ip, r0		/* save jmp_buf pointer */
+	
 	movs	r0, r1		/* get the return value in place */
-	moveq	r1, #1		/* can't let setjmp() return zero! */
+	moveq	r0, #1		/* can't let setjmp() return zero! */
 
-	add	r2, r2, #48
-	lfmfd	f4, 4, [r2]
+	lfmia	f4, 4, [ip] !	/* load the floating point regs */
 
-	LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+	LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
 END (__longjmp)
diff --git a/sysdeps/arm/fpu/ieee754.h b/sysdeps/arm/ieee754.h
index 73f7d6a376..73f7d6a376 100644
--- a/sysdeps/arm/fpu/ieee754.h
+++ b/sysdeps/arm/ieee754.h
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 13d34c741b..6247f9c94b 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -74,8 +74,8 @@
 /* If compiled for profiling, call `mcount' at the start of each function.  */
 #ifdef	PROF
 #define CALL_MCOUNT			\
-	str	lr,[sp, #-4]!		\
-	bl	PLTJMP(mcount)		\
+	str	lr,[sp, #-4]!	;	\
+	bl	PLTJMP(mcount)	;	\
 	ldr	lr, [sp], #4
 #else
 #define CALL_MCOUNT		/* Do nothing.  */