aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-sym.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-sym.c')
-rw-r--r--elf/dl-sym.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index 7cd6e97..fb54a91 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -119,26 +119,11 @@ do_sym (void *handle, const char *name, void *who,
args.refp = &ref;
THREAD_GSCOPE_SET_FLAG ();
-
- const char *objname;
- const char *errstring = NULL;
- bool malloced;
- int err = _dl_catch_error (&objname, &errstring, &malloced,
- call_dl_lookup, &args);
-
+ struct dl_exception exception;
+ int err = _dl_catch_exception (&exception, call_dl_lookup, &args);
THREAD_GSCOPE_RESET_FLAG ();
-
- if (__glibc_unlikely (errstring != NULL))
- {
- /* The lookup was unsuccessful. Rethrow the error. */
- char *errstring_dup = strdupa (errstring);
- char *objname_dup = strdupa (objname);
- if (malloced)
- free ((char *) errstring);
-
- _dl_signal_error (err, objname_dup, NULL, errstring_dup);
- /* NOTREACHED */
- }
+ if (__glibc_unlikely (exception.errstring != NULL))
+ _dl_signal_exception (err, &exception, NULL);
result = args.map;
}