patches/glibc/2.2.5/initfini-alpha.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 Trivial fix to allow compiling with gcc3.3.
     2 
     3 --- glibc-2.2.5/sysdeps/alpha/elf/initfini.c.old	Fri Jun  6 17:59:45 2003
     4 +++ glibc-2.2.5/sysdeps/alpha/elf/initfini.c	Fri Jun  6 18:00:20 2003
     5 @@ -37,62 +37,62 @@
     6     files, all of which may have different GP values.  So we must reload
     7     the GP value from crti.o in crtn.o.  */
     8  
     9 -__asm__ ("
    10 -
    11 -#include \"defs.h\"
    12 -
    13 -/*@HEADER_ENDS*/
    14 -
    15 -/*@_init_PROLOG_BEGINS*/
    16 -	.section .init, \"ax\", @progbits
    17 -	.globl	_init
    18 -	.ent	_init
    19 -_init:
    20 -	ldgp	$29, 0($27)
    21 -	subq	$30, 16, $30
    22 -	lda	$27, __gmon_start__
    23 -	stq	$26, 0($30)
    24 -	stq	$29, 8($30)
    25 -	.prologue 1
    26 -	beq	$27, 1f
    27 -	jsr	$26, ($27), __gmon_start__
    28 -	ldq	$29, 8($30)
    29 -1:
    30 -	.align 3
    31 -	.end	_init
    32 -	.size	_init, 0
    33 -/*@_init_PROLOG_ENDS*/
    34 -
    35 -/*@_init_EPILOG_BEGINS*/
    36 -	.section .init, \"ax\", @progbits
    37 -	ldq	$26, 0($30)
    38 -	ldq	$29, 8($30)
    39 -	addq	$30, 16, $30
    40 -	ret
    41 -/*@_init_EPILOG_ENDS*/
    42 -
    43 -/*@_fini_PROLOG_BEGINS*/
    44 -	.section .fini, \"ax\", @progbits
    45 -	.globl	_fini
    46 -	.ent	_fini
    47 -_fini:
    48 -	ldgp	$29, 0($27)
    49 -	subq	$30, 16, $30
    50 -	stq	$26, 0($30)
    51 -	stq	$29, 8($30)
    52 -	.prologue 1
    53 -	.align 3
    54 -	.end	_fini
    55 -	.size	_fini, 0
    56 -/*@_fini_PROLOG_ENDS*/
    57 -
    58 -/*@_fini_EPILOG_BEGINS*/
    59 -	.section .fini, \"ax\", @progbits
    60 -	ldq	$26, 0($30)
    61 -	ldq	$29, 8($30)
    62 -	addq	$30, 16, $30
    63 -	ret
    64 -/*@_fini_EPILOG_ENDS*/
    65 -
    66 -/*@TRAILER_BEGINS*/
    67 +__asm__ ("\n\
    68 +\n\
    69 +#include \"defs.h\"\n\
    70 +\n\
    71 +/*@HEADER_ENDS*/\n\
    72 +\n\
    73 +/*@_init_PROLOG_BEGINS*/\n\
    74 +	.section .init, \"ax\", @progbits\n\
    75 +	.globl	_init\n\
    76 +	.ent	_init\n\
    77 +_init:\n\
    78 +	ldgp	$29, 0($27)\n\
    79 +	subq	$30, 16, $30\n\
    80 +	lda	$27, __gmon_start__\n\
    81 +	stq	$26, 0($30)\n\
    82 +	stq	$29, 8($30)\n\
    83 +	.prologue 1\n\
    84 +	beq	$27, 1f\n\
    85 +	jsr	$26, ($27), __gmon_start__\n\
    86 +	ldq	$29, 8($30)\n\
    87 +1:\n\
    88 +	.align 3\n\
    89 +	.end	_init\n\
    90 +	.size	_init, 0\n\
    91 +/*@_init_PROLOG_ENDS*/\n\
    92 +\n\
    93 +/*@_init_EPILOG_BEGINS*/\n\
    94 +	.section .init, \"ax\", @progbits\n\
    95 +	ldq	$26, 0($30)\n\
    96 +	ldq	$29, 8($30)\n\
    97 +	addq	$30, 16, $30\n\
    98 +	ret\n\
    99 +/*@_init_EPILOG_ENDS*/\n\
   100 +\n\
   101 +/*@_fini_PROLOG_BEGINS*/\n\
   102 +	.section .fini, \"ax\", @progbits\n\
   103 +	.globl	_fini\n\
   104 +	.ent	_fini\n\
   105 +_fini:\n\
   106 +	ldgp	$29, 0($27)\n\
   107 +	subq	$30, 16, $30\n\
   108 +	stq	$26, 0($30)\n\
   109 +	stq	$29, 8($30)\n\
   110 +	.prologue 1\n\
   111 +	.align 3\n\
   112 +	.end	_fini\n\
   113 +	.size	_fini, 0\n\
   114 +/*@_fini_PROLOG_ENDS*/\n\
   115 +\n\
   116 +/*@_fini_EPILOG_BEGINS*/\n\
   117 +	.section .fini, \"ax\", @progbits\n\
   118 +	ldq	$26, 0($30)\n\
   119 +	ldq	$29, 8($30)\n\
   120 +	addq	$30, 16, $30\n\
   121 +	ret\n\
   122 +/*@_fini_EPILOG_ENDS*/\n\
   123 +\n\
   124 +/*@TRAILER_BEGINS*/\n\
   125  ");