Ejemplo n.º 1
0
__do_global_dtors_aux (void)
{
  static func_ptr *p = __DTOR_LIST__ + 1;
  static _Bool completed;
  func_ptr f;

  if (__builtin_expect (completed, 0))
    return;

#ifdef CRTSTUFFS_O
  if (__cxa_finalize)
    __cxa_finalize (__dso_handle);
#endif

  while ((f = *p))
    {
      p++;
      f ();
    }

#ifdef USE_EH_FRAME_REGISTRY
#if defined(CRT_GET_RFIB_TEXT) || defined(CRT_GET_RFIB_DATA)
  /* If we used the new __register_frame_info_bases interface,
     make sure that we deregister from the same place.  */
  if (__deregister_frame_info_bases)
    __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
#else
  if (__deregister_frame_info)
    __deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
#endif

  completed = 1;
}
Ejemplo n.º 2
0
static void
live_image_destructor (struct live_images *image)
{
  if (image->object_info)
    {
      struct km_object_info *the_obj_info;

      the_obj_info =
        _keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST);
      if (the_obj_info)
        {
          seen_objects = the_obj_info->seen_objects;
          unseen_objects = the_obj_info->unseen_objects;

          /* Free any sorted arrays.  */
          __deregister_frame_info_bases (image->fde);

          the_obj_info->seen_objects = seen_objects;
          the_obj_info->unseen_objects = unseen_objects;
        }
      _keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST,
                                              the_obj_info);

      free (image->object_info);
      image->object_info = NULL;
      if (image->examined_p & ALLOCED_IMAGE_MASK)
        free (image->fde);
      image->fde = NULL;
    }
  image->examined_p = 0;
  image->destructor = NULL;
}
Ejemplo n.º 3
0
void
__libc_fini (void)
#endif
{
  /* Call destructor functions.  */
  run_hooks (__DTOR_LIST__);
#ifdef HAVE_DWARF2_UNWIND_INFO
# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
#  if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA
  __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
#  else
  __deregister_frame_info (__EH_FRAME_BEGIN__);
#  endif
# else
  __deregister_frame (__EH_FRAME_BEGIN__);
# endif
#endif
}
Ejemplo n.º 4
0
__do_global_dtors_aux (void)
{
#ifndef FINI_ARRAY_SECTION_ASM_OP
  static func_ptr *p = __DTOR_LIST__ + 1;
  func_ptr f;
#endif /* !defined(FINI_ARRAY_SECTION_ASM_OP)  */
  static _Bool completed;

  if (__builtin_expect (completed, 0))
    return;

#ifdef CRTSTUFFS_O
  if (__cxa_finalize)
    __cxa_finalize (__dso_handle);
#endif

#ifdef FINI_ARRAY_SECTION_ASM_OP
  /* If we are using .fini_array then destructors will be run via that
     mechanism.  */
#else /* !defined (FINI_ARRAY_SECTION_ASM_OP) */
  while ((f = *p))
    {
      p++;
      f ();
    }
#endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */

#ifdef USE_EH_FRAME_REGISTRY
#ifdef CRT_GET_RFIB_DATA
  /* If we used the new __register_frame_info_bases interface,
     make sure that we deregister from the same place.  */
  if (__deregister_frame_info_bases)
    __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
#else
  if (__deregister_frame_info)
    __deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
#endif

  completed = 1;
}
Ejemplo n.º 5
0
void *
__deregister_frame_info (const void *begin)
{
  return __deregister_frame_info_bases (begin);
}