diff options
author | jdp <jdp@FreeBSD.org> | 1999-04-09 00:28:43 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1999-04-09 00:28:43 +0000 |
commit | e595dd9e791a7eb6b5a7fe22be06e31e5865a8a5 (patch) | |
tree | 011da07a2199193b40aa17dcb23e0eee2e7128f2 /libexec/rtld-elf/rtld.h | |
parent | 2034f40c32390dde21785f5701e20bf7c6633adf (diff) | |
download | FreeBSD-src-e595dd9e791a7eb6b5a7fe22be06e31e5865a8a5.zip FreeBSD-src-e595dd9e791a7eb6b5a7fe22be06e31e5865a8a5.tar.gz |
Eliminate all machine-dependent code from the main source body and
the Makefile, and move it down into the architecture-specific
subdirectories.
Eliminate an asm() statement for the i386.
Make the dynamic linker work if it is built as an executable instead
of as a shared library. See i386/Makefile.inc to find out how to
do it. Note, this change is not enabled and it might never be
enabled. But it might be useful in the future. Building the
dynamic linker as an executable should make it start up faster,
because it won't have any relocations. But in practice I suspect
the difference is negligible.
Diffstat (limited to 'libexec/rtld-elf/rtld.h')
-rw-r--r-- | libexec/rtld-elf/rtld.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index f1a9afd..1380e74 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.h,v 1.4 1998/09/02 02:51:12 jdp Exp $ + * $Id: rtld.h,v 1.5 1998/09/04 19:03:57 dfr Exp $ */ #ifndef RTLD_H /* { */ @@ -34,6 +34,8 @@ #include <elf.h> #include <stddef.h> +#include "rtld_machdep.h" + #ifndef STANDARD_LIBRARY_PATH #define STANDARD_LIBRARY_PATH "/usr/lib/elf:/usr/lib" #endif @@ -85,7 +87,7 @@ typedef struct Struct_Obj_Entry { size_t phsize; /* Size of program header in bytes */ /* Items from the dynamic section. */ - Elf_Addr *got; /* GOT table */ + Elf_Addr *pltgot; /* PLT or GOT, depending on architecture */ const Elf_Rel *rel; /* Relocation entries */ unsigned long relsize; /* Size in bytes of relocation info */ const Elf_Rela *rela; /* Relocation entries with addend */ @@ -132,11 +134,13 @@ extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; * Function declarations. */ int do_copy_relocations(Obj_Entry *); -int reloc_non_plt(Obj_Entry *, Obj_Entry *); -int reloc_plt(Obj_Entry *, bool); unsigned long elf_hash(const char *); const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *, const Obj_Entry **, bool); +void init_pltgot(Obj_Entry *); +int reloc_non_plt(Obj_Entry *, Obj_Entry *); +int reloc_plt(Obj_Entry *, bool); +void _rtld_bind_start(void); const Elf_Sym *symlook_obj(const char *, unsigned long, const Obj_Entry *, bool); |