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]

Re: [patch] Replace the use of FILE_ALIGN in gc routines


On Fri, Jun 08, 2001 at 01:22:02PM -0700, Catherine Moore wrote:
> 
> 	* elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
> 	with the file_align entry from elf_backend_data.
> 	(elf_gc_smash_unused_vtentry_relocs): Likewise.
> 	(elf_gc_record_vtentry): Likewise.

Looks OK to me.

>         size_t n;
>         boolean *cu, *pu;
>   
> +       asection *sec = h->root.u.def.section;
> +       struct elf_backend_data *bed = get_elf_backend_data (sec->owner);
> +       int file_align = bed->s->file_align;
> +       

but this hunk ought to be moved

>         /* Or the parent's entries into ours.  */
>         cu = h->vtable_entries_used;
>         cu[-1] = true;
>         pu = h->vtable_parent->vtable_entries_used;
>         if (pu != NULL)
>   	{

to here

> ! 	  n = h->vtable_parent->vtable_entries_size / file_align;
>   	  while (--n != 0)
>   	    {
>   	      if (*pu) *cu = true;

-- 
Alan Modra


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