Remove the `self' args to _rtld_relocate_objects() and
_rtld_relocate_nonplt_objects().
This commit is contained in:
parent
7d4bbc7f4e
commit
1c495430dd
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: alpha_reloc.c,v 1.21 2002/09/25 07:27:51 mycroft Exp $ */
|
||||
/* $NetBSD: alpha_reloc.c,v 1.22 2002/09/26 20:42:10 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
@ -191,9 +191,8 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
#define COMBRELOC
|
||||
@ -202,9 +201,6 @@ _rtld_relocate_nonplt_objects(obj, self)
|
||||
#endif
|
||||
Elf_Addr target;
|
||||
|
||||
if (self)
|
||||
return 0;
|
||||
|
||||
for (rela = obj->rela; rela < obj->relalim; rela++) {
|
||||
Elf_Addr *where;
|
||||
const Elf_Sym *def;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.18 2002/09/25 07:27:51 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.19 2002/09/26 20:42:11 mycroft Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -68,15 +68,11 @@ store_ptr(void *where, Elf_Addr val)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rel *rel;
|
||||
|
||||
if (self)
|
||||
return 0;
|
||||
|
||||
for (rel = obj->rel; rel < obj->rellim; rel++) {
|
||||
Elf_Addr *where;
|
||||
const Elf_Sym *def;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hppa_reloc.c,v 1.14 2002/09/12 22:56:29 mycroft Exp $ */
|
||||
/* $NetBSD: hppa_reloc.c,v 1.15 2002/09/26 20:42:11 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -321,9 +321,8 @@ _rtld_setup_pltgot(const Obj_Entry *obj)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.16 2002/09/25 07:27:52 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.17 2002/09/26 20:42:11 mycroft Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -44,9 +44,8 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rel *rel;
|
||||
#define COMBRELOC
|
||||
@ -55,9 +54,6 @@ _rtld_relocate_nonplt_objects(obj, self)
|
||||
#endif
|
||||
Elf_Addr target;
|
||||
|
||||
if (self)
|
||||
return 0;
|
||||
|
||||
for (rel = obj->rel; rel < obj->rellim; rel++) {
|
||||
Elf_Addr *where;
|
||||
const Elf_Sym *def;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.14 2002/09/25 07:27:52 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.15 2002/09/26 20:42:11 mycroft Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -44,15 +44,11 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
if (self)
|
||||
return 0;
|
||||
|
||||
for (rela = obj->rela; rela < obj->relalim; rela++) {
|
||||
Elf_Addr *where;
|
||||
const Elf_Sym *def;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ppc_reloc.c,v 1.30 2002/09/26 03:25:29 mycroft Exp $ */
|
||||
/* $NetBSD: ppc_reloc.c,v 1.31 2002/09/26 20:42:11 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1998 Tsubai Masanari
|
||||
@ -113,15 +113,11 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
if (self)
|
||||
return 0;
|
||||
|
||||
for (rela = obj->rela; rela < obj->relalim; rela++) {
|
||||
Elf_Addr *where;
|
||||
const Elf_Sym *def;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.12 2002/09/12 22:56:31 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.13 2002/09/26 20:42:12 mycroft Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -16,9 +16,8 @@ _rtld_setup_pltgot(const Obj_Entry *obj)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.31 2002/09/26 02:51:27 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.32 2002/09/26 20:42:12 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
|
||||
@ -212,15 +212,11 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
if (self)
|
||||
return (0);
|
||||
|
||||
for (rela = obj->rela; rela < obj->relalim; rela++) {
|
||||
Elf_Addr *where;
|
||||
Elf_Word type, value, mask;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.30 2002/09/26 02:25:57 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.31 2002/09/26 20:42:12 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Eduardo Horvath.
|
||||
@ -301,15 +301,11 @@ _rtld_relocate_nonplt_self(dynp, relocbase)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
if (self)
|
||||
return (0);
|
||||
|
||||
for (rela = obj->rela; rela < obj->relalim; rela++) {
|
||||
Elf_Addr *where;
|
||||
Elf_Word type;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.13 2002/09/25 07:27:55 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.14 2002/09/26 20:42:12 mycroft Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -17,9 +17,8 @@ _rtld_setup_pltgot(const Obj_Entry *obj)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mdreloc.c,v 1.18 2002/09/25 08:37:57 mycroft Exp $ */
|
||||
/* $NetBSD: mdreloc.c,v 1.19 2002/09/26 20:42:12 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
@ -92,9 +92,8 @@ _rtld_setup_pltgot(const Obj_Entry *obj)
|
||||
}
|
||||
|
||||
int
|
||||
_rtld_relocate_nonplt_objects(obj, self)
|
||||
_rtld_relocate_nonplt_objects(obj)
|
||||
const Obj_Entry *obj;
|
||||
bool self;
|
||||
{
|
||||
const Elf_Rela *rela;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: reloc.c,v 1.73 2002/09/25 07:27:49 mycroft Exp $ */
|
||||
/* $NetBSD: reloc.c,v 1.74 2002/09/26 20:42:10 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
@ -148,10 +148,9 @@ _rtld_do_copy_relocations(dstobj)
|
||||
* or -1 on failure.
|
||||
*/
|
||||
int
|
||||
_rtld_relocate_objects(first, bind_now, self)
|
||||
_rtld_relocate_objects(first, bind_now)
|
||||
Obj_Entry *first;
|
||||
bool bind_now;
|
||||
bool self;
|
||||
{
|
||||
Obj_Entry *obj;
|
||||
int ok = 1;
|
||||
@ -184,7 +183,7 @@ _rtld_relocate_objects(first, bind_now, self)
|
||||
}
|
||||
}
|
||||
dbg(("doing non-PLT relocations"));
|
||||
if (_rtld_relocate_nonplt_objects(obj, self) < 0)
|
||||
if (_rtld_relocate_nonplt_objects(obj) < 0)
|
||||
ok = 0;
|
||||
if (obj->textrel) { /* Re-protected the text segment. */
|
||||
if (mprotect(obj->mapbase, obj->textsize,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtld.c,v 1.80 2002/09/26 20:35:56 mycroft Exp $ */
|
||||
/* $NetBSD: rtld.c,v 1.81 2002/09/26 20:42:10 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
@ -164,7 +164,7 @@ _rtld_init(mapbase, relocbase)
|
||||
#endif
|
||||
|
||||
#ifdef __vax__
|
||||
_rtld_relocate_nonplt_objects(&_rtld_objself, true);
|
||||
_rtld_relocate_nonplt_objects(&_rtld_objself);
|
||||
#endif
|
||||
|
||||
_rtld_add_paths(&_rtld_default_paths, RTLD_DEFAULT_LIBRARY_PATH);
|
||||
@ -413,7 +413,7 @@ _rtld(sp, relocbase)
|
||||
_rtld_objlist_add(&_rtld_list_main, obj);
|
||||
|
||||
dbg(("relocating objects"));
|
||||
if (_rtld_relocate_objects(_rtld_objmain, bind_now, false) == -1)
|
||||
if (_rtld_relocate_objects(_rtld_objmain, bind_now) == -1)
|
||||
_rtld_die();
|
||||
|
||||
dbg(("doing copy relocations"));
|
||||
@ -626,7 +626,7 @@ _rtld_dlopen(name, mode)
|
||||
if (_rtld_load_needed_objects(obj, mode) == -1 ||
|
||||
(_rtld_init_dag(obj),
|
||||
_rtld_relocate_objects(obj,
|
||||
((mode & 3) == RTLD_NOW), false)) == -1) {
|
||||
((mode & 3) == RTLD_NOW))) == -1) {
|
||||
_rtld_unload_object(obj, false);
|
||||
obj->dl_refcount--;
|
||||
obj = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtld.h,v 1.59 2002/09/25 07:27:50 mycroft Exp $ */
|
||||
/* $NetBSD: rtld.h,v 1.60 2002/09/26 20:42:10 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
@ -241,8 +241,8 @@ void _rtld_process_hints __P((Search_Path **, Library_Xform **, const char *));
|
||||
|
||||
/* reloc.c */
|
||||
int _rtld_do_copy_relocations __P((const Obj_Entry *));
|
||||
int _rtld_relocate_objects __P((Obj_Entry *, bool, bool));
|
||||
int _rtld_relocate_nonplt_objects __P((const Obj_Entry *, bool));
|
||||
int _rtld_relocate_objects __P((Obj_Entry *, bool));
|
||||
int _rtld_relocate_nonplt_objects __P((const Obj_Entry *));
|
||||
int _rtld_relocate_plt_lazy __P((const Obj_Entry *));
|
||||
int _rtld_relocate_plt_objects __P((const Obj_Entry *));
|
||||
void _rtld_setup_pltgot __P((const Obj_Entry *));
|
||||
|
Loading…
Reference in New Issue
Block a user