[PATCH] revamp ppc_relax_section in elf32-ppc.c
Alan Modra
amodra@bigpond.net.au
Wed Jul 9 01:02:00 GMT 2003
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
More information about the Binutils
mailing list