From: Ulrich Drepper Date: Tue, 14 Jan 2003 01:20:41 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.20~13277 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db0a052cecb5b8d5850d199b695323ab58522857;p=platform%2Fupstream%2Flinaro-glibc.git Update. 2003-01-13 Martin Schwidefsky * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid unterminated string literals. * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise. 2003-01-13 Martin Schwidefsky * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from PSEUDO_END to PSEUDO. (PSEUDO_END): Remove. (SINGLE_THREAD_P): Save an instruction. * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing parameter to SINGLE_THREAD_P call. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Code reordering. --- diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 09aca83..fbc327d 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,21 @@ +2003-01-13 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid + unterminated string literals. + * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise. + +2003-01-13 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h + (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from + PSEUDO_END to PSEUDO. + (PSEUDO_END): Remove. + (SINGLE_THREAD_P): Save an instruction. + * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing + parameter to SINGLE_THREAD_P call. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): + Code reordering. + 2003-01-10 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/vfork.S: New file. diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c index 8cc14dc..b7d901c 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c @@ -36,119 +36,119 @@ * crtn.s puts the corresponding function epilogues in the .init and .fini sections. */ -__asm__ (" - -#include \"defs.h\" - -/*@HEADER_ENDS*/ - -/*@TESTS_BEGIN*/ - -/*@TESTS_END*/ - -/*@_init_PROLOG_BEGINS*/ - - .section .init -#NO_APP - .align 4 -.globl _init - .type _init,@function -_init: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 36 - STM 6,15,24(15) - BRAS 13,.LTN1_0 -.LT1_0: -.LC13: - .long __pthread_initialize_minimal@PLT-.LT1_0 -.LC14: - .long __gmon_start__@GOT -.LC15: - .long _GLOBAL_OFFSET_TABLE_-.LT1_0 -.LTN1_0: - LR 1,15 - AHI 15,-96 - ST 1,0(15) - L 12,.LC15-.LT1_0(13) - AR 12,13 - L 1,.LC13-.LT1_0(13) - LA 1,0(1,13) - BASR 14,1 - L 1,.LC14-.LT1_0(13) - L 1,0(1,12) - LTR 1,1 - JE .L22 - BASR 14,1 -.L22: -#APP - .align 4,0x07 - END_INIT - -/*@_init_PROLOG_ENDS*/ - -/*@_init_EPILOG_BEGINS*/ - .align 4 - .section .init -#NO_APP - .align 4 - L 4,152(15) - LM 6,15,120(15) - BR 4 -#APP - END_INIT - -/*@_init_EPILOG_ENDS*/ - -/*@_fini_PROLOG_BEGINS*/ - .section .fini -#NO_APP - .align 4 -.globl _fini - .type _fini,@function -_fini: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 30 - STM 6,15,24(15) - BRAS 13,.LTN2_0 -.LT2_0: -.LC17: - .long _GLOBAL_OFFSET_TABLE_-.LT2_0 -.LTN2_0: - LR 1,15 - AHI 15,-96 - ST 1,0(15) - L 12,.LC17-.LT2_0(13) - AR 12,13 -#APP - .align 4,0x07 - END_FINI - -/*@_fini_PROLOG_ENDS*/ - -/*@_fini_EPILOG_BEGINS*/ - .align 4 - .section .fini -#NO_APP - .align 4 - L 4,152(15) - LM 6,15,120(15) - BR 4 -#APP - END_FINI - -/*@_fini_EPILOG_ENDS*/ - -/*@TRAILER_BEGINS*/ +__asm__ ("\ +\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@TESTS_BEGIN*/\n\ +\n\ +/*@TESTS_END*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ +\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ +.globl _init\n\ + .type _init,@function\n\ +_init:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 36\n\ + STM 6,15,24(15)\n\ + BRAS 13,.LTN1_0\n\ +.LT1_0:\n\ +.LC13:\n\ + .long __pthread_initialize_minimal@PLT-.LT1_0\n\ +.LC14:\n\ + .long __gmon_start__@GOT\n\ +.LC15:\n\ + .long _GLOBAL_OFFSET_TABLE_-.LT1_0\n\ +.LTN1_0:\n\ + LR 1,15\n\ + AHI 15,-96\n\ + ST 1,0(15)\n\ + L 12,.LC15-.LT1_0(13)\n\ + AR 12,13\n\ + L 1,.LC13-.LT1_0(13)\n\ + LA 1,0(1,13)\n\ + BASR 14,1\n\ + L 1,.LC14-.LT1_0(13)\n\ + L 1,0(1,12)\n\ + LTR 1,1\n\ + JE .L22\n\ + BASR 14,1\n\ +.L22:\n\ +#APP\n\ + .align 4,0x07\n\ + END_INIT\n\ +\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ + L 4,152(15)\n\ + LM 6,15,120(15)\n\ + BR 4\n\ +#APP\n\ + END_INIT\n\ +\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ +.globl _fini\n\ + .type _fini,@function\n\ +_fini:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 30\n\ + STM 6,15,24(15)\n\ + BRAS 13,.LTN2_0\n\ +.LT2_0:\n\ +.LC17:\n\ + .long _GLOBAL_OFFSET_TABLE_-.LT2_0\n\ +.LTN2_0:\n\ + LR 1,15\n\ + AHI 15,-96\n\ + ST 1,0(15)\n\ + L 12,.LC17-.LT2_0(13)\n\ + AR 12,13\n\ +#APP\n\ + .align 4,0x07\n\ + END_FINI\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ + L 4,152(15)\n\ + LM 6,15,120(15)\n\ + BR 4\n\ +#APP\n\ + END_FINI\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ +/*@TRAILER_BEGINS*/\ "); diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h index 9e856a4..723f78c 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h @@ -28,14 +28,6 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .text; \ -ENTRY(name) \ - SINGLE_THREAD_P(%r1) \ - jne L(pseudo_cancel); \ - DO_CALL(syscall_name, args); \ - lhi %r4,-4095; \ - clr %r2,%r4; \ - jnl SYSCALL_ERROR_LABEL; \ - br %r14; \ L(pseudo_cancel): \ STM_##args \ stm %r12,%r15,48(%r15); \ @@ -43,29 +35,30 @@ L(pseudo_cancel): \ ahi %r15,-96; \ st %r14,0(%r15); \ basr %r13,0; \ -200301: l %r1,200302f-200301b(%r13); \ +0: l %r1,1f-0b(%r13); \ bas %r14,0(%r1,%r13); \ lr %r0,%r2; \ LM_##args \ DO_CALL(syscall_name, args); \ - l %r1,200303f-200301b(%r13); \ + l %r1,2f-0b(%r13); \ lr %r12,%r2; \ lr %r2,%r0; \ bas %r14,0(%r1,%r13); \ lr %r2,%r12; \ lm %r12,%r15,48+96(%r15); \ + j L(pseudo_check); \ +1: .long CENABLE-0b; \ +2: .long CDISABLE-0b; \ +ENTRY(name) \ + SINGLE_THREAD_P(%r1) \ + jne L(pseudo_cancel); \ + DO_CALL(syscall_name, args); \ +L(pseudo_check): \ lhi %r4,-4095; \ clr %r2,%r4; \ jnl SYSCALL_ERROR_LABEL; \ L(pseudo_end): -#undef PSEUDO_END -#define PSEUDO_END(name) \ - SYSCALL_ERROR_HANDLER; \ -200302: .long CENABLE-200301b; \ -200303: .long CDISABLE-200301b; \ - END (name) - # ifdef IS_IN_libpthread # define CENABLE __pthread_enable_asynccancel # define CDISABLE __pthread_disable_asynccancel @@ -95,8 +88,7 @@ L(pseudo_end): # else # define SINGLE_THREAD_P(reg) \ ear reg,%a0; \ - l reg,MULTIPLE_THREADS_OFFSET(reg); \ - ltr reg,reg; + icm reg,15,MULTIPLE_THREADS_OFFSET(reg); # endif #elif !defined __ASSEMBLER__ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S index 6047723..ce4a492 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S @@ -27,7 +27,7 @@ and the process ID of the new process to the old process. */ ENTRY (__vfork) - SINGLE_THREAD_P + SINGLE_THREAD_P(%r1) jne 0f /* Do vfork system call. */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c index 3d7db18..540443e 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c @@ -37,101 +37,101 @@ * crtn.s puts the corresponding function epilogues in the .init and .fini sections. */ -__asm__ (" - -#include \"defs.h\" - -/*@HEADER_ENDS*/ - -/*@TESTS_BEGIN*/ - -/*@TESTS_END*/ - -/*@_init_PROLOG_BEGINS*/ - - .section .init -#NO_APP - .align 4 -.globl _init - .type _init,@function -_init: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 36 - STMG 6,15,48(15) - LGR 1,15 - AGHI 15,-160 - STG 1,0(15) - LARL 12,_GLOBAL_OFFSET_TABLE_ - BRASL 14,__pthread_initialize_minimal@PLT - LARL 1,__gmon_start__@GOTENT - LG 1,0(1) - LTGR 1,1 - JE .L22 - BASR 14,1 -.L22: -#APP - .align 4,0x07 - END_INIT - -/*@_init_PROLOG_ENDS*/ - -/*@_init_EPILOG_BEGINS*/ - .align 4 - .section .init -#NO_APP - .align 4 - LG 4,272(15) - LMG 6,15,208(15) - BR 4 -#APP - END_INIT - -/*@_init_EPILOG_ENDS*/ - -/*@_fini_PROLOG_BEGINS*/ - .section .fini -#NO_APP - .align 4 -.globl _fini - .type _fini,@function -_fini: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 30 - STMG 6,15,48(15) - LGR 1,15 - AGHI 15,-160 - STG 1,0(15) - LARL 12,_GLOBAL_OFFSET_TABLE_ -#APP - .align 4,0x07 - END_FINI - -/*@_fini_PROLOG_ENDS*/ - -/*@_fini_EPILOG_BEGINS*/ - .align 4 - .section .fini -#NO_APP - .align 4 - LG 4,272(15) - LMG 6,15,208(15) - BR 4 -#APP - END_FINI - -/*@_fini_EPILOG_ENDS*/ - -/*@TRAILER_BEGINS*/ -"); +__asm__ ("\ +\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@TESTS_BEGIN*/\n\ +\n\ +/*@TESTS_END*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ +\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ +.globl _init\n\ + .type _init,@function\n\ +_init:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 36\n\ + STMG 6,15,48(15)\n\ + LGR 1,15\n\ + AGHI 15,-160\n\ + STG 1,0(15)\n\ + LARL 12,_GLOBAL_OFFSET_TABLE_\n\ + BRASL 14,__pthread_initialize_minimal@PLT\n\ + LARL 1,__gmon_start__@GOTENT\n\ + LG 1,0(1)\n\ + LTGR 1,1\n\ + JE .L22\n\ + BASR 14,1\n\ +.L22:\n\ +#APP\n\ + .align 4,0x07\n\ + END_INIT\n\ +\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ + LG 4,272(15)\n\ + LMG 6,15,208(15)\n\ + BR 4\n\ +#APP\n\ + END_INIT\n\ +\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ +.globl _fini\n\ + .type _fini,@function\n\ +_fini:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 30\n\ + STMG 6,15,48(15)\n\ + LGR 1,15\n\ + AGHI 15,-160\n\ + STG 1,0(15)\n\ + LARL 12,_GLOBAL_OFFSET_TABLE_\n\ +#APP\n\ + .align 4,0x07\n\ + END_FINI\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ + LG 4,272(15)\n\ + LMG 6,15,208(15)\n\ + BR 4\n\ +#APP\n\ + END_FINI\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ +/*@TRAILER_BEGINS*/\n\ + "); diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h index 19ecee8..ce4afb1 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h @@ -28,14 +28,6 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .text; \ -ENTRY(name) \ - SINGLE_THREAD_P \ - jne L(pseudo_cancel); \ - DO_CALL(syscall_name, args); \ - lghi %r4,-4095; \ - clgr %r2,%r4; \ - jnl SYSCALL_ERROR_LABEL; \ - br %r14; \ L(pseudo_cancel): \ STM_##args \ stmg %r13,%r15,104(%r15); \ @@ -51,6 +43,12 @@ L(pseudo_cancel): \ brasl %r14,CDISABLE; \ lgr %r2,%r13; \ lmg %r13,%r15,104+160(%r15); \ + j L(pseudo_check); \ +ENTRY(name) \ + SINGLE_THREAD_P \ + jne L(pseudo_cancel); \ + DO_CALL(syscall_name, args); \ +L(pseudo_check): \ lghi %r4,-4095; \ clgr %r2,%r4; \ jnl SYSCALL_ERROR_LABEL; \ diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c index 991ef01..5040232 100644 --- a/nptl/pthread_mutex_lock.c +++ b/nptl/pthread_mutex_lock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -75,4 +75,4 @@ __pthread_mutex_lock (mutex) return 0; } strong_alias (__pthread_mutex_lock, pthread_mutex_lock) -INTDEF(__pthread_mutex_lock) +strong_alias (__pthread_mutex_lock, __pthread_mutex_lock_internal) diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c index cd410e8..3595585 100644 --- a/nptl/pthread_mutex_unlock.c +++ b/nptl/pthread_mutex_unlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -63,4 +63,4 @@ __pthread_mutex_unlock (mutex) return 0; } strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock) -INTDEF(__pthread_mutex_unlock) +strong_alias (__pthread_mutex_unlock, __pthread_mutex_unlock_internal) diff --git a/sysdeps/s390/s390-32/sysdep.h b/sysdeps/s390/s390-32/sysdep.h index 316fc4c..a9dac44 100644 --- a/sysdeps/s390/s390-32/sysdep.h +++ b/sysdeps/s390/s390-32/sysdep.h @@ -82,13 +82,16 @@ #define mcount _mcount #endif -#define PSEUDO(name, syscall_name, args) \ -lose: SYSCALL_PIC_SETUP \ - JUMPTARGET(syscall_error) \ - .globl syscall_error; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - jm lose +#define PSEUDO(name, syscall_name, args) \ +lose: SYSCALL_PIC_SETUP \ + basr %r1,0; \ +0: al %r1,1f-0b(%r1); \ + br %r1; \ +1: .long JUMPTARGET(syscall_error) - 0b; \ + .globl syscall_error; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + jm lose #undef PSEUDO_END #define PSEUDO_END(name) \ @@ -96,21 +99,13 @@ lose: SYSCALL_PIC_SETUP \ #undef JUMPTARGET #ifdef PIC -#define JUMPTARGET(name) \ - basr %r1,0 \ -0: al %r1,1f-0b(0,%r1) \ - br %r1 \ -1: .long name##@PLT - 0b +#define JUMPTARGET(name) name##@PLT #define SYSCALL_PIC_SETUP \ bras %r12,1f \ 0: .long _GLOBAL_OFFSET_TABLE_-0b \ 1: al %r12,0(%r12) #else -#define JUMPTARGET(name) \ - basr %r1,0 \ -0: al %r1,1f-0b(0,%r1) \ - br %r1 \ -1: .long name - 0b +#define JUMPTARGET(name) name #define SYSCALL_PIC_SETUP /* Nothing. */ #endif diff --git a/sysdeps/s390/s390-64/initfini.c b/sysdeps/s390/s390-64/initfini.c index 50f9b02..2a40253 100644 --- a/sysdeps/s390/s390-64/initfini.c +++ b/sysdeps/s390/s390-64/initfini.c @@ -28,100 +28,100 @@ * crtn.s puts the corresponding function epilogues in the .init and .fini sections. */ -__asm__ (" - -#include \"defs.h\" - -/*@HEADER_ENDS*/ - -/*@TESTS_BEGIN*/ - -/*@TESTS_END*/ - -/*@_init_PROLOG_BEGINS*/ - - .section .init -#NO_APP - .align 4 -.globl _init - .type _init,@function -_init: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 36 - STMG 6,15,48(15) - LGR 1,15 - AGHI 15,-160 - STG 1,0(15) - LARL 12,_GLOBAL_OFFSET_TABLE_ - LARL 1,__gmon_start__@GOTENT - LG 1,0(1) - LTGR 1,1 - JE .L22 - BASR 14,1 -.L22: -#APP - .align 4,0x07 - END_INIT - -/*@_init_PROLOG_ENDS*/ - -/*@_init_EPILOG_BEGINS*/ - .align 4 - .section .init -#NO_APP - .align 4 - LG 4,272(15) - LMG 6,15,208(15) - BR 4 -#APP - END_INIT - -/*@_init_EPILOG_ENDS*/ - -/*@_fini_PROLOG_BEGINS*/ - .section .fini -#NO_APP - .align 4 -.globl _fini - .type _fini,@function -_fini: -# leaf function 0 -# automatics 0 -# outgoing args 0 -# need frame pointer 0 -# call alloca 0 -# has varargs 0 -# incoming args (stack) 0 -# function length 30 - STMG 6,15,48(15) - LGR 1,15 - AGHI 15,-160 - STG 1,0(15) - LARL 12,_GLOBAL_OFFSET_TABLE_ -#APP - .align 4,0x07 - END_FINI - -/*@_fini_PROLOG_ENDS*/ - -/*@_fini_EPILOG_BEGINS*/ - .align 4 - .section .fini -#NO_APP - .align 4 - LG 4,272(15) - LMG 6,15,208(15) - BR 4 -#APP - END_FINI - -/*@_fini_EPILOG_ENDS*/ - -/*@TRAILER_BEGINS*/ +__asm__ ("\ +\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@TESTS_BEGIN*/\n\ +\n\ +/*@TESTS_END*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ +\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ +.globl _init\n\ + .type _init,@function\n\ +_init:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 36\n\ + STMG 6,15,48(15)\n\ + LGR 1,15\n\ + AGHI 15,-160\n\ + STG 1,0(15)\n\ + LARL 12,_GLOBAL_OFFSET_TABLE_\n\ + LARL 1,__gmon_start__@GOTENT\n\ + LG 1,0(1)\n\ + LTGR 1,1\n\ + JE .L22\n\ + BASR 14,1\n\ +.L22:\n\ +#APP\n\ + .align 4,0x07\n\ + END_INIT\n\ +\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .init\n\ +#NO_APP\n\ + .align 4\n\ + LG 4,272(15)\n\ + LMG 6,15,208(15)\n\ + BR 4\n\ +#APP\n\ + END_INIT\n\ +\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ +.globl _fini\n\ + .type _fini,@function\n\ +_fini:\n\ +# leaf function 0\n\ +# automatics 0\n\ +# outgoing args 0\n\ +# need frame pointer 0\n\ +# call alloca 0\n\ +# has varargs 0\n\ +# incoming args (stack) 0\n\ +# function length 30\n\ + STMG 6,15,48(15)\n\ + LGR 1,15\n\ + AGHI 15,-160\n\ + STG 1,0(15)\n\ + LARL 12,_GLOBAL_OFFSET_TABLE_\n\ +#APP\n\ + .align 4,0x07\n\ + END_FINI\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ + .align 4\n\ + .section .fini\n\ +#NO_APP\n\ + .align 4\n\ + LG 4,272(15)\n\ + LMG 6,15,208(15)\n\ + BR 4\n\ +#APP\n\ + END_FINI\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ + /*@TRAILER_BEGINS*/\ "); diff --git a/sysdeps/s390/s390-64/sysdep.h b/sysdeps/s390/s390-64/sysdep.h index 430cee3..b863d26 100644 --- a/sysdeps/s390/s390-64/sysdep.h +++ b/sysdeps/s390/s390-64/sysdep.h @@ -80,12 +80,12 @@ #define mcount _mcount #endif -#define PSEUDO(name, syscall_name, args) \ -lose: SYSCALL_PIC_SETUP \ - JUMPTARGET(syscall_error) \ - .globl syscall_error; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ +#define PSEUDO(name, syscall_name, args) \ +lose: SYSCALL_PIC_SETUP \ + jg JUMPTARGET(syscall_error); \ + .globl syscall_error; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ jm lose #undef PSEUDO_END @@ -94,13 +94,11 @@ lose: SYSCALL_PIC_SETUP \ #undef JUMPTARGET #ifdef PIC -#define JUMPTARGET(name) \ - brasl name##@PLT +#define JUMPTARGET(name) name##@PLT #define SYSCALL_PIC_SETUP \ larl %r12,_GLOBAL_OFFSET_TABLE_ #else -#define JUMPTARGET(name) \ - brasl name +#define JUMPTARGET(name) name #define SYSCALL_PIC_SETUP /* Nothing. */ #endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index c8d1cdd..28600fe 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -33,10 +33,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* ELF-like local names start with `.L'. */ -#undef L -#define L(name) .L##name - #ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, unlike diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index cea75d0..5f0c9fd 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -34,10 +34,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* ELF-like local names start with `.L'. */ -#undef L -#define L(name) .L##name - #ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, unlike