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] sh64: Fix refcounting for SHmedia


On Thu, Oct 10, 2002 at 04:58:23PM -0700, Clarke, Stephen wrote:
> *************** sh_elf_link_hash_newfunc (entry, table, 
> *** 3456,3462 ****
>         eh->dyn_relocs = NULL;
>         eh->gotplt_refcount = 0;
>   #ifdef INCLUDE_SHMEDIA
> !       ret->datalabel_got_offset = (bfd_vma) -1;
>   #endif
>       }
>   
> --- 3460,3467 ----
>         eh->dyn_relocs = NULL;
>         eh->gotplt_refcount = 0;
>   #ifdef INCLUDE_SHMEDIA
> !       eh->datalabel_got.refcount =
> ! 	((struct elf_link_hash_entry *) ret)->got.refcount;
>   #endif
>       }
>   

You should get rid of "eh" here as "ret" and "eh" have the same type.
Also, avoid a cast by writing

      ret->datalabel_got.refcount = ret->root.got.refcount;

Other than that, the patch looks good to me.

-- 
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]