diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/Dist | 1 | ||||
-rw-r--r-- | sysdeps/generic/bits/dlfcn.h | 33 | ||||
-rw-r--r-- | sysdeps/generic/dl-sysdep.c | 3 | ||||
-rw-r--r-- | sysdeps/generic/entry.h | 1 |
4 files changed, 37 insertions, 1 deletions
diff --git a/sysdeps/generic/Dist b/sysdeps/generic/Dist index e82624a61c..bc9e492e4f 100644 --- a/sysdeps/generic/Dist +++ b/sysdeps/generic/Dist @@ -1,2 +1,3 @@ make_siglist.c signame.c signame.h det_endian.c +entry.h diff --git a/sysdeps/generic/bits/dlfcn.h b/sysdeps/generic/bits/dlfcn.h new file mode 100644 index 0000000000..79604fe8ff --- /dev/null +++ b/sysdeps/generic/bits/dlfcn.h @@ -0,0 +1,33 @@ +/* System dependand definitions for run-time dynamic loading. + Copyright (C) 1996, 1997 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_DLFCN_H +#define _BITS_DLFCN_H 1 + +/* The MODE argument to `dlopen' contains one of the following: */ +#define RTLD_LAZY 0x001 /* Lazy function call binding. */ +#define RTLD_NOW 0x002 /* Immediate function call binding. */ +#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ + +/* If the following bit is set in the MODE argument to `dlopen', + the symbols of the loaded object and its dependencies are made + visible as if the object were linked directly into the program. */ +#define RTLD_GLOBAL 0x100 + +#endif /* bits/dlfcn.h */ diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index f10fca81fd..c5e85274b0 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include <elf.h> +#include <entry.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> @@ -52,7 +53,7 @@ _dl_sysdep_start (void **start_argptr, gid_t egid = 0; unsigned int seen; - user_entry = (ElfW(Addr)) &_start; + user_entry = (ElfW(Addr)) &ENTRY_POINT; _dl_argc = *(long *) start_argptr; _dl_argv = (char **) start_argptr + 1; _environ = &_dl_argv[_dl_argc + 1]; diff --git a/sysdeps/generic/entry.h b/sysdeps/generic/entry.h new file mode 100644 index 0000000000..cc0e1d88ab --- /dev/null +++ b/sysdeps/generic/entry.h @@ -0,0 +1 @@ +#define ENTRY_POINT _start |