about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-01-10 07:55:46 +0000
committerRoland McGrath <roland@gnu.org>2006-01-10 07:55:46 +0000
commit53751fd5e5c3cfd86e60e63740738cf1bc97697d (patch)
tree34280e234d21594d61a23849587c92cfe9047db0 /sysdeps
parent69e094203aa2ca3114c2209659cbde00464ad6e7 (diff)
downloadglibc-53751fd5e5c3cfd86e60e63740738cf1bc97697d.tar.gz
glibc-53751fd5e5c3cfd86e60e63740738cf1bc97697d.tar.xz
glibc-53751fd5e5c3cfd86e60e63740738cf1bc97697d.zip
* sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocations
	by using LR and RR. Add %sr0 to iitlbp.

	* timezone/private.h: Update from tzcode2005r.
	* timezone/tzfile.h: Likewise.
	* timezone/zdump.c: Likewise.
	* timezone/zic.c: Likewise.
	* timezone/africa: Update from tzdata2005r.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/systemv: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/hppa/elf/start.S72
1 files changed, 48 insertions, 24 deletions
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index 4cf832a2f6..94edeaa212 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -34,16 +34,27 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-	.text
-
-	.align 4
-
 	.import main, code
 	.import $global$, data
 	.import __libc_start_main, code
 	.import __libc_csu_fini, code
 	.import __libc_csu_init, code
 
+	/* Have the linker create plabel words
+           so we get PLABEL32 relocs and not 21/14 */
+	.section	.rodata
+	.align 4
+.Lpmain:
+	.word P%main
+.Lp__libc_start_main:
+	.word P%__libc_start_main
+.Lp__libc_csu_fini:
+	.word P%__libc_csu_fini
+.Lp__libc_csu_init:
+	.word P%__libc_csu_init
+
+	.text
+	.align 4
 	.globl _start
 	.export _start, ENTRY
 	.type _start,@function
@@ -52,28 +63,41 @@ _start:
 	.proc
 	.callinfo
 
-	/* load main */
-	ldil	LP%main, %r26
-	ldo	RP%main(%r26), %r26
-
-	/* argc and argv should be in 25 and 24 */
-
 	/* Expand the stack to store the 5th through 7th args */
 	ldo	64(%sp), %sp
-
-	/* void (*rtld_fini) (void) (actually the 6th arg) */
-	stw	%r23, -56(%sp)
-
-	/* void (*init) (void) */
-	ldil	LP%__libc_csu_init, %r23
-	ldo	RP%__libc_csu_init(%r23), %r23
-
-	/* void (*fini) (void) */
-	ldil	LP%__libc_csu_fini, %r22
-	ldo	RP%__libc_csu_fini(%r22), %r22
+	/* TODO: Follow ABI? Place more things on the stack here... */
+
+#if SHARED
+	/* load main (1st argument) */
+	addil	LR'.Lpmain, %r19
+	ldw	RR'.Lpmain(%r1), %r26
+	ldw	0(%r26),%r26
+	/* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
+	/* void (*init) (void) (4th argument) */
+	addil	LR'.Lp__libc_csu_init, %r19
+	ldw	RR'.Lp__libc_csu_init(%r1), %r23
+	ldw	0(%r23), %r23
+	/* void (*fini) (void) (5th argument) */
+	addil	LR'.Lp__libc_csu_fini, %r19
+	ldw	RR'.Lp__libc_csu_fini(%r1), %r22
+	ldw	0(%r22), %r22
+#else
+	/* load main (1st argument) */
+	ldil	LR'.Lpmain, %r26
+	ldw	RR'.Lpmain(%r26), %r26
+	/* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
+	/* void (*init) (void) (4th argument) */
+	ldil	LR'.Lp__libc_csu_init, %r23
+	ldw	RR'.Lp__libc_csu_init(%r23), %r23
+	/* void (*fini) (void) (5th argument) */
+	ldil	LR'.Lp__libc_csu_fini, %r22
+	ldw	RR'.Lp__libc_csu_fini(%r22), %r22
+#endif
+	/* Store 5th argument */
 	stw	%r22, -52(%sp)
-
-	/* void *stack_end */
+	/* void (*rtld_fini) (void) (6th argument) */
+	stw	%r23, -56(%sp)
+	/* void *stack_end (7th argument) */
 	stw	%sp, -60(%sp)
 
 	/* load global */
@@ -83,7 +107,7 @@ _start:
 	bl	__libc_start_main,%r2
 	nop
 	/* die horribly if it returned (it shouldn't) */
-	iitlbp %r0,(%r0)
+	iitlbp %r0,(%sr0,%r0)
 	nop
 
 	.procend