vm: fix failed alloc condition
[minix.git] / lib / csu / common_elf / dwarf2_eh.h
blobdfa60fd58821c7c63705b9c585af1a8bb7f3d361
1 /* $NetBSD: dwarf2_eh.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Definitions for DWARF2 stack frame unwinding/exception handling.
36 #ifdef __GNUC__
38 * We must pass a DWARF2 unwind object to __register_frame_info().
39 * Since we don't reference any members of this object, but rather
40 * only provide storage for it, we just declare it in a simple,
41 * dumb way. We need room for 6 pointers in GCC 2.95.3 and GCC 3.0,
42 * but declare it with a little slop at the end.
44 struct dwarf2_eh_object {
45 void *space[8];
49 * These routines are provided by libgcc to register/unregister
50 * frame info. Note these prototypes must generate weak references
51 * (even though the routines in libgcc have strong definitions).
52 * This is so that we can link with a libgcc that doesn't have these
53 * routines (e.g. one that uses sjlj exceptions).
57 * A few platforms (x86_64, s390) have read-only .eh_frame by default,
58 * so they must have it declared 'const'. These platforms will override
59 * __EH_FRAME_CONST (which is empty by default) in their CPP flags.
62 #ifndef __EH_FRAME_CONST
63 #define __EH_FRAME_CONST
64 #endif
66 extern void __register_frame_info(__EH_FRAME_CONST void *,
67 struct dwarf2_eh_object *) __attribute__((weak));
68 extern void __deregister_frame_info(__EH_FRAME_CONST void *)
69 __attribute__((weak));
70 #endif /* __GNUC__ */