1 diff -durN glibc-2.3.2.orig/elf/soinit.c glibc-2.3.2/elf/soinit.c
2 --- glibc-2.3.2.orig/elf/soinit.c 2001-11-16 00:09:20.000000000 +0100
3 +++ glibc-2.3.2/elf/soinit.c 2004-12-18 11:21:59.521615024 +0100
7 #ifdef HAVE_DWARF2_UNWIND_INFO
8 -static char __EH_FRAME_BEGIN__[]
9 +const static char __EH_FRAME_BEGIN__[]
10 __attribute__ ((section (".eh_frame")))
12 # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
13 diff -durN glibc-2.3.2.orig/elf/soinit.c~ glibc-2.3.2/elf/soinit.c~
14 --- glibc-2.3.2.orig/elf/soinit.c~ 1970-01-01 01:00:00.000000000 +0100
15 +++ glibc-2.3.2/elf/soinit.c~ 2001-11-16 00:09:20.000000000 +0100
17 +/* Initializer module for building the ELF shared C library. This file and
18 + sofini.c do the work normally done by crtbeginS.o and crtendS.o, to wrap
19 + the `.ctors' and `.dtors' sections so the lists are terminated, and
20 + calling those lists of functions. */
22 +#include <libc-internal.h>
25 +#ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
26 +# include <gccframe.h>
29 +static void (*const __CTOR_LIST__[1]) (void)
30 + __attribute__ ((section (".ctors")))
31 + = { (void (*) (void)) -1 };
32 +static void (*const __DTOR_LIST__[1]) (void)
33 + __attribute__ ((section (".dtors")))
34 + = { (void (*) (void)) -1 };
37 +run_hooks (void (*const list[]) (void))
43 +#ifdef HAVE_DWARF2_UNWIND_INFO
44 +static char __EH_FRAME_BEGIN__[]
45 + __attribute__ ((section (".eh_frame")))
47 +# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
48 +extern void __register_frame_info (const void *, struct object *);
49 +extern void __register_frame_info_bases (const void *, struct object *,
51 +extern void __deregister_frame_info (const void *);
52 +extern void __deregister_frame_info_bases (const void *);
54 +extern void __register_frame (const void *);
55 +extern void __deregister_frame (const void *);
59 +/* This function will be called from _init in init-first.c. */
61 +__libc_global_ctors (void)
63 + /* Call constructor functions. */
64 + run_hooks (__CTOR_LIST__);
66 +#ifdef HAVE_DWARF2_UNWIND_INFO
67 +# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
69 + static struct object ob;
70 +# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA
71 + void *tbase, *dbase;
73 +# ifdef CRT_GET_RFIB_TEXT
74 + CRT_GET_RFIB_TEXT (tbase);
78 +# ifdef CRT_GET_RFIB_DATA
79 + CRT_GET_RFIB_DATA (dbase);
83 + __register_frame_info_bases (__EH_FRAME_BEGIN__, &ob, tbase, dbase);
85 + __register_frame_info (__EH_FRAME_BEGIN__, &ob);
89 + __register_frame (__EH_FRAME_BEGIN__);
95 +/* This function becomes the DT_FINI termination function
96 + for the C library. */
97 +void _fini (void) __attribute__ ((section (".fini"))); /* Just for kicks. */
101 + /* Call destructor functions. */
102 + run_hooks (__DTOR_LIST__);
103 +#ifdef HAVE_DWARF2_UNWIND_INFO
104 +# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
105 +# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA
106 + __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
108 + __deregister_frame_info (__EH_FRAME_BEGIN__);
111 + __deregister_frame (__EH_FRAME_BEGIN__);