summaryrefslogtreecommitdiff
path: root/libexec/ld.so/powerpc/rtld_machine.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-07-12 20:18:31 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-07-12 20:18:31 +0000
commit80402e9cf360236b13306bcaf6d797f76f687dba (patch)
treecd26d9d127539c446450d138a3b7dafe8da253f5 /libexec/ld.so/powerpc/rtld_machine.c
parent5865d6a998391648e294e7a7d4670166fb810364 (diff)
Change ld.so search order/method to match the a.out ld.so.
run destructors on dlclose() Move more symbols into _dl_ private space, so that the proper (libc) version of the function will be used. Add readdir() functionality to perform the proper library searching. Support DL_PRELOAD Do not relocate symbols if ld.so is being traced (and will exit). Misc lint cleanup. ok art@
Diffstat (limited to 'libexec/ld.so/powerpc/rtld_machine.c')
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c
index 999818782f4..fb88fcd70fc 100644
--- a/libexec/ld.so/powerpc/rtld_machine.c
+++ b/libexec/ld.so/powerpc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.11 2002/07/07 08:54:50 jufi Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.12 2002/07/12 20:18:30 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -81,6 +81,9 @@ _dl_printf("object relocation size %x, numrela %x\n",
if (relas == NULL)
return(0);
+ pltcall = NULL;
+ plttable = NULL;
+
/* for plt relocation usage */
if (object->Dyn.info[DT_JMPREL] != 0) {
/* resolver stub not set up */
@@ -145,6 +148,8 @@ _dl_printf("object relocation size %x, numrela %x\n",
this = sym;
symn = object->dyn.strtab + sym->st_name;
+ ooff = 0;
+
if (ELF32_R_SYM(relas->r_info) &&
!(ELF32_ST_BIND(sym->st_info) == STB_LOCAL &&
ELF32_ST_TYPE (sym->st_info) == STT_NOTYPE)) {
@@ -344,6 +349,8 @@ _dl_dcbf(r_addr);
const Elf32_Sym *cpysrc = NULL;
Elf32_Addr src_loff;
int size;
+
+ src_loff = 0;
for (cobj = _dl_objects; cobj != NULL && cpysrc == NULL;
cobj = cobj->next) {
if (object != cobj) {