From 6ca1ed37b2d50686eec53efede5623a2da77ec21 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 2 May 2014 04:55:48 +0000 Subject: [PATCH] No need to figure out the area spanned by .got in _dl_md_reloc(); only _dl_md_reloc_boot() needs to compute this. --- libexec/ld.so/mips64/rtld_machine.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/libexec/ld.so/mips64/rtld_machine.c b/libexec/ld.so/mips64/rtld_machine.c index 07801487688..6ac0dc762ff 100644 --- a/libexec/ld.so/mips64/rtld_machine.c +++ b/libexec/ld.so/mips64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.17 2013/06/13 04:13:47 brad Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.18 2014/05/02 04:55:48 miod Exp $ */ /* * Copyright (c) 1998-2004 Opsycon AB, Sweden. @@ -47,7 +47,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) struct load_list *load_list; Elf64_Addr loff; Elf64_Addr ooff; - Elf64_Addr got_start, got_end; Elf64_Rel *relocs; const Elf64_Sym *sym, *this; Elf64_Addr prev_value = 0; @@ -73,21 +72,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) load_list = load_list->next; } - /* XXX We need the got limits to know if reloc is in got. */ - /* XXX Relocs against the got should not include the STUB address! */ - this = NULL; - got_start = 0; - got_end = 0; - ooff = _dl_find_symbol("__got_start", &this, - SYM_SEARCH_OBJ|SYM_NOWARNNOTFOUND|SYM_PLT, NULL, object, NULL); - if (this != NULL) - got_start = ooff + this->st_value; - this = NULL; - ooff = _dl_find_symbol("__got_end", &this, - SYM_SEARCH_OBJ|SYM_NOWARNNOTFOUND|SYM_PLT, NULL, object, NULL); - if (this != NULL) - got_end = ooff + this->st_value; - DL_DEB(("relocating %d\n", numrel)); for (i = 0; i < numrel; i++, relocs++) { Elf64_Addr r_addr = relocs->r_offset + loff; -- 2.20.1