Index: stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h =================================================================== --- stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h (revision 269791) +++ stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h (revision 269792) @@ -1,253 +1,253 @@ // -*- C++ -*- Exception handling and frame unwind runtime interface routines. // Copyright (C) 2001 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with GCC; see the file COPYING. If not, write to // the Free Software Foundation, 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // As a special exception, you may use this file as part of a free software // library without restriction. Specifically, if other files instantiate // templates or use macros or inline functions from this file, or you compile // this file and link it with other files to produce an executable, this // file does not by itself cause the resulting executable to be covered by // the GNU General Public License. This exception does not however // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. // This is derived from the C++ ABI for IA-64. Where we diverge // for cross-architecture compatibility are noted with "@@@". #ifndef _UNWIND_CXX_H #define _UNWIND_CXX_H 1 // Level 2: C++ ABI #include #include #include #include "unwind.h" #pragma GCC visibility push(default) namespace __cxxabiv1 { // A C++ exception object consists of a header, which is a wrapper around // an unwind object header with additional C++ specific information, // followed by the exception object itself. struct __cxa_exception { // Manage the exception object itself. std::type_info *exceptionType; void (*exceptionDestructor)(void *); // The C++ standard has entertaining rules wrt calling set_terminate // and set_unexpected in the middle of the exception cleanup process. std::unexpected_handler unexpectedHandler; std::terminate_handler terminateHandler; // The caught exception stack threads through here. __cxa_exception *nextException; // How many nested handlers have caught this exception. A negated // value is a signal that this object has been rethrown. int handlerCount; #ifdef __ARM_EABI_UNWINDER__ // Stack of exceptions in cleanups. __cxa_exception* nextPropagatingException; // The nuber of active cleanup handlers for this exception. int propagationCount; #else // Cache parsed handler data from the personality routine Phase 1 // for Phase 2 and __cxa_call_unexpected. int handlerSwitchValue; const unsigned char *actionRecord; const unsigned char *languageSpecificData; _Unwind_Ptr catchTemp; void *adjustedPtr; #endif // The generic exception header. Must be last. _Unwind_Exception unwindHeader; }; // Each thread in a C++ program has access to a __cxa_eh_globals object. struct __cxa_eh_globals { __cxa_exception *caughtExceptions; unsigned int uncaughtExceptions; #ifdef __ARM_EABI_UNWINDER__ __cxa_exception* propagatingExceptions; #endif }; // The __cxa_eh_globals for the current thread can be obtained by using // either of the following functions. The "fast" version assumes at least // one prior call of __cxa_get_globals has been made from the current // thread, so no initialization is necessary. extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw(); // Allocate memory for the exception plus the thown object. extern "C" void *__cxa_allocate_exception(std::size_t thrown_size) throw(); // Free the space allocated for the exception. extern "C" void __cxa_free_exception(void *thrown_exception) throw(); // Throw the exception. extern "C" void __cxa_throw (void *thrown_exception, std::type_info *tinfo, void (*dest) (void *)) __attribute__((noreturn)); // Used to implement exception handlers. extern "C" void *__cxa_get_exception_ptr (void *) throw(); extern "C" void *__cxa_begin_catch (void *) throw(); extern "C" void __cxa_end_catch (); extern "C" void __cxa_rethrow () __attribute__((noreturn)); // These facilitate code generation for recurring situations. extern "C" void __cxa_bad_cast (); extern "C" void __cxa_bad_typeid (); // @@@ These are not directly specified by the IA-64 C++ ABI. // Handles re-checking the exception specification if unexpectedHandler // throws, and if bad_exception needs to be thrown. Called from the // compiler. extern "C" void __cxa_call_unexpected (void *) __attribute__((noreturn)); extern "C" void __cxa_call_terminate (_Unwind_Exception*) __attribute__((noreturn)); #ifdef __ARM_EABI_UNWINDER__ // Arm EABI specified routines. typedef enum { ctm_failed = 0, ctm_succeeded = 1, ctm_succeeded_with_ptr_to_base = 2 } __cxa_type_match_result; -extern "C" bool __cxa_type_match(_Unwind_Exception*, const std::type_info*, +extern "C" __cxa_type_match_result __cxa_type_match(_Unwind_Exception*, const std::type_info*, bool, void**); -extern "C" void __cxa_begin_cleanup (_Unwind_Exception*); +extern "C" bool __cxa_begin_cleanup (_Unwind_Exception*); extern "C" void __cxa_end_cleanup (void); #endif // Invokes given handler, dying appropriately if the user handler was // so inconsiderate as to return. extern void __terminate(std::terminate_handler) __attribute__((noreturn)); extern void __unexpected(std::unexpected_handler) __attribute__((noreturn)); // The current installed user handlers. extern std::terminate_handler __terminate_handler; extern std::unexpected_handler __unexpected_handler; // These are explicitly GNU C++ specific. // Acquire the C++ exception header from the C++ object. static inline __cxa_exception * __get_exception_header_from_obj (void *ptr) { return reinterpret_cast<__cxa_exception *>(ptr) - 1; } // Acquire the C++ exception header from the generic exception header. static inline __cxa_exception * __get_exception_header_from_ue (_Unwind_Exception *exc) { return reinterpret_cast<__cxa_exception *>(exc + 1) - 1; } #if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__) static inline bool __is_gxx_exception_class(_Unwind_Exception_Class c) { // TODO: Take advantage of the fact that c will always be word aligned. return c[0] == 'G' && c[1] == 'N' && c[2] == 'U' && c[3] == 'C' && c[4] == 'C' && c[5] == '+' && c[6] == '+' && c[7] == '\0'; } static inline void __GXX_INIT_EXCEPTION_CLASS(_Unwind_Exception_Class c) { c[0] = 'G'; c[1] = 'N'; c[2] = 'U'; c[3] = 'C'; c[4] = 'C'; c[5] = '+'; c[6] = '+'; c[7] = '\0'; } #else // !__ARM_EABI_UNWINDER__ || __FreeBSD__ // This is the exception class we report -- "GNUCC++\0". const _Unwind_Exception_Class __gxx_exception_class = ((((((((_Unwind_Exception_Class) 'G' << 8 | (_Unwind_Exception_Class) 'N') << 8 | (_Unwind_Exception_Class) 'U') << 8 | (_Unwind_Exception_Class) 'C') << 8 | (_Unwind_Exception_Class) 'C') << 8 | (_Unwind_Exception_Class) '+') << 8 | (_Unwind_Exception_Class) '+') << 8 | (_Unwind_Exception_Class) '\0'); static inline bool __is_gxx_exception_class(_Unwind_Exception_Class c) { return c == __gxx_exception_class; } #define __GXX_INIT_EXCEPTION_CLASS(c) c = __gxx_exception_class #endif #ifdef __ARM_EABI_UNWINDER__ static inline void* __gxx_caught_object(_Unwind_Exception* eo) { return (void*)eo->barrier_cache.bitpattern[0]; } #else // !__ARM_EABI_UNWINDER__ // GNU C++ personality routine, Version 0. extern "C" _Unwind_Reason_Code __gxx_personality_v0 (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); // GNU C++ sjlj personality routine, Version 0. extern "C" _Unwind_Reason_Code __gxx_personality_sj0 (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); static inline void* __gxx_caught_object(_Unwind_Exception* eo) { __cxa_exception* header = __get_exception_header_from_ue (eo); return header->adjustedPtr; } #endif // !__ARM_EABI_UNWINDER__ } /* namespace __cxxabiv1 */ #pragma GCC visibility pop #endif // _UNWIND_CXX_H Index: stable/10/lib/libc/Versions.def =================================================================== --- stable/10/lib/libc/Versions.def (revision 269791) +++ stable/10/lib/libc/Versions.def (revision 269792) @@ -1,33 +1,38 @@ # $FreeBSD$ # # Note: Whenever bumping the FBSD version, always make # FBSDprivate_1.0 depend on the new FBSD version. # This will keep it at the end of the dependency chain. # # This is our first version; it depends on no other. # This version was first added to 7.0-current. FBSD_1.0 { }; # This version was first added to 8.0-current. FBSD_1.1 { } FBSD_1.0; # This version was first added to 9.0-current. FBSD_1.2 { } FBSD_1.1; # This version was first added to 10.0-current. FBSD_1.3 { } FBSD_1.2; +# This version was first added to 11.0-current. +FBSD_1.4 { +} FBSD_1.3; + + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write # simple ABI-checking tools. # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.3; +} FBSD_1.4; Index: stable/10/lib/libc/arm/Symbol.map =================================================================== --- stable/10/lib/libc/arm/Symbol.map (revision 269791) +++ stable/10/lib/libc/arm/Symbol.map (revision 269792) @@ -1,81 +1,86 @@ /* * $FreeBSD$ */ /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { /* PSEUDO syscalls */ _exit; __mcount; _setjmp; _longjmp; alloca; fabs; __infinity; __nan; makecontext; setjmp; longjmp; sigsetjmp; siglongjmp; htonl; htons; ntohl; ntohs; vfork; brk; cerror; /* XXX - Should this be .cerror (see sys/cerror.S)? */ sbrk; }; FBSD_1.3 { __flt_rounds; }; +FBSD_1.4 { + __gnu_Unwind_Find_exidx; + dl_unwind_find_exidx; +}; + FBSDprivate_1.0 { /* PSEUDO syscalls */ __sys_getlogin; _getlogin; __sys_exit; _set_tp; __aeabi_read_tp; ___longjmp; __makecontext; __longjmp; signalcontext; _signalcontext; __siglongjmp; __sys_vfork; _vfork; _brk; _end; curbrk; minbrk; _sbrk; /* softfloat */ __addsf3; __adddf3; __subsf3; __subdf3; __mulsf3; __muldf3; __divsf3; __divdf3; __floatsisf; __floatsidf; __fixsfsi; __fixdfsi; __fixunssfsi; __fixunsdfsi; __extendsfdf2; __truncdfsf2; _libc_arm_fpu_present; }; Index: stable/10/lib/libc/arm/aeabi/Makefile.inc =================================================================== --- stable/10/lib/libc/arm/aeabi/Makefile.inc (revision 269791) +++ stable/10/lib/libc/arm/aeabi/Makefile.inc (revision 269792) @@ -1,34 +1,35 @@ # $FreeBSD$ .PATH: ${.CURDIR}/arm/aeabi SRCS+= aeabi_atexit.c \ aeabi_double.c \ aeabi_float.c \ - aeabi_unwind_cpp.c + aeabi_unwind_cpp.c \ + aeabi_unwind_exidx.c .if ${MACHINE_ARCH:Marmv6*} SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S .endif # Add the aeabi_mem* functions. While they live in compiler-rt they call into # libc. This causes issues when other parts of libc call these functions. # We work around this by including these functions in libc but mark them as # hidden so users of libc will not pick up these versions. .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm SRCS+= aeabi_memcmp.S \ aeabi_memcpy.S \ aeabi_memmove.S \ aeabi_memset.S # Mark the functions as hidden so they are not available outside of libc. CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN CFLAGS+= ${CFLAGS.${.IMPSRC:T}} SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map Index: stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c =================================================================== --- stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c (nonexistent) +++ stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c (revision 269792) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +/* + * ARM EABI unwind helper. + * + * This finds the exidx section address and size associated with a given code + * address. There are separate implementations for static and dynamic code. + * + * GCC expects this function to exist as __gnu_Unwind_Find_exidx(), clang and + * BSD tools expect it to be dl_unwind_find_exidx(). Both have the same API, so + * we set up an alias for GCC. + */ +__strong_reference(dl_unwind_find_exidx, __gnu_Unwind_Find_exidx); + +/* + * Each entry in the exidx section is a pair of 32-bit words. We don't + * interpret the contents of the entries here; this typedef is just a local + * convenience for using sizeof() and doing pointer math. + */ +typedef struct exidx_entry { + uint32_t data[2]; +} exidx_entry; + +#ifdef __PIC__ + +/* + * Unwind helper for dynamically linked code. + * + * This finds the shared object that contains the given address, and returns the + * address of the exidx section in that shared object along with the number of + * entries in that section, or NULL if it wasn't found. + */ +void * +dl_unwind_find_exidx(const void *pc, int *pcount) +{ + const Elf_Phdr *hdr; + struct dl_phdr_info info; + int i; + + if (_rtld_addr_phdr(pc, &info)) { + hdr = info.dlpi_phdr; + for (i = 0; i < info.dlpi_phnum; i++, hdr++) { + if (hdr->p_type == PT_ARM_EXIDX) { + *pcount = hdr->p_memsz / sizeof(exidx_entry); + return ((void *)(info.dlpi_addr + hdr->p_vaddr)); + } + } + } + return (NULL); +} + +#else /* !__PIC__ */ + +/* + * Unwind helper for statically linked code. + * + * In a statically linked program, the linker populates a pair of symbols with + * the addresses of the start and end of the exidx table, so returning the + * address and count of elements is pretty straighforward. + */ +void * +dl_unwind_find_exidx(const void *pc, int *pcount) +{ + extern struct exidx_entry __exidx_start; + extern struct exidx_entry __exidx_end; + + *pcount = (int)(&__exidx_end - &__exidx_start); + return (&__exidx_start); +} + +#endif /* __PIC__ */ + Property changes on: stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/sys/arm/include/elf.h =================================================================== --- stable/10/sys/arm/include/elf.h (revision 269791) +++ stable/10/sys/arm/include/elf.h (revision 269792) @@ -1,111 +1,114 @@ /*- * Copyright (c) 2001 David E. O'Brien * Copyright (c) 1996-1997 John D. Polstra. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_ELF_H_ #define _MACHINE_ELF_H_ 1 /* * EABI ELF definitions for the StrongARM architecture. * See "ARM ELF", document no. `SWS ESPC 0003 A-08' for details. */ #include /* Definitions common to all 32 bit architectures. */ #define __ELF_WORD_SIZE 32 /* Used by */ #include typedef struct { /* Auxiliary vector entry on initial stack */ int a_type; /* Entry type. */ union { long a_val; /* Integer value. */ void *a_ptr; /* Address. */ void (*a_fcn)(void); /* Function pointer (not used). */ } a_un; } Elf32_Auxinfo; __ElfType(Auxinfo); #define ELF_ARCH EM_ARM #define ELF_MACHINE_OK(x) ((x) == EM_ARM) +/* Unwind info section type */ +#define PT_ARM_EXIDX (PT_LOPROC + 1) + /* * Relocation types. */ /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ #define AT_EXECFD 2 /* File descriptor of program to load. */ #define AT_PHDR 3 /* Program header of program already loaded. */ #define AT_PHENT 4 /* Size of each program header entry. */ #define AT_PHNUM 5 /* Number of program header entries. */ #define AT_PAGESZ 6 /* Page size in bytes. */ #define AT_BASE 7 /* Interpreter's base address. */ #define AT_FLAGS 8 /* Flags (unused). */ #define AT_ENTRY 9 /* Where interpreter should transfer control. */ #define AT_NOTELF 10 /* Program is not ELF ?? */ #define AT_UID 11 /* Real uid. */ #define AT_EUID 12 /* Effective uid. */ #define AT_GID 13 /* Real gid. */ #define AT_EGID 14 /* Effective gid. */ #define AT_EXECPATH 15 /* Path to the executable. */ #define AT_CANARY 16 /* Canary for SSP */ #define AT_CANARYLEN 17 /* Length of the canary. */ #define AT_OSRELDATE 18 /* OSRELDATE. */ #define AT_NCPUS 19 /* Number of CPUs. */ #define AT_PAGESIZES 20 /* Pagesizes. */ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_COUNT 24 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS32 #ifdef __ARMEB__ #define ELF_TARG_DATA ELFDATA2MSB #else #define ELF_TARG_DATA ELFDATA2LSB #endif #define ELF_TARG_MACH EM_ARM #define ELF_TARG_VER 1 /* * Magic number for the elf trampoline, chosen wisely to be an immediate * value. */ #define MAGIC_TRAMP_NUMBER 0x5c000003 #define ET_DYN_LOAD_ADDR 0x12000 #endif /* !_MACHINE_ELF_H_ */ Index: stable/10/sys/sys/link_elf.h =================================================================== --- stable/10/sys/sys/link_elf.h (revision 269791) +++ stable/10/sys/sys/link_elf.h (revision 269792) @@ -1,100 +1,104 @@ /*- * Copyright (c) 1993 Paul Kranenburg * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Paul Kranenburg. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ /* * RRS section definitions. * * The layout of some data structures defined in this header file is * such that we can provide compatibility with the SunOS 4.x shared * library scheme. */ #ifndef _SYS_LINK_ELF_H_ #define _SYS_LINK_ELF_H_ #include /* * Flags that describe the origin of the entries in Dl_serinfo. * SunOS has these in , we follow the suit. */ #define LA_SER_ORIG 0x01 /* original (needed) name */ #define LA_SER_LIBPATH 0x02 /* LD_LIBRARY_PATH entry prepended */ #define LA_SER_RUNPATH 0x04 /* runpath entry prepended */ #define LA_SER_CONFIG 0x08 /* configuration entry prepended */ #define LA_SER_DEFAULT 0x40 /* default path prepended */ #define LA_SER_SECURE 0x80 /* default (secure) path prepended */ typedef struct link_map { caddr_t l_addr; /* Base Address of library */ #ifdef __mips__ caddr_t l_offs; /* Load Offset of library */ #endif const char *l_name; /* Absolute Path to Library */ const void *l_ld; /* Pointer to .dynamic in memory */ struct link_map *l_next, *l_prev; /* linked list of of mapped libs */ } Link_map; struct r_debug { int r_version; /* not used */ struct link_map *r_map; /* list of loaded images */ void (*r_brk)(struct r_debug *, struct link_map *); /* pointer to break point */ enum { RT_CONSISTENT, /* things are stable */ RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */ } r_state; }; struct dl_phdr_info { Elf_Addr dlpi_addr; /* module relocation base */ const char *dlpi_name; /* module name */ const Elf_Phdr *dlpi_phdr; /* pointer to module's phdr */ Elf_Half dlpi_phnum; /* number of entries in phdr */ unsigned long long int dlpi_adds; /* total # of loads */ unsigned long long int dlpi_subs; /* total # of unloads */ size_t dlpi_tls_modid; void *dlpi_tls_data; }; __BEGIN_DECLS typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, void *); extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); int _rtld_addr_phdr(const void *, struct dl_phdr_info *); int _rtld_get_stack_prot(void); +#ifdef __ARM_EABI__ +void * dl_unwind_find_exidx(const void *, int *); +#endif + __END_DECLS #endif /* _SYS_LINK_ELF_H_ */ Index: stable/10 =================================================================== --- stable/10 (revision 269791) +++ stable/10 (revision 269792) Property changes on: stable/10 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r264082,268893,268993