This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH,SPU] Add new relocation, R_SPU_ADD_PIC
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Trevor_Smigiel at playstation dot sony dot com
- Cc: binutils at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>, andrew_pinski at playstation dot sony dot com
- Date: Thu, 23 Jul 2009 16:39:41 +0930
- Subject: Re: [PATCH,SPU] Add new relocation, R_SPU_ADD_PIC
- References: <20090716220445.GX12536@playstation.sony.com> <20090716220559.GY12536@playstation.sony.com>
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