aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/libc-start.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/libc-start.c')
-rw-r--r--sysdeps/generic/libc-start.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c
index b98f0a2..318d070 100644
--- a/sysdeps/generic/libc-start.c
+++ b/sysdeps/generic/libc-start.c
@@ -28,6 +28,11 @@ extern void __libc_init_first (int argc, char **argv, char **envp);
extern int __libc_multiple_libcs;
extern void *__libc_stack_end;
+#ifdef NEED_DL_SYSINFO
+# include "unwind-dw2-fde.h"
+static struct object eh_obj;
+#endif
+
#include <tls.h>
#ifndef SHARED
# include <dl-osinfo.h>
@@ -150,6 +155,13 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
__libc_check_standard_fds ();
#endif
+#ifdef NEED_DL_SYSINFO
+ /* Register the kernel's unwind table. */
+ if (GL(dl_sysinfo_eh_frame) != 0)
+ INTUSE(__register_frame_info_bases) ((void *) GL(dl_sysinfo_eh_frame),
+ &eh_obj, 0, 0);
+#endif
+
/* Register the destructor of the dynamic linker if there is any. */
if (__builtin_expect (rtld_fini != NULL, 1))
__cxa_atexit ((void (*) (void *)) rtld_fini, NULL, NULL);