projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fgetws implementation.
[kopensolaris-gnu/glibc.git]
/
elf
/
dlopenold.c
diff --git
a/elf/dlopenold.c
b/elf/dlopenold.c
index
a9659ae
..
661a405
100644
(file)
--- a/
elf/dlopenold.c
+++ b/
elf/dlopenold.c
@@
-1,5
+1,5
@@
/* Load a shared object at run time.
/* Load a shared object at run time.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998
, 1999
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@
-17,12
+17,14
@@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef PIC
-
#include <dlfcn.h>
#include <stddef.h>
#include <elf/ldsodefs.h>
#include <dlfcn.h>
#include <stddef.h>
#include <elf/ldsodefs.h>
+/* This file is for compatibility with glibc 2.0. Compile it only if
+ versioning is used. */
+#if defined PIC && DO_VERSIONING
+
struct dlopen_args
{
/* The arguments for dlopen_doit. */
struct dlopen_args
{
/* The arguments for dlopen_doit. */
@@
-30,6
+32,8
@@
struct dlopen_args
int mode;
/* The return value of dlopen_doit. */
struct link_map *new;
int mode;
/* The return value of dlopen_doit. */
struct link_map *new;
+ /* Address of the caller. */
+ const void *caller;
};
};
@@
-38,7
+42,7
@@
dlopen_doit (void *a)
{
struct dlopen_args *args = (struct dlopen_args *) 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
);
}
}
@@
-47,6
+51,7
@@
__dlopen_nocheck (const char *file, int mode)
{
struct dlopen_args args;
args.file = file;
{
struct dlopen_args args;
args.file = file;
+ args.caller = __builtin_return_address (0);
if ((mode & RTLD_BINDING_MASK) == 0)
/* By default assume RTLD_LAZY. */
if ((mode & RTLD_BINDING_MASK) == 0)
/* By default assume RTLD_LAZY. */