This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Simplify mips16 conversion to even address


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;
  }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]