From bde7a965da1465507d9598f85035682b69cfcca8 Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 26 Sep 2002 01:59:16 +0000 Subject: [PATCH] Tweak the save instruction in the PLT stub rather than adding an instruction to the binder entry stub... --- libexec/ld.elf_so/arch/sparc/mdreloc.c | 6 +++--- libexec/ld.elf_so/arch/sparc/rtld_start.S | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libexec/ld.elf_so/arch/sparc/mdreloc.c b/libexec/ld.elf_so/arch/sparc/mdreloc.c index bc87a5428b24..965d152f4da8 100644 --- a/libexec/ld.elf_so/arch/sparc/mdreloc.c +++ b/libexec/ld.elf_so/arch/sparc/mdreloc.c @@ -1,11 +1,11 @@ -/* $NetBSD: mdreloc.c,v 1.28 2002/09/25 22:33:54 mycroft Exp $ */ +/* $NetBSD: mdreloc.c,v 1.29 2002/09/26 01:59:16 mycroft Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. + * by Paul Kranenburg and by Charles M. Hannum. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -175,7 +175,7 @@ _rtld_setup_pltgot(const Obj_Entry *obj) * The second entry holds the object identification. * Note: each PLT entry is three words long. */ -#define SAVE 0x9de3bfc0 /* i.e. `save %sp,-64,%sp' */ +#define SAVE 0x9de3bfa8 /* i.e. `save %sp,-88,%sp' */ #define CALL 0x40000000 #define NOP 0x01000000 obj->pltgot[0] = SAVE; diff --git a/libexec/ld.elf_so/arch/sparc/rtld_start.S b/libexec/ld.elf_so/arch/sparc/rtld_start.S index 9f75b6f7273c..b6d13bda9930 100644 --- a/libexec/ld.elf_so/arch/sparc/rtld_start.S +++ b/libexec/ld.elf_so/arch/sparc/rtld_start.S @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.11 2002/09/26 01:54:52 mycroft Exp $ */ +/* $NetBSD: rtld_start.S,v 1.12 2002/09/26 01:59:16 mycroft Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -80,7 +80,6 @@ _rtld_start: .global _rtld_bind_start .type _rtld_bind_start,@function _rtld_bind_start: # (obj, reloff) - sub %sp, 24, %sp ld [%o7 + 8], %o0 /* obj id is in second PLT slot */ srl %g1, 10, %o1 /* offset is in high 22 bits */ call _rtld_bind /* Call _rtld_bind(obj, offset) */