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] revamp ppc_relax_section in elf32-ppc.c


On Thu, Jul 03, 2003 at 05:36:23PM -0700, Eric Christopher wrote:
> +/* Fake relocation.  */
> +#define R_PPC_RELAX32        251

I prefer to have this in include/elf/ppc.h.

> +      /* We're clearing the bits for R_PPC_ADDR16_HA
> +	 and R_PPC_ADDR16_LO here.  */
> +      t0 &= ~(0xffff >> 16);

Huh?

> +      t1 &= ~(0xffff);

Why the extra parens?

> +
> +      /* t0 is HA, t1 is lo */
> +      t0 |= (((val >> 16) + ((val & 0x8000) ? 1 : 0)) & 0xffff);

Better is
      t0 |= ((val + 0x8000) >> 16) & 0xffff;

> -	  contents = bfd_malloc (isec->_raw_size);
> +      contents = (bfd_byte *) bfd_malloc (isec->_raw_size);

No need for the cast these days.  Otherwise looks OK to install.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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