patches/glibc/linuxthreads-2.3.2/alpha_cfi1.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/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S.diff?r1=1.5&r2=1.6&cvsroot=glibc'
     3 $ wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.diff?r1=1.3&r2=1.4&cvsroot=glibc'
     4 
     5 Might fix problem building with binutils-2.14.90.0.8/gcc-3.3.3 that was not
     6 present with binutils-2.13.90.0.18/gcc-3.3.2:
     7 
     8 ../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S: Assembler messages:
     9 ../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Warning: .ent
    10 directive without matching .end
    11 ../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Error: can't resolve
    12 `0' {.text section} - `L0^A' {.text section}
    13 make[2]: ***
    14 [/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/build-glibc/posix/vfork.o]
    15 Error 1
    16 make[2]: Leaving directory
    17 `/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2/posix'
    18 make[1]: *** [posix/subdir_lib] Error 2
    19 make[1]: Leaving directory
    20 `/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2'
    21 make: *** [all] Error 2
    22 
    23 See also alpha_cfi2.patch
    24 
    25 ===================================================================
    26 RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S,v
    27 retrieving revision 1.5
    28 retrieving revision 1.6
    29 diff -u -r1.5 -r1.6
    30 --- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/02/11 06:27:53	1.5
    31 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/06/06 05:51:03	1.6
    32 @@ -19,12 +19,13 @@
    33  
    34  #include <sysdep-cancel.h>
    35  
    36 -	.globl __vfork
    37          .align 4
    38 -        .ent __vfork,0
    39 -__LABEL(__vfork)
    40 +	.globl	__vfork
    41 +	.type	__vfork, @function
    42 +	.usepv	__vfork, std
    43 +	cfi_startproc
    44 +__vfork:
    45  	ldgp	gp, 0(pv)
    46 -	.prologue 1
    47  	PSEUDO_PROF
    48  
    49  #ifdef SHARED
    50 @@ -46,18 +47,24 @@
    51  	   fork and vfork object files.  */
    52  $do_fork:
    53  	subq	sp, 16, sp
    54 +	cfi_adjust_cfa_offset(16)
    55  	stq	ra, 0(sp)
    56 +	cfi_offset(ra, -16)
    57  	jsr	ra, HIDDEN_JUMPTARGET (__fork)
    58  	ldgp	gp, 0(ra)
    59  	ldq	ra, 0(sp)
    60  	addq	sp, 16, sp
    61 +	cfi_restore(ra)
    62 +	cfi_adjust_cfa_offset(-16)
    63  	ret
    64  
    65  $syscall_error:
    66  	SYSCALL_ERROR_HANDLER
    67  #endif
    68  
    69 -PSEUDO_END(__vfork)
    70 +	cfi_endproc
    71 +	.size __vfork, .-__vfork
    72 +
    73  libc_hidden_def (__vfork)
    74  
    75  weak_alias (__vfork, vfork)
    76 ===================================================================
    77 RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h,v
    78 retrieving revision 1.3
    79 retrieving revision 1.4
    80 diff -u -r1.3 -r1.4
    81 --- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/01/12 19:26:41	1.3
    82 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/06/06 05:51:03	1.4
    83 @@ -40,10 +40,11 @@
    84  # define PSEUDO(name, syscall_name, args)			\
    85  	.globl name;						\
    86  	.align 4;						\
    87 -	.ent name, 0;						\
    88 +	.type name, @function;					\
    89 +	.usepv name, std;					\
    90 +	cfi_startproc;						\
    91  __LABEL(name)							\
    92  	ldgp	gp, 0(pv);					\
    93 -	.prologue 1;						\
    94  	PSEUDO_PROF;						\
    95  	PSEUDO_PREPARE_ARGS					\
    96  	SINGLE_THREAD_P(t0);					\
    97 @@ -55,7 +56,9 @@
    98  	.subsection 2;						\
    99  __LABEL($pseudo_cancel)						\
   100  	subq	sp, 64, sp;					\
   101 +	cfi_def_cfa_offset(64);					\
   102  	stq	ra, 0(sp);					\
   103 +	cfi_offset(ra, -64);					\
   104  	SAVE_ARGS_##args;					\
   105  	CENABLE;						\
   106  	LOAD_ARGS_##args;					\
   107 @@ -67,19 +70,27 @@
   108  	ldq	ra, 0(sp);					\
   109  	ldq	v0, 8(sp);					\
   110  	addq	sp, 64, sp;					\
   111 +	cfi_remember_state;					\
   112 +	cfi_restore(ra);					\
   113 +	cfi_def_cfa_offset(0);					\
   114  	ret;							\
   115 +	cfi_restore_state;					\
   116  __LABEL($multi_error)						\
   117  	CDISABLE;						\
   118  	ldq	ra, 0(sp);					\
   119  	ldq	v0, 8(sp);					\
   120  	addq	sp, 64, sp;					\
   121 +	cfi_restore(ra);					\
   122 +	cfi_def_cfa_offset(0);					\
   123  __LABEL($syscall_error)						\
   124  	SYSCALL_ERROR_HANDLER;					\
   125 -	END(name);						\
   126  	.previous
   127  
   128  # undef PSEUDO_END
   129 -# define PSEUDO_END(sym)
   130 +# define PSEUDO_END(sym)					\
   131 +	.subsection 2;						\
   132 +	cfi_endproc;						\
   133 +	.size sym, .-sym
   134  
   135  # define SAVE_ARGS_0	/* Nothing.  */
   136  # define SAVE_ARGS_1	SAVE_ARGS_0; stq a0, 8(sp)