patches/glibc/2.2.5/initfini-ia64.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 Retrieved with
     2 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ia64/elf/initfini.c.diff?r1=1.2&r2=1.3&cvsroot=glibc'
     3 
     4 Revision 1.3, Sun Aug 25 00:34:23 2002 UTC (2 years, 1 month ago) by drepper
     5 Branch: MAIN
     6 CVS Tags: glibc-2-3-1, glibc-2-3
     7 Changes since 1.2: +78 -78 lines
     8 
     9 (__asm__): Don't use newlines embedded in string.
    10 
    11 Fixes error
    12 
    13 ../sysdeps/ia64/elf/initfini.c:30:10: missing terminating " character
    14 ../sysdeps/ia64/elf/initfini.c:32:10: #include expects "FILENAME" or <FILENAME>
    15 ../sysdeps/ia64/elf/initfini.c:37: error: request for member `section' in something not a structure or union
    16 ../sysdeps/ia64/elf/initfini.c:38: error: parse error before numeric constant
    17 ../sysdeps/ia64/elf/initfini.c:39: error: syntax error at '#' token
    18 ../sysdeps/ia64/elf/initfini.c:40: error: syntax error at '#' token
    19 ../sysdeps/ia64/elf/initfini.c:46: error: syntax error at '@' token
    20 ../sysdeps/ia64/elf/initfini.c:46: error: syntax error at '#' token
    21 ../sysdeps/ia64/elf/initfini.c:48: error: parse error before "r15"
    22 ../sysdeps/ia64/elf/initfini.c:48: warning: type defaults to `int' in declaration of `r15'
    23 ../sysdeps/ia64/elf/initfini.c:50: error: parse error before '.' token
    24 ../sysdeps/ia64/elf/initfini.c:56: error: syntax error at '#' token
    25 ../sysdeps/ia64/elf/initfini.c:57: error: parse error before "r12"
    26 ../sysdeps/ia64/elf/initfini.c:57: warning: type defaults to `int' in declaration of `r12'
    27 ../sysdeps/ia64/elf/initfini.c:58: warning: type defaults to `int' in declaration of `r12'
    28 ../sysdeps/ia64/elf/initfini.c:58: warning: data definition has no type or storage class
    29 ../sysdeps/ia64/elf/initfini.c:59: error: parse error before "gp"
    30 ../sysdeps/ia64/elf/initfini.c:59: warning: type defaults to `int' in declaration of `gp'
    31 ../sysdeps/ia64/elf/initfini.c:63: error: syntax error at '#' token
    32 ../sysdeps/ia64/elf/initfini.c:74: error: syntax error at '#' token
    33 ../sysdeps/ia64/elf/initfini.c:80: error: syntax error at '#' token
    34 ../sysdeps/ia64/elf/initfini.c:81: error: syntax error at '#' token
    35 ../sysdeps/ia64/elf/initfini.c:89: error: syntax error at '#' token
    36 ../sysdeps/ia64/elf/initfini.c:92: error: syntax error at '#' token
    37 ../sysdeps/ia64/elf/initfini.c:96: error: parse error before '.' token
    38 ../sysdeps/ia64/elf/initfini.c:101: error: syntax error at '#' token
    39 ../sysdeps/ia64/elf/initfini.c:106: error: syntax error at '#' token
    40 ../sysdeps/ia64/elf/initfini.c:107:1: missing terminating " character
    41 make[2]: *** [/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/csu/initfini.s] Error 1
    42 make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/glibc-2.2.5/csu'
    43 make[1]: *** [csu/subdir_lib] Error 2
    44 make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/glibc-2.2.5'
    45 make: *** [all] Error 2
    46 
    47 ===================================================================
    48 RCS file: /cvs/glibc/libc/sysdeps/ia64/elf/initfini.c,v
    49 retrieving revision 1.2
    50 retrieving revision 1.3
    51 diff -u -r1.2 -r1.3
    52 --- libc/sysdeps/ia64/elf/initfini.c	2001/07/06 04:55:54	1.2
    53 +++ libc/sysdeps/ia64/elf/initfini.c	2002/08/25 00:34:23	1.3
    54 @@ -1,5 +1,5 @@
    55  /* Special .init and .fini section support for ia64.
    56 -   Copyright (C) 2000 Free Software Foundation, Inc.
    57 +   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
    58     This file is part of the GNU C Library.
    59  
    60     The GNU C Library is free software; you can redistribute it and/or
    61 @@ -27,81 +27,81 @@
    62     * crtn.s puts the corresponding function epilogues
    63     in the .init and .fini sections. */
    64  
    65 -__asm__ ("
    66 -
    67 -#include \"defs.h\"
    68 -
    69 -/*@HEADER_ENDS*/
    70 -
    71 -/*@_init_PROLOG_BEGINS*/
    72 -	.section .init
    73 -	.align 16
    74 -	.global _init#
    75 -	.proc _init#
    76 -_init:
    77 -	alloc r34 = ar.pfs, 0, 3, 0, 0
    78 -	mov r32 = r12
    79 -	mov r33 = b0
    80 -	adds r12 = -16, r12
    81 -	addl r14 = @ltoff(@fptr(__gmon_start__#)), gp
    82 -	;;
    83 -	ld8 r15 = [r14]
    84 -	;;
    85 -	cmp.eq p6, p7 = 0, r15
    86 -	(p6) br.cond.dptk .L5
    87 -
    88 -/* we could use r35 to save gp, but we use the stack since that's what
    89 - * all the other init routines will do --davidm 00/04/05 */
    90 -	st8 [r12] = gp, -16
    91 -	br.call.sptk.many b0 = __gmon_start__# ;;
    92 -	adds r12 = 16, r12
    93 -	;;
    94 -	ld8 gp = [r12]
    95 -	;;
    96 -.L5:
    97 -	.align 16
    98 -	.endp _init#
    99 -
   100 -/*@_init_PROLOG_ENDS*/
   101 -
   102 -/*@_init_EPILOG_BEGINS*/
   103 -	.section .init
   104 -	.regstk 0,2,0,0
   105 -	mov r12 = r32
   106 -	mov ar.pfs = r34
   107 -	mov b0 = r33
   108 -	br.ret.sptk.many b0
   109 -	.endp _init#
   110 -/*@_init_EPILOG_ENDS*/
   111 -
   112 -/*@_fini_PROLOG_BEGINS*/
   113 -	.section .fini
   114 -	.align 16
   115 -	.global _fini#
   116 -	.proc _fini#
   117 -_fini:
   118 -	alloc r34 = ar.pfs, 0, 3, 0, 0
   119 -	mov r32 = r12
   120 -	mov r33 = b0
   121 -	adds r12 = -16, r12
   122 -	;;
   123 -	.align 16
   124 -	.endp _fini#
   125 -
   126 -/*@_fini_PROLOG_ENDS*/
   127 -	br.call.sptk.many b0 = i_am_not_a_leaf# ;;
   128 -	;;
   129 -
   130 -/*@_fini_EPILOG_BEGINS*/
   131 -	.section .fini
   132 -	mov r12 = r32
   133 -	mov ar.pfs = r34
   134 -	mov b0 = r33
   135 -	br.ret.sptk.many b0
   136 -	.endp _fini#
   137 -
   138 -/*@_fini_EPILOG_ENDS*/
   139 -
   140 -/*@TRAILER_BEGINS*/
   141 -	.weak	__gmon_start__#
   142 +__asm__ ("\n\
   143 +\n\
   144 +#include \"defs.h\"\n\
   145 +\n\
   146 +/*@HEADER_ENDS*/\n\
   147 +\n\
   148 +/*@_init_PROLOG_BEGINS*/\n\
   149 +	.section .init\n\
   150 +	.align 16\n\
   151 +	.global _init#\n\
   152 +	.proc _init#\n\
   153 +_init:\n\
   154 +	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
   155 +	mov r32 = r12\n\
   156 +	mov r33 = b0\n\
   157 +	adds r12 = -16, r12\n\
   158 +	addl r14 = @ltoff(@fptr(__gmon_start__#)), gp\n\
   159 +	;;\n\
   160 +	ld8 r15 = [r14]\n\
   161 +	;;\n\
   162 +	cmp.eq p6, p7 = 0, r15\n\
   163 +	(p6) br.cond.dptk .L5\n\
   164 +\n\
   165 +/* we could use r35 to save gp, but we use the stack since that's what\n\
   166 + * all the other init routines will do --davidm 00/04/05 */\n\
   167 +	st8 [r12] = gp, -16\n\
   168 +	br.call.sptk.many b0 = __gmon_start__# ;;\n\
   169 +	adds r12 = 16, r12\n\
   170 +	;;\n\
   171 +	ld8 gp = [r12]\n\
   172 +	;;\n\
   173 +.L5:\n\
   174 +	.align 16\n\
   175 +	.endp _init#\n\
   176 +\n\
   177 +/*@_init_PROLOG_ENDS*/\n\
   178 +\n\
   179 +/*@_init_EPILOG_BEGINS*/\n\
   180 +	.section .init\n\
   181 +	.regstk 0,2,0,0\n\
   182 +	mov r12 = r32\n\
   183 +	mov ar.pfs = r34\n\
   184 +	mov b0 = r33\n\
   185 +	br.ret.sptk.many b0\n\
   186 +	.endp _init#\n\
   187 +/*@_init_EPILOG_ENDS*/\n\
   188 +\n\
   189 +/*@_fini_PROLOG_BEGINS*/\n\
   190 +	.section .fini\n\
   191 +	.align 16\n\
   192 +	.global _fini#\n\
   193 +	.proc _fini#\n\
   194 +_fini:\n\
   195 +	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
   196 +	mov r32 = r12\n\
   197 +	mov r33 = b0\n\
   198 +	adds r12 = -16, r12\n\
   199 +	;;\n\
   200 +	.align 16\n\
   201 +	.endp _fini#\n\
   202 +\n\
   203 +/*@_fini_PROLOG_ENDS*/\n\
   204 +	br.call.sptk.many b0 = i_am_not_a_leaf# ;;\n\
   205 +	;;\n\
   206 +\n\
   207 +/*@_fini_EPILOG_BEGINS*/\n\
   208 +	.section .fini\n\
   209 +	mov r12 = r32\n\
   210 +	mov ar.pfs = r34\n\
   211 +	mov b0 = r33\n\
   212 +	br.ret.sptk.many b0\n\
   213 +	.endp _fini#\n\
   214 +\n\
   215 +/*@_fini_EPILOG_ENDS*/\n\
   216 +\n\
   217 +/*@TRAILER_BEGINS*/\n\
   218 +	.weak	__gmon_start__#\n\
   219  ");