patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 --- glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c.old	Wed May 28 09:29:55 2003
     2 +++ glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c	Wed May 28 09:30:11 2003
     3 @@ -36,134 +36,134 @@
     4     * crtn.s puts the corresponding function epilogues
     5     in the .init and .fini sections. */
     6  
     7 -__asm__ ("
     8 -
     9 -#include \"defs.h\"
    10 -#define SHARED
    11 -
    12 -/*@HEADER_ENDS*/
    13 -
    14 -/*@TESTS_BEGIN*/
    15 -
    16 -/*@TESTS_END*/
    17 -
    18 -/*@_init_PROLOG_BEGINS*/
    19 -	.section .init
    20 -	.align 5
    21 -	.global	_init
    22 -	.type	_init,@function
    23 -_init:
    24 -	mov.l	r12,@-r15
    25 -	mov.l	r14,@-r15
    26 -	sts.l	pr,@-r15
    27 -#ifdef SHARED
    28 -	mova	.L22,r0
    29 -	mov.l	.L22,r12
    30 -	add	r0,r12
    31 -	mova	.L24,r0
    32 -	mov.l	.L24,r1
    33 -	add	r0,r1
    34 -	jsr	@r1
    35 -	 nop
    36 -	mova	.L23,r0
    37 -	mov.l	.L23,r1
    38 -	add	r0,r1
    39 -#else
    40 -	mov.l	.L24,r1
    41 -	jsr	@r1
    42 -	 nop
    43 -	mov.l	.L23,r1
    44 -#endif
    45 -	jsr	@r1
    46 -	 mov	r15,r14
    47 -	bra	1f
    48 -	 nop
    49 -	.align 2
    50 -#ifdef SHARED
    51 -.L22:
    52 -	.long	_GLOBAL_OFFSET_TABLE_
    53 -.L23:
    54 -	.long	__gmon_start__@PLT
    55 -.L24:
    56 -	.long	__pthread_initialize_minimal@PLT
    57 -#else
    58 -.L23:
    59 -	.long	__gmon_start__
    60 -.L24:
    61 -	.long	__pthread_initialize_minimal
    62 -#endif
    63 -	.data
    64 -	.global __fpscr_values
    65 -__fpscr_values:
    66 -	.long   0
    67 -	.long   0x80000
    68 -	.previous
    69 -1:
    70 -	ALIGN
    71 -	END_INIT
    72 -
    73 -	
    74 -/*@_init_PROLOG_ENDS*/
    75 -
    76 -/*@_init_EPILOG_BEGINS*/
    77 -	.section .init
    78 -	mov	r14,r15
    79 -	lds.l	@r15+,pr
    80 -	mov.l	@r15+,r14
    81 -	rts	
    82 -	mov.l	@r15+,r12
    83 -	END_INIT
    84 -	.section .text
    85 -	.align 5
    86 -	.weak	__gmon_start__
    87 -	.type	__gmon_start__,@function
    88 -__gmon_start__:
    89 -	mov.l	r14,@-r15
    90 -	mov	r15,r14
    91 -	mov	r14,r15
    92 -	rts	
    93 -	mov.l	@r15+,r14
    94 -	
    95 -/*@_init_EPILOG_ENDS*/
    96 -
    97 -/*@_fini_PROLOG_BEGINS*/
    98 -	.section .fini
    99 -	.align 5
   100 -	.global	_fini
   101 -	.type	_fini,@function
   102 -_fini:
   103 -	mov.l	r12,@-r15
   104 -	mov.l	r14,@-r15
   105 -	sts.l	pr,@-r15
   106 -#ifdef SHARED
   107 -	mova	.L27,r0
   108 -	mov.l	.L27,r12
   109 -	add	r0,r12
   110 -#endif
   111 -	mov	r15,r14
   112 -	ALIGN
   113 -	END_FINI
   114 -#ifdef SHARED
   115 -	bra	1f
   116 -	 nop
   117 -	.align	2
   118 -.L27:
   119 -	.long	_GLOBAL_OFFSET_TABLE_
   120 -#endif
   121 -1:
   122 -/*@_fini_PROLOG_ENDS*/
   123 -
   124 -/*@_fini_EPILOG_BEGINS*/
   125 -	.section .fini
   126 -	mov	r14,r15
   127 -	lds.l	@r15+,pr
   128 -	mov.l	@r15+,r14
   129 -	rts	
   130 -	mov.l	@r15+,r12
   131 -
   132 -	END_FINI
   133 -	
   134 -/*@_fini_EPILOG_ENDS*/
   135 -
   136 -/*@TRAILER_BEGINS*/
   137 +__asm__ ("\n\
   138 +\n\
   139 +#include \"defs.h\"\n\
   140 +#define SHARED\n\
   141 +\n\
   142 +/*@HEADER_ENDS*/\n\
   143 +\n\
   144 +/*@TESTS_BEGIN*/\n\
   145 +\n\
   146 +/*@TESTS_END*/\n\
   147 +\n\
   148 +/*@_init_PROLOG_BEGINS*/\n\
   149 +	.section .init\n\
   150 +	.align 5\n\
   151 +	.global	_init\n\
   152 +	.type	_init,@function\n\
   153 +_init:\n\
   154 +	mov.l	r12,@-r15\n\
   155 +	mov.l	r14,@-r15\n\
   156 +	sts.l	pr,@-r15\n\
   157 +#ifdef SHARED\n\
   158 +	mova	.L22,r0\n\
   159 +	mov.l	.L22,r12\n\
   160 +	add	r0,r12\n\
   161 +	mova	.L24,r0\n\
   162 +	mov.l	.L24,r1\n\
   163 +	add	r0,r1\n\
   164 +	jsr	@r1\n\
   165 +	 nop\n\
   166 +	mova	.L23,r0\n\
   167 +	mov.l	.L23,r1\n\
   168 +	add	r0,r1\n\
   169 +#else\n\
   170 +	mov.l	.L24,r1\n\
   171 +	jsr	@r1\n\
   172 +	 nop\n\
   173 +	mov.l	.L23,r1\n\
   174 +#endif\n\
   175 +	jsr	@r1\n\
   176 +	 mov	r15,r14\n\
   177 +	bra	1f\n\
   178 +	 nop\n\
   179 +	.align 2\n\
   180 +#ifdef SHARED\n\
   181 +.L22:\n\
   182 +	.long	_GLOBAL_OFFSET_TABLE_\n\
   183 +.L23:\n\
   184 +	.long	__gmon_start__@PLT\n\
   185 +.L24:\n\
   186 +	.long	__pthread_initialize_minimal@PLT\n\
   187 +#else\n\
   188 +.L23:\n\
   189 +	.long	__gmon_start__\n\
   190 +.L24:\n\
   191 +	.long	__pthread_initialize_minimal\n\
   192 +#endif\n\
   193 +	.data\n\
   194 +	.global __fpscr_values\n\
   195 +__fpscr_values:\n\
   196 +	.long   0\n\
   197 +	.long   0x80000\n\
   198 +	.previous\n\
   199 +1:\n\
   200 +	ALIGN\n\
   201 +	END_INIT\n\
   202 +\n\
   203 +	\n\
   204 +/*@_init_PROLOG_ENDS*/\n\
   205 +\n\
   206 +/*@_init_EPILOG_BEGINS*/\n\
   207 +	.section .init\n\
   208 +	mov	r14,r15\n\
   209 +	lds.l	@r15+,pr\n\
   210 +	mov.l	@r15+,r14\n\
   211 +	rts	\n\
   212 +	mov.l	@r15+,r12\n\
   213 +	END_INIT\n\
   214 +	.section .text\n\
   215 +	.align 5\n\
   216 +	.weak	__gmon_start__\n\
   217 +	.type	__gmon_start__,@function\n\
   218 +__gmon_start__:\n\
   219 +	mov.l	r14,@-r15\n\
   220 +	mov	r15,r14\n\
   221 +	mov	r14,r15\n\
   222 +	rts	\n\
   223 +	mov.l	@r15+,r14\n\
   224 +	\n\
   225 +/*@_init_EPILOG_ENDS*/\n\
   226 +\n\
   227 +/*@_fini_PROLOG_BEGINS*/\n\
   228 +	.section .fini\n\
   229 +	.align 5\n\
   230 +	.global	_fini\n\
   231 +	.type	_fini,@function\n\
   232 +_fini:\n\
   233 +	mov.l	r12,@-r15\n\
   234 +	mov.l	r14,@-r15\n\
   235 +	sts.l	pr,@-r15\n\
   236 +#ifdef SHARED\n\
   237 +	mova	.L27,r0\n\
   238 +	mov.l	.L27,r12\n\
   239 +	add	r0,r12\n\
   240 +#endif\n\
   241 +	mov	r15,r14\n\
   242 +	ALIGN\n\
   243 +	END_FINI\n\
   244 +#ifdef SHARED\n\
   245 +	bra	1f\n\
   246 +	 nop\n\
   247 +	.align	2\n\
   248 +.L27:\n\
   249 +	.long	_GLOBAL_OFFSET_TABLE_\n\
   250 +#endif\n\
   251 +1:\n\
   252 +/*@_fini_PROLOG_ENDS*/\n\
   253 +\n\
   254 +/*@_fini_EPILOG_BEGINS*/\n\
   255 +	.section .fini\n\
   256 +	mov	r14,r15\n\
   257 +	lds.l	@r15+,pr\n\
   258 +	mov.l	@r15+,r14\n\
   259 +	rts	\n\
   260 +	mov.l	@r15+,r12\n\
   261 +\n\
   262 +	END_FINI\n\
   263 +	\n\
   264 +/*@_fini_EPILOG_ENDS*/\n\
   265 +\n\
   266 +/*@TRAILER_BEGINS*/\n\
   267  ");