X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=blobdiff_plain;f=elf%2Fdlopenold.c;h=661a40579adf129ccd06e85d9793157b40aff424;hp=7e7b462e1a25f376971530934a1f59420d7ade52;hb=1d42347e27bfa3b94529af46f3eb11f258faf01c;hpb=f54401ab448c18a1ec5799c61f053c82dd9ac7ba diff --git a/elf/dlopenold.c b/elf/dlopenold.c index 7e7b462e1a..661a40579a 100644 --- a/elf/dlopenold.c +++ b/elf/dlopenold.c @@ -32,6 +32,8 @@ struct dlopen_args int mode; /* The return value of dlopen_doit. */ struct link_map *new; + /* Address of the caller. */ + const void *caller; }; @@ -40,7 +42,7 @@ dlopen_doit (void *a) { struct dlopen_args *args = (struct dlopen_args *) a; - args->new = _dl_open (args->file ?: "", args->mode); + args->new = _dl_open (args->file ?: "", args->mode, args->caller); } @@ -49,6 +51,7 @@ __dlopen_nocheck (const char *file, int mode) { struct dlopen_args args; args.file = file; + args.caller = __builtin_return_address (0); if ((mode & RTLD_BINDING_MASK) == 0) /* By default assume RTLD_LAZY. */