1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.2.5/initfini-sh.patch Fri Jun 01 16:50:29 2007 +0000
1.3 @@ -0,0 +1,243 @@
1.4 +--- glibc-2.2.5/sysdeps/sh/elf/initfini.c.orig Thu Jul 5 21:56:03 2001
1.5 ++++ glibc-2.2.5/sysdeps/sh/elf/initfini.c Wed May 28 08:45:08 2003
1.6 +@@ -27,122 +27,122 @@
1.7 + * crtn.s puts the corresponding function epilogues
1.8 + in the .init and .fini sections. */
1.9 +
1.10 +-__asm__ ("
1.11 +-
1.12 +-#include \"defs.h\"
1.13 +-#define SHARED
1.14 +-
1.15 +-/*@HEADER_ENDS*/
1.16 +-
1.17 +-/*@TESTS_BEGIN*/
1.18 +-
1.19 +-/*@TESTS_END*/
1.20 +-
1.21 +-/*@_init_PROLOG_BEGINS*/
1.22 +- .section .init
1.23 +- .align 5
1.24 +- .global _init
1.25 +- .type _init,@function
1.26 +-_init:
1.27 +- mov.l r12,@-r15
1.28 +- mov.l r14,@-r15
1.29 +- sts.l pr,@-r15
1.30 +-#ifdef SHARED
1.31 +- mova .L22,r0
1.32 +- mov.l .L22,r12
1.33 +- add r0,r12
1.34 +- mova .L23,r0
1.35 +- mov.l .L23,r1
1.36 +- add r0,r1
1.37 +-#else
1.38 +- mov.l .L23,r1
1.39 +-#endif
1.40 +- jsr @r1
1.41 +- mov r15,r14
1.42 +- bra 1f
1.43 +- nop
1.44 +- .align 2
1.45 +-#ifdef SHARED
1.46 +-.L22:
1.47 +- .long _GLOBAL_OFFSET_TABLE_
1.48 +-.L23:
1.49 +- .long __gmon_start__@PLT
1.50 +-#else
1.51 +-.L23:
1.52 +- .long __gmon_start__
1.53 +-#endif
1.54 +- .data
1.55 +- .global __fpscr_values
1.56 +-__fpscr_values:
1.57 +- .long 0
1.58 +- .long 0x80000
1.59 +- .previous
1.60 +-1:
1.61 +- ALIGN
1.62 +- END_INIT
1.63 +-
1.64 +-
1.65 +-/*@_init_PROLOG_ENDS*/
1.66 +-
1.67 +-/*@_init_EPILOG_BEGINS*/
1.68 +- .section .init
1.69 +- mov r14,r15
1.70 +- lds.l @r15+,pr
1.71 +- mov.l @r15+,r14
1.72 +- rts
1.73 +- mov.l @r15+,r12
1.74 +- END_INIT
1.75 +- .section .text
1.76 +- .align 5
1.77 +- .weak __gmon_start__
1.78 +- .type __gmon_start__,@function
1.79 +-__gmon_start__:
1.80 +- mov.l r14,@-r15
1.81 +- mov r15,r14
1.82 +- mov r14,r15
1.83 +- rts
1.84 +- mov.l @r15+,r14
1.85 +-
1.86 +-/*@_init_EPILOG_ENDS*/
1.87 +-
1.88 +-/*@_fini_PROLOG_BEGINS*/
1.89 +- .section .fini
1.90 +- .align 5
1.91 +- .global _fini
1.92 +- .type _fini,@function
1.93 +-_fini:
1.94 +- mov.l r12,@-r15
1.95 +- mov.l r14,@-r15
1.96 +- sts.l pr,@-r15
1.97 +-#ifdef SHARED
1.98 +- mova .L27,r0
1.99 +- mov.l .L27,r12
1.100 +- add r0,r12
1.101 +-#endif
1.102 +- mov r15,r14
1.103 +- ALIGN
1.104 +- END_FINI
1.105 +-#ifdef SHARED
1.106 +- bra 1f
1.107 +- nop
1.108 +- .align 2
1.109 +-.L27:
1.110 +- .long _GLOBAL_OFFSET_TABLE_
1.111 +-#endif
1.112 +-1:
1.113 +-/*@_fini_PROLOG_ENDS*/
1.114 +-
1.115 +-/*@_fini_EPILOG_BEGINS*/
1.116 +- .section .fini
1.117 +- mov r14,r15
1.118 +- lds.l @r15+,pr
1.119 +- mov.l @r15+,r14
1.120 +- rts
1.121 +- mov.l @r15+,r12
1.122 +-
1.123 +- END_FINI
1.124 +-
1.125 +-/*@_fini_EPILOG_ENDS*/
1.126 +-
1.127 +-/*@TRAILER_BEGINS*/
1.128 ++__asm__ ("\n\
1.129 ++\n\
1.130 ++#include \"defs.h\"\n\
1.131 ++#define SHARED\n\
1.132 ++\n\
1.133 ++/*@HEADER_ENDS*/\n\
1.134 ++\n\
1.135 ++/*@TESTS_BEGIN*/\n\
1.136 ++\n\
1.137 ++/*@TESTS_END*/\n\
1.138 ++\n\
1.139 ++/*@_init_PROLOG_BEGINS*/\n\
1.140 ++ .section .init\n\
1.141 ++ .align 5\n\
1.142 ++ .global _init\n\
1.143 ++ .type _init,@function\n\
1.144 ++_init:\n\
1.145 ++ mov.l r12,@-r15\n\
1.146 ++ mov.l r14,@-r15\n\
1.147 ++ sts.l pr,@-r15\n\
1.148 ++#ifdef SHARED\n\
1.149 ++ mova .L22,r0\n\
1.150 ++ mov.l .L22,r12\n\
1.151 ++ add r0,r12\n\
1.152 ++ mova .L23,r0\n\
1.153 ++ mov.l .L23,r1\n\
1.154 ++ add r0,r1\n\
1.155 ++#else\n\
1.156 ++ mov.l .L23,r1\n\
1.157 ++#endif\n\
1.158 ++ jsr @r1\n\
1.159 ++ mov r15,r14\n\
1.160 ++ bra 1f\n\
1.161 ++ nop\n\
1.162 ++ .align 2\n\
1.163 ++#ifdef SHARED\n\
1.164 ++.L22:\n\
1.165 ++ .long _GLOBAL_OFFSET_TABLE_\n\
1.166 ++.L23:\n\
1.167 ++ .long __gmon_start__@PLT\n\
1.168 ++#else\n\
1.169 ++.L23:\n\
1.170 ++ .long __gmon_start__\n\
1.171 ++#endif\n\
1.172 ++ .data\n\
1.173 ++ .global __fpscr_values\n\
1.174 ++__fpscr_values:\n\
1.175 ++ .long 0\n\
1.176 ++ .long 0x80000\n\
1.177 ++ .previous\n\
1.178 ++1:\n\
1.179 ++ ALIGN\n\
1.180 ++ END_INIT\n\
1.181 ++\n\
1.182 ++ \n\
1.183 ++/*@_init_PROLOG_ENDS*/\n\
1.184 ++\n\
1.185 ++/*@_init_EPILOG_BEGINS*/\n\
1.186 ++ .section .init\n\
1.187 ++ mov r14,r15\n\
1.188 ++ lds.l @r15+,pr\n\
1.189 ++ mov.l @r15+,r14\n\
1.190 ++ rts \n\
1.191 ++ mov.l @r15+,r12\n\
1.192 ++ END_INIT\n\
1.193 ++ .section .text\n\
1.194 ++ .align 5\n\
1.195 ++ .weak __gmon_start__\n\
1.196 ++ .type __gmon_start__,@function\n\
1.197 ++__gmon_start__:\n\
1.198 ++ mov.l r14,@-r15\n\
1.199 ++ mov r15,r14\n\
1.200 ++ mov r14,r15\n\
1.201 ++ rts \n\
1.202 ++ mov.l @r15+,r14\n\
1.203 ++ \n\
1.204 ++/*@_init_EPILOG_ENDS*/\n\
1.205 ++\n\
1.206 ++/*@_fini_PROLOG_BEGINS*/\n\
1.207 ++ .section .fini\n\
1.208 ++ .align 5\n\
1.209 ++ .global _fini\n\
1.210 ++ .type _fini,@function\n\
1.211 ++_fini:\n\
1.212 ++ mov.l r12,@-r15\n\
1.213 ++ mov.l r14,@-r15\n\
1.214 ++ sts.l pr,@-r15\n\
1.215 ++#ifdef SHARED\n\
1.216 ++ mova .L27,r0\n\
1.217 ++ mov.l .L27,r12\n\
1.218 ++ add r0,r12\n\
1.219 ++#endif\n\
1.220 ++ mov r15,r14\n\
1.221 ++ ALIGN\n\
1.222 ++ END_FINI\n\
1.223 ++#ifdef SHARED\n\
1.224 ++ bra 1f\n\
1.225 ++ nop\n\
1.226 ++ .align 2\n\
1.227 ++.L27:\n\
1.228 ++ .long _GLOBAL_OFFSET_TABLE_\n\
1.229 ++#endif\n\
1.230 ++1:\n\
1.231 ++/*@_fini_PROLOG_ENDS*/\n\
1.232 ++\n\
1.233 ++/*@_fini_EPILOG_BEGINS*/\n\
1.234 ++ .section .fini\n\
1.235 ++ mov r14,r15\n\
1.236 ++ lds.l @r15+,pr\n\
1.237 ++ mov.l @r15+,r14\n\
1.238 ++ rts \n\
1.239 ++ mov.l @r15+,r12\n\
1.240 ++\n\
1.241 ++ END_FINI\n\
1.242 ++ \n\
1.243 ++/*@_fini_EPILOG_ENDS*/\n\
1.244 ++\n\
1.245 ++/*@TRAILER_BEGINS*/\n\
1.246 + ");