* sysdeps/s390/s390-32/elf/start.S: Replace pc relative relocation
authorUlrich Drepper <drepper@redhat.com>
Fri, 5 May 2006 18:26:01 +0000 (18:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 5 May 2006 18:26:01 +0000 (18:26 +0000)
by a GOT relocation to make Scrt1.o position independent.
* sysdeps/s390/s390-64/elf/start.S: Likewise.

* sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Add support for
six system call parameters.
* sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise.

ChangeLog
sysdeps/s390/s390-32/elf/start.S
sysdeps/s390/s390-64/elf/start.S
sysdeps/unix/sysv/linux/s390/s390-32/syscall.S
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S

index f8d4076..e5c6f6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-05  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+       * sysdeps/s390/s390-32/elf/start.S: Replace pc relative relocation
+       by a GOT relocation to make Scrt1.o position independent.
+       * sysdeps/s390/s390-64/elf/start.S: Likewise.
+
+       * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Add support for
+       six system call parameters.
+       * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise.
+
 2006-05-05  Ulrich Drepper  <drepper@redhat.com>
 
        * sunrpc/svcauth_des.c (cache_init): Use calloc instead of
index a09acb5..f729010 100644 (file)
@@ -1,5 +1,6 @@
 /* Startup code compliant to the ELF s390 ABI.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -88,9 +89,9 @@ _start:
        l       %r12,.L5-.Llit(%r13)    # load .got pointer
        la      %r6,0(%r13,%r6)
        la      %r5,0(%r13,%r5)
-       la      %r2,0(%r13,%r2)
-       la      %r1,0(%r13,%r1)
        la      %r12,0(%r13,%r12)
+       l       %r2,0(%r12,%r2)
+       la      %r1,0(%r13,%r1)
 #endif
 
        /* ok, now branch to the libc main routine */
@@ -108,7 +109,7 @@ _start:
 #else
 .L1:    .long  __libc_csu_init-.Llit
 .L2:    .long  __libc_csu_fini-.Llit
-.L3:    .long  main-.Llit
+.L3:    .long  main@GOT
 .L4:    .long  __libc_start_main@plt-.Llit
 .L5:    .long  _GLOBAL_OFFSET_TABLE_-.Llit
 #endif
index e5013d0..c4cb34d 100644 (file)
@@ -1,5 +1,5 @@
 /* Startup code compliant to the 64 bit S/390 ELF ABI.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -78,12 +78,14 @@ _start:
        la      %r7,160(%r15)
        larl    %r6,__libc_csu_fini     # load pointer to __libc_csu_fini
        larl    %r5,__libc_csu_init     # load pointer to __libc_csu_init
-       larl    %r2,main                # load pointer to main
 
        /* Ok, now branch to the libc main routine.  */
 #ifdef PIC
+       larl    %r2,main@GOTENT         # load pointer to main
+       lg      %r2,0(%r2)
        brasl   %r14,__libc_start_main@plt
 #else
+       larl    %r2,main                # load pointer to main
        brasl   %r14,__libc_start_main
 #endif
 
index d1ce925..b7e1736 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -48,13 +48,14 @@ ENTRY (syscall)
        lr     %r4,%r5             /* third parameter  */
        lr     %r5,%r6             /* fourth parameter */
        l      %r6,192(%r15)       /* fifth parameter  */
+       l      %r7,196(%r15)       /* sixth parameter  */
 
-       basr   %r7,0
-0:     cl     %r1,4f-0b(%r7)      /* svc number < 256? */
+       basr   %r8,0
+0:     cl     %r1,4f-0b(%r8)      /* svc number < 256? */
        jl     2f
 1:     svc    0
        j      3f
-2:     ex     %r1,1b-0b(%r7)      /* lsb of R1 is subsituted as SVC number */
+2:     ex     %r1,1b-0b(%r8)      /* lsb of R1 is subsituted as SVC number */
 3:     l      %r15,0(%r15)        /* load back chain */
        cfi_adjust_cfa_offset (-96)
        lm     %r6,15,24(%r15)     /* load registers */
index 4caeaea..31b55d7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -48,13 +48,14 @@ ENTRY (syscall)
        lgr    %r4,%r5             /* Third parameter.  */
        lgr    %r5,%r6             /* Fourth parameter.  */
        lg     %r6,320(%r15)       /* Fifth parameter.  */
+       lg     %r7,328(%r15)       /* Sixth parameter.  */
 
-       basr   %r7,0
-0:     clg    %r1,4f-0b(%r7)      /* svc number < 256? */
+       basr   %r8,0
+0:     clg    %r1,4f-0b(%r8)      /* svc number < 256? */
        jl     2f
 1:     svc    0
        j      3f
-2:     ex     %r1,1b-0b(%r7)      /* lsb of R1 is subsituted as SVC number */
+2:     ex     %r1,1b-0b(%r8)      /* lsb of R1 is subsituted as SVC number */
 3:     lg     %r15,0(%r15)        /* load back chain */
        cfi_adjust_cfa_offset (-160)
        lmg     %r6,15,48(%r15)    /* Load registers.  */