From dc962160ec09207e647eeabe59f0cae164e19ffb Mon Sep 17 00:00:00 2001 From: dfr Date: Sun, 18 Oct 1998 19:04:13 +0000 Subject: R_ALPHA_RELATIVE relocations need to add the value to the existing memory contents. --- sys/powerpc/powerpc/elf_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/powerpc') diff --git a/sys/powerpc/powerpc/elf_machdep.c b/sys/powerpc/powerpc/elf_machdep.c index 847ab2a..785e2ed 100644 --- a/sys/powerpc/powerpc/elf_machdep.c +++ b/sys/powerpc/powerpc/elf_machdep.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: elf_machdep.c,v 1.1 1998/09/11 08:47:02 dfr Exp $ + * $Id: elf_machdep.c,v 1.2 1998/10/16 03:54:59 peter Exp $ */ #include @@ -97,7 +97,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) break; case R_ALPHA_RELATIVE: - addr = relocbase + addend; + addr = relocbase + addend + *where; if (*where != addr) *where = addr; break; @@ -112,7 +112,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) default: printf("kldload: unexpected relocation type %d\n", - rtype); + (int) rtype); return -1; } return(0); -- cgit v1.1