Subject: Re: R_68K_32 relocation with addend on ld.elf_so
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-toolchain
Date: 10/19/1999 12:20:20
In article <199910190300.MAA02746@icnmp9.icg.tnr.sharp.co.jp>,
ITOH Yasufumi <itohy@netbsd.org> wrote:
>
>diff -uF^[a-zA-Z_][a-z 	A-Z0-9_]*(.*[^;]$ libexec/ld.elf_so/reloc.c.orig libexec/ld.elf_so/reloc.c
>--- libexec/ld.elf_so/reloc.c.orig	Mon Aug 23 14:07:24 1999
>+++ libexec/ld.elf_so/reloc.c	Tue Oct 19 01:16:03 1999
>@@ -212,7 +212,8 @@ _rtld_relocate_nonplt_object(obj, rela, 
> 		if (def == NULL)
> 			return -1;
> 
>-		*where += (Elf_Addr)(defobj->relocbase + def->st_value);
>+		*where = (Elf_Addr)(defobj->relocbase + def->st_value +
>+		    rela->r_addend);
> 		rdbg(dodebug, ("32 %s in %s --> %p in %s",
> 		    defobj->strtab + def->st_name, obj->path,
> 		    (void *)*where, defobj->path));


I believe that this will break on the i386 (Not 100% sure since
I have not tried it). I think that we should try it first, and if
it indeed breaks, make the 68k use the one from the vax/alpha section.

christos