This is the mail archive of the binutils@sourceware.org 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,SPU] Add new relocation, R_SPU_ADD_PIC


On Thu, Jul 16, 2009 at 03:05:59PM -0700, Trevor_Smigiel@playstation.sony.com wrote:
> @@ -4841,6 +4846,17 @@ spu_elf_relocate_section (bfd *output_bf
>        if (info->relocatable)
>  	continue;
>  
> +      /* Change "a rt,ra,rb" to "ai rt,ra,0" */

      /* Change "a rt,ra,rb" to "ai rt,ra,0".  */

> +      if (r_type == R_SPU_ADD_PIC && h

Style nit.  We normally write h != NULL here.

> +	  && (h->root.type == bfd_link_hash_undefweak
> +	      || h->root.type == bfd_link_hash_undefined))

In your patch rationale, you mentioned dynamic linking support.  If
you'd like to use the right test with dynamic linking in mind, then
write
	  && (h->def_regular || ELF_COMMON_DEF_P (h)))

This change is optional.  Patch OK.

-- 
Alan Modra
Australia Development Lab, IBM


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