This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Simplify mips16 conversion to even address
- From: Fred Fish <fnf at ninemoons dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>, fnf at redhat dot com
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 5 Mar 2004 16:52:40 -0700
- Subject: Re: [PATCH] Simplify mips16 conversion to even address
- References: <200403042153.58621.fnf@ninemoons.com> <20040305050432.GC23422@bubble.modra.org>
- Reply-to: fnf at ninemoons dot com
On Thursday 04 March 2004 22:04, Alan Modra wrote:
> OK.
Committed the patch, with a fix for another instance of the same issue.
Patch attached.
-Fred
2004-03-05 Fred Fish <fnf@redhat.com>
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
mips16 symbols to be even rather than testing first for even/odd.
(_bfd_mips_elf_link_output_symbol_hook): Ditto.
Index: elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.90
diff -c -p -r1.90 elfxx-mips.c
*** elfxx-mips.c 17 Feb 2004 10:19:23 -0000 1.90
--- elfxx-mips.c 5 Mar 2004 23:47:25 -0000
***************
*** 1,6 ****
/* MIPS-specific support for ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
! 2003 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
--- 1,6 ----
/* MIPS-specific support for ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
! 2003, 2004 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
*************** _bfd_mips_elf_link_output_symbol_hook
*** 4891,4899 ****
&& strcmp (input_sec->name, ".scommon") == 0)
sym->st_shndx = SHN_MIPS_SCOMMON;
! if (sym->st_other == STO_MIPS16
! && (sym->st_value & 1) != 0)
! --sym->st_value;
return TRUE;
}
--- 4891,4898 ----
&& strcmp (input_sec->name, ".scommon") == 0)
sym->st_shndx = SHN_MIPS_SCOMMON;
! if (sym->st_other == STO_MIPS16)
! sym->st_value &= ~1;
return TRUE;
}
*************** _bfd_mips_elf_finish_dynamic_symbol (bfd
*** 6814,6822 ****
}
/* If this is a mips16 symbol, force the value to be even. */
! if (sym->st_other == STO_MIPS16
! && (sym->st_value & 1) != 0)
! --sym->st_value;
return TRUE;
}
--- 6813,6820 ----
}
/* If this is a mips16 symbol, force the value to be even. */
! if (sym->st_other == STO_MIPS16)
! sym->st_value &= ~1;
return TRUE;
}