Subject: Re: -current MIPS ld.elf_so fix/workaround
To: Rafal Boni <rafal@attbi.com>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: tech-toolchain
Date: 04/13/2003 18:21:57
On Sat, Apr 12, 2003 at 06:10:55PM -0400, Rafal Boni wrote:

> the following small patch makes my ld.elf_so behave correctly

I confirm that this patch makes bash/perl do the right thing.

A couple of comments (aside from the SUPPORT_BROKEN_LD define, which provides
support that might not be necessary anymore):

>  		if (ELF_ST_TYPE(sym->st_info) == STT_FUNC &&
> -		    sym->st_value != 0) {
> +		    *got != sym->st_value) {

This bit I understand ...

> +			 * 
> +			 * XXXrkb: this can't be right?!?
>  			 */
> -			*got = sym->st_value + (Elf_Addr)obj->relocbase;
> +			*got += (Elf_Addr)obj->relocbase;

... this is sort of confusing.  Why does this work, oh holy MIPS gurus?

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)