diff options
| author | tv <tv@NetBSD.org> | 1999-02-25 21:49:04 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 1999-02-25 21:49:04 +0000 |
| commit | 7255b470425873327ed68bcc85a41d24416bee2b (patch) | |
| tree | 306cf3f7ff6678c8aa1d39122b508f5879b4bde2 /libexec | |
| parent | 198f1f5c48cfef5247b4ed50d7229422ad557d4b (diff) | |
Partial fix for Alpha breakage. s/tmp_value/tmp/ in two places, and don't
try to check _rtld_objself when doing R_TYPE(RELATIVE) relocs, as the
Alpha ld.elf_so contains them!
I'm not sure the logic for the RELATIVE fix is quite right; it happens to
Work on alpha, but do we actually need to make sure we aren't relocating
ld.elf_so there?
XXX: I am working on making use of RTLD_RELOCATE_SELF on alpha, which may
make this hack of a fix moot.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.elf_so/reloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libexec/ld.elf_so/reloc.c b/libexec/ld.elf_so/reloc.c index 989a58ddbca..e27fe06764c 100644 --- a/libexec/ld.elf_so/reloc.c +++ b/libexec/ld.elf_so/reloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.11 1999/02/24 18:31:00 christos Exp $ */ +/* $NetBSD: reloc.c,v 1.12 1999/02/25 21:49:04 tv Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -219,8 +219,8 @@ _rtld_relocate_nonplt_object( tmp = (Elf_Addr)(defobj->relocbase + def->st_value) + *where + rela->r_addend; - if (*where != tmp_value) - *where = tmp_value; + if (*where != tmp) + *where = tmp; rdbg(dodebug, "REFQUAD %s in %s --> %p in %s", defobj->strtab + def->st_name, obj->path, (void *)*where, defobj->path); @@ -242,8 +242,7 @@ _rtld_relocate_nonplt_object( break; case R_TYPE(RELATIVE): - if (obj != &_rtld_objself || - (caddr_t)where < (caddr_t)_GLOBAL_OFFSET_TABLE_ || + if ((caddr_t)where < (caddr_t)_GLOBAL_OFFSET_TABLE_ || (caddr_t)where >= (caddr_t)&_DYNAMIC) { *where += (Elf_Addr)obj->relocbase; rdbg(dodebug, "RELATIVE in %s --> %p", obj->path, |
