summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch538
1 files changed, 538 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
new file mode 100644
index 0000000000..8e10979ce8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
@@ -0,0 +1,538 @@
12004-11-27 Jakub Jelinek <jakub@redhat.com>
2
3 * config.gcc (ia64*-*-linux*): If native and libelf is installed,
4 use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
5 fragments.
6 * config/ia64/t-glibc-no-libunwind: New file.
7 * config/ia64/change-symver.c: New file.
8 * config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
9 define _Unwind_* to __symverglobal_Unwind_*.
10 (alias): Undefine.
11 (symverglobal): Define. Use it on _Unwind_*.
12 * config/ia64/mkmap-symver-multi.awk: New file.
13 * config/ia64/libgcc-ia64-no-libunwind.ver: New file.
14
15--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
16+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
17@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
18 ;;
19 ia64*-*-linux*)
20 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
21- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
22- if test x$with_system_libunwind != xyes ; then
23- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
24+ tmake_file="${tmake_file} ia64/t-ia64"
25+ if test x${target} = x${host} && test x${target} = x${build} \
26+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
27+ && test -f /usr/lib/libelf.so; then
28+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
29+ else
30+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
31+ if test x$with_system_libunwind != xyes ; then
32+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
33+ fi
34 fi
35 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
36 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
37--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
38+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
39@@ -0,0 +1,30 @@
40+# Don't use system libunwind library on IA-64 GLIBC based system,
41+# but make _Unwind_* symbols unversioned, so that created programs
42+# are usable even when libgcc_s uses libunwind.
43+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
44+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
45+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
46+
47+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
48+ -Wl,--soname=$(SHLIB_SONAME) \
49+ -Wl,--version-script=$(SHLIB_MAP) \
50+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
51+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
52+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
53+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
54+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
55+ else true; fi && \
56+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
57+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
58+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
59+ GCC_3.4.2 _GLOBAL_ \
60+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
61+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
62+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
63+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
64+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
65+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
66+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
67+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
68+
69+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
70--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
71+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
72@@ -0,0 +1,211 @@
73+#define _GNU_SOURCE 1
74+#define _FILE_OFFSET_BITS 64
75+#include <endian.h>
76+#include <errno.h>
77+#include <error.h>
78+#include <fcntl.h>
79+#include <fnmatch.h>
80+#include <gelf.h>
81+#include <stdlib.h>
82+#include <string.h>
83+#include <unistd.h>
84+
85+int
86+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
87+{
88+ if (strcmp (name, "_GLOBAL_") == 0)
89+ return 1;
90+
91+ int cnt;
92+ size_t offset = 0;
93+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
94+ {
95+ GElf_Verdef defmem;
96+ GElf_Verdef *def;
97+ GElf_Verdaux auxmem;
98+ GElf_Verdaux *aux;
99+ unsigned int auxoffset;
100+
101+ /* Get the data at the next offset. */
102+ def = gelf_getverdef (verd, offset, &defmem);
103+ if (def == NULL)
104+ break;
105+
106+ auxoffset = offset + def->vd_aux;
107+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
108+ if (aux == NULL)
109+ break;
110+
111+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
112+ aux->vda_name)) == 0)
113+ return def->vd_ndx;
114+
115+ /* Find the next offset. */
116+ offset += def->vd_next;
117+ }
118+
119+ return -1;
120+}
121+
122+int
123+main (int argc, char **argv)
124+{
125+ if (argc < 4)
126+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
127+
128+ const char *fname = argv[1];
129+
130+ /* Open the file. */
131+ int fd;
132+ fd = open (fname, O_RDWR);
133+ if (fd == -1)
134+ error (1, errno, fname);
135+
136+ elf_version (EV_CURRENT);
137+
138+ /* Now get the ELF descriptor. */
139+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
140+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
141+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
142+
143+ size_t shstrndx;
144+ /* Get the section header string table index. */
145+ if (elf_getshstrndx (elf, &shstrndx) < 0)
146+ error (1, 0, "cannot get shstrndx from %s", fname);
147+
148+ GElf_Ehdr ehdr_mem;
149+ GElf_Ehdr *ehdr;
150+
151+ /* We need the ELF header in a few places. */
152+ ehdr = gelf_getehdr (elf, &ehdr_mem);
153+ if (ehdr == NULL)
154+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
155+
156+ Elf_Scn *scn = NULL;
157+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
158+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
159+
160+ while ((scn = elf_nextscn (elf, scn)) != NULL)
161+ {
162+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
163+
164+ if (shdr == NULL)
165+ error (1, 0, "couldn't get shdr from %s", fname);
166+
167+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
168+ {
169+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
170+ Elf_Data **p;
171+
172+ if (strcmp (name, ".gnu.version") == 0)
173+ {
174+ p = &ver;
175+ ver_shdr = *shdr;
176+ }
177+ else if (strcmp (name, ".gnu.version_d") == 0)
178+ {
179+ p = &verd;
180+ verd_shdr = *shdr;
181+ }
182+ else if (strcmp (name, ".dynsym") == 0)
183+ {
184+ p = &dynsym;
185+ dynsym_shdr = *shdr;
186+ }
187+ else
188+ continue;
189+
190+ if (*p != NULL)
191+ error (1, 0, "Two %s sections in %s", name, fname);
192+ *p = elf_getdata (scn, NULL);
193+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
194+ error (1, 0, "No data or non-contiguous data in %s section in %s",
195+ name, fname);
196+ }
197+ }
198+
199+ if (ver == NULL || verd == NULL || dynsym == NULL)
200+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
201+
202+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
203+ if (from_idx == -1)
204+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
205+
206+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
207+ if (to_idx == -1)
208+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
209+
210+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
211+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
212+ || ver_shdr.sh_entsize != 2
213+ || (ver_shdr.sh_size & 1)
214+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
215+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
216+
217+ size_t nentries = ver_shdr.sh_size / 2;
218+ size_t cnt;
219+ GElf_Versym array[nentries];
220+ for (cnt = 0; cnt < nentries; ++cnt)
221+ {
222+ GElf_Versym vsymmem;
223+ GElf_Versym *vsym;
224+
225+ vsym = gelf_getversym (ver, cnt, &vsymmem);
226+ if (vsym == NULL)
227+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
228+
229+ array[cnt] = *vsym;
230+ if (*vsym != from_idx)
231+ continue;
232+
233+ GElf_Sym sym_mem;
234+ GElf_Sym *sym;
235+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
236+ if (sym == NULL)
237+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
238+
239+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
240+
241+ int argn;
242+ for (argn = 4; argn < argc; ++argn)
243+ if (fnmatch (argv[argn], name, 0) == 0)
244+ {
245+ array[cnt] = to_idx;
246+ break;
247+ }
248+ }
249+
250+ if (sizeof (array[0]) != 2)
251+ abort ();
252+
253+#if __BYTE_ORDER == __LITTLE_ENDIAN
254+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
255+ ;
256+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
257+#elif __BYTE_ORDER == __BIG_ENDIAN
258+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
259+ ;
260+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
261+#else
262+# error Unsupported endianity
263+#endif
264+ {
265+ for (cnt = 0; cnt < nentries; ++cnt)
266+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
267+ }
268+ else
269+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
270+
271+ if (elf_end (elf) != 0)
272+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
273+
274+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
275+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
276+ fname);
277+
278+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
279+ error (1, 0, "failed to write .gnu.version section into %s", fname);
280+
281+ close (fd);
282+ return 0;
283+}
284--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
285+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
286@@ -51,6 +51,51 @@
287 #define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
288 #define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
289
290+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
291+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
292+ (_Unwind_Trace_Fn, void *);
293+extern void __symverglobal_Unwind_DeleteException
294+ (struct _Unwind_Exception *);
295+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
296+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
297+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
298+extern _Unwind_Word __symverglobal_Unwind_GetCFA
299+ (struct _Unwind_Context *);
300+extern _Unwind_Word __symverglobal_Unwind_GetBSP
301+ (struct _Unwind_Context *);
302+extern _Unwind_Word __symverglobal_Unwind_GetGR
303+ (struct _Unwind_Context *, int );
304+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
305+extern void *__symverglobal_Unwind_GetLanguageSpecificData
306+ (struct _Unwind_Context *);
307+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
308+ (struct _Unwind_Context *);
309+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
310+ (struct _Unwind_Exception *);
311+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
312+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
313+ (struct _Unwind_Exception *);
314+extern void __symverglobal_Unwind_SetGR
315+ (struct _Unwind_Context *, int, _Unwind_Word);
316+extern void __symverglobal_Unwind_SetIP
317+ (struct _Unwind_Context *, _Unwind_Ptr);
318+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
319+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
320+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
321+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
322+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
323+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
324+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
325+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
326+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
327+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
328+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
329+#define _Unwind_Resume __symverglobal_Unwind_Resume
330+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
331+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
332+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
333+#endif
334+
335 enum unw_application_register
336 {
337 UNW_AR_BSP,
338@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
339 alias (_Unwind_SetIP);
340 #endif
341
342+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
343+#undef alias
344+#define symverglobal(name, version) \
345+__typeof (__symverglobal##name) __symverlocal##name \
346+ __attribute__ ((alias ("__symverglobal" #name))); \
347+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
348+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
349+
350+#undef _Unwind_Backtrace
351+#undef _Unwind_DeleteException
352+#undef _Unwind_FindEnclosingFunction
353+#undef _Unwind_ForcedUnwind
354+#undef _Unwind_GetBSP
355+#undef _Unwind_GetCFA
356+#undef _Unwind_GetGR
357+#undef _Unwind_GetIP
358+#undef _Unwind_GetLanguageSpecificData
359+#undef _Unwind_GetRegionStart
360+#undef _Unwind_RaiseException
361+#undef _Unwind_Resume
362+#undef _Unwind_Resume_or_Rethrow
363+#undef _Unwind_SetGR
364+#undef _Unwind_SetIP
365+symverglobal (_Unwind_Backtrace, GCC_3.3);
366+symverglobal (_Unwind_DeleteException, GCC_3.0);
367+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
368+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
369+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
370+symverglobal (_Unwind_GetCFA, GCC_3.3);
371+symverglobal (_Unwind_GetGR, GCC_3.0);
372+symverglobal (_Unwind_GetIP, GCC_3.0);
373+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
374+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
375+symverglobal (_Unwind_RaiseException, GCC_3.0);
376+symverglobal (_Unwind_Resume, GCC_3.0);
377+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
378+symverglobal (_Unwind_SetGR, GCC_3.0);
379+symverglobal (_Unwind_SetIP, GCC_3.0);
380+#endif
381+
382 #endif
383--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
384+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
385@@ -0,0 +1,133 @@
386+# Generate an ELF symbol version map a-la Solaris and GNU ld.
387+# Contributed by Richard Henderson <rth@cygnus.com>
388+#
389+# This file is part of GCC.
390+#
391+# GCC is free software; you can redistribute it and/or modify it under
392+# the terms of the GNU General Public License as published by the Free
393+# Software Foundation; either version 2, or (at your option) any later
394+# version.
395+#
396+# GCC is distributed in the hope that it will be useful, but WITHOUT
397+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
398+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
399+# License for more details.
400+#
401+# You should have received a copy of the GNU General Public License
402+# along with GCC; see the file COPYING. If not, write to the Free
403+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
404+# 02110-1301, USA.
405+
406+BEGIN {
407+ state = "nm";
408+ sawsymbol = 0;
409+}
410+
411+# Remove comment and blank lines.
412+/^ *#/ || /^ *$/ {
413+ next;
414+}
415+
416+# We begin with nm input. Collect the set of symbols that are present
417+# so that we can not emit them into the final version script -- Solaris
418+# complains at us if we do.
419+
420+state == "nm" && /^%%/ {
421+ state = "ver";
422+ next;
423+}
424+
425+state == "nm" && ($1 == "U" || $2 == "U") {
426+ next;
427+}
428+
429+state == "nm" && NF == 3 {
430+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
431+ def[$3] = 1
432+ tl=$3
433+ sub(/^.*@/,"",tl)
434+ ver[$3] = tl
435+ } else {
436+ sub(/@@?GCC_[0-9.]*$/,"",$3)
437+ def[$3] = 1;
438+ }
439+ sawsymbol = 1;
440+ next;
441+}
442+
443+state == "nm" {
444+ next;
445+}
446+
447+# Now we process a simplified variant of the Solaris symbol version
448+# script. We have one symbol per line, no semicolons, simple markers
449+# for beginning and ending each section, and %inherit markers for
450+# describing version inheritence. A symbol may appear in more than
451+# one symbol version, and the last seen takes effect.
452+
453+NF == 3 && $1 == "%inherit" {
454+ inherit[$2] = $3;
455+ next;
456+}
457+
458+NF == 2 && $2 == "{" {
459+ libs[$1] = 1;
460+ thislib = $1;
461+ next;
462+}
463+
464+$1 == "}" {
465+ thislib = "";
466+ next;
467+}
468+
469+{
470+ ver[$1] = thislib;
471+ next;
472+}
473+
474+END {
475+ if (!sawsymbol)
476+ {
477+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
478+ exit 1;
479+ }
480+ for (l in libs)
481+ output(l);
482+}
483+
484+function output(lib) {
485+ if (done[lib])
486+ return;
487+ done[lib] = 1;
488+ if (inherit[lib])
489+ output(inherit[lib]);
490+
491+ empty=1
492+ for (sym in ver)
493+ if ((ver[sym] == lib) && (sym in def))
494+ {
495+ if (empty)
496+ {
497+ printf("%s {\n", lib);
498+ printf(" global:\n");
499+ empty = 0;
500+ }
501+ symp = sym;
502+ sub(/@GCC_[0-9.]*$/,"",symp);
503+ printf("\t%s;\n", symp);
504+ if (dotsyms)
505+ printf("\t.%s;\n", symp);
506+ }
507+
508+ if (empty)
509+ {
510+ for (l in libs)
511+ if (inherit[l] == lib)
512+ inherit[l] = inherit[lib];
513+ }
514+ else if (inherit[lib])
515+ printf("} %s;\n", inherit[lib]);
516+ else
517+ printf ("\n local:\n\t*;\n};\n");
518+}
519--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
520+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
521@@ -0,0 +1,17 @@
522+GCC_3.4.2 {
523+ _Unwind_GetGR
524+ _Unwind_RaiseException
525+ _Unwind_GetRegionStart
526+ _Unwind_SetIP
527+ _Unwind_GetIP
528+ _Unwind_GetLanguageSpecificData
529+ _Unwind_Resume
530+ _Unwind_DeleteException
531+ _Unwind_SetGR
532+ _Unwind_ForcedUnwind
533+ _Unwind_Backtrace
534+ _Unwind_FindEnclosingFunction
535+ _Unwind_GetCFA
536+ _Unwind_Resume_or_Rethrow
537+ _Unwind_GetBSP
538+}