Skip the lazy PLT relocation if relocbase==0 (useful if libraries are loaded

at their VMA address).
This commit is contained in:
mycroft 2002-10-03 20:39:22 +00:00
parent 7a48cdb883
commit 4172074119
7 changed files with 14 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: alpha_reloc.c,v 1.22 2002/09/26 20:42:10 mycroft Exp $ */ /* $NetBSD: alpha_reloc.c,v 1.23 2002/10/03 20:39:22 mycroft Exp $ */
/* /*
* Copyright (c) 2001 Wasabi Systems, Inc. * Copyright (c) 2001 Wasabi Systems, Inc.
@ -292,7 +292,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rela *rela; const Elf_Rela *rela;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) { for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.19 2002/09/26 20:42:11 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.20 2002/10/03 20:39:22 mycroft Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -192,7 +192,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rel *rel; const Elf_Rel *rel;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rel = obj->pltrel; rel < obj->pltrellim; rel++) { for (rel = obj->pltrel; rel < obj->pltrellim; rel++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.17 2002/09/26 20:42:11 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.18 2002/10/03 20:39:22 mycroft Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -159,7 +159,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rel *rel; const Elf_Rel *rel;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rel = obj->pltrel; rel < obj->pltrellim; rel++) { for (rel = obj->pltrel; rel < obj->pltrellim; rel++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.15 2002/09/26 20:42:11 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.16 2002/10/03 20:39:22 mycroft Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -139,7 +139,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rela *rela; const Elf_Rela *rela;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) { for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.13 2002/09/26 20:42:12 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.14 2002/10/03 20:39:23 mycroft Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -136,7 +136,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rela *rela; const Elf_Rela *rela;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) { for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.15 2002/09/26 22:26:27 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.16 2002/10/03 20:39:23 mycroft Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -125,7 +125,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rela *rela; const Elf_Rela *rela;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) { for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.19 2002/09/26 20:42:12 mycroft Exp $ */ /* $NetBSD: mdreloc.c,v 1.20 2002/10/03 20:39:23 mycroft Exp $ */
/* /*
* Copyright (c) 2001 Wasabi Systems, Inc. * Copyright (c) 2001 Wasabi Systems, Inc.
@ -205,7 +205,7 @@ _rtld_relocate_plt_lazy(obj)
{ {
const Elf_Rela *rela; const Elf_Rela *rela;
if (!obj->isdynamic) if (!obj->relocbase)
return 0; return 0;
for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) { for (rela = obj->pltrela; rela < obj->pltrelalim; rela++) {