Blame SOURCES/gdb-rhbz1125820-ppc64le-enablement-13of37.patch

01917d
commit a345bc8d317a159e3e887632d80c5a8282d34f07
01917d
Author: Alan Modra <amodra@gmail.com>
01917d
Date:   Fri Nov 1 19:24:20 2013 +1030
01917d
01917d
    PowerPC64 ELFv2 symbols defined in plt
01917d
    
01917d
    In a non-pic executable, ELFv2 like other targets, needs to emit a plt
01917d
    entry even for non-call references to functions defined in shared
01917d
    libraries, and define the function on the plt code.
01917d
    
01917d
    	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Copy
01917d
    	pointer_equality_needed flag.
01917d
    	(ppc64_elf_check_relocs): For ELFv2 arrange to emit plt
01917d
    	entries for references to functions in shared libraries on
01917d
    	non-call relocs.
01917d
    	(readonly_dynrelocs): Split into function of the same name and..
01917d
    	(maybe_set_textrel): ..this new function.  Update call.
01917d
    	(ppc64_elf_adjust_dynamic_symbol): Don't emit dynrelocs for
01917d
    	ELFv2 in most cases if we have a plt entry.  Use new
01917d
    	readonly_relocs.
01917d
    	(allocate_dynrelocs): For ELFv2, don't allocate dynreloc space
01917d
    	for ifunc in static executables.
01917d
    	(size_global_entry_stubs): New function.
01917d
    	(ppc64_elf_size_dynamic_sections): Call size_global_entry_stubs.
01917d
    	Save end of glink branch table.
01917d
    	(ppc64_elf_hash_symbol): New function.
01917d
    	(build_global_entry_stubs): New function.
01917d
    	(ppc64_elf_build_stubs): Call build_global_entry_stubs.  Adjust
01917d
    	glink sizing.
01917d
    	(ppc64_elf_relocate_section): Tidy plt16/32/64 reloc code.
01917d
    	(ppc64_elf_finish_dynamic_symbol): For ELFv2, adjust symbols
01917d
    	defined on plt code.
01917d
01917d
Index: gdb-7.6.1/bfd/elf64-ppc.c
01917d
===================================================================
01917d
--- gdb-7.6.1.orig/bfd/elf64-ppc.c
01917d
+++ gdb-7.6.1/bfd/elf64-ppc.c
01917d
@@ -109,6 +109,7 @@ static bfd_vma opd_entry_value
01917d
 #define elf_backend_maybe_function_sym	      ppc64_elf_maybe_function_sym
01917d
 #define elf_backend_always_size_sections      ppc64_elf_func_desc_adjust
01917d
 #define elf_backend_size_dynamic_sections     ppc64_elf_size_dynamic_sections
01917d
+#define elf_backend_hash_symbol		      ppc64_elf_hash_symbol
01917d
 #define elf_backend_init_index_section	      _bfd_elf_init_2_index_sections
01917d
 #define elf_backend_action_discarded	      ppc64_elf_action_discarded
01917d
 #define elf_backend_relocate_section	      ppc64_elf_relocate_section
01917d
@@ -174,6 +175,9 @@ static bfd_vma opd_entry_value
01917d
 
01917d
 #define LD_R2_0R1	0xe8410000	/* ld    %r2,0(%r1)      */
01917d
 
01917d
+#define ADDIS_R12_R12	0x3d8c0000	/* addis %r12,%r12,xxx@ha */
01917d
+#define LD_R12_0R12	0xe98c0000	/* ld    %r12,xxx@l(%r12) */
01917d
+
01917d
 /* glink call stub instructions.  We enter with the index in R0.  */
01917d
 #define GLINK_CALL_STUB_SIZE (16*4)
01917d
 					/* 0:				*/
01917d
@@ -4502,6 +4506,7 @@ ppc64_elf_copy_indirect_symbol (struct b
01917d
   edir->elf.ref_regular |= eind->elf.ref_regular;
01917d
   edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
01917d
   edir->elf.needs_plt |= eind->elf.needs_plt;
01917d
+  edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
01917d
 
01917d
   /* Copy over any dynamic relocs we may have on the indirect sym.  */
01917d
   if (eind->dyn_relocs != NULL)
01917d
@@ -5219,6 +5224,14 @@ ppc64_elf_check_relocs (bfd *abfd, struc
01917d
 	    if (!update_local_sym_info (abfd, symtab_hdr, r_symndx,
01917d
 					rel->r_addend, tls_type))
01917d
 	      return FALSE;
01917d
+
01917d
+	  /* We may also need a plt entry if the symbol turns out to be
01917d
+	     an ifunc.  */
01917d
+	  if (h != NULL && !info->shared && abiversion (abfd) == 2)
01917d
+	    {
01917d
+	      if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend))
01917d
+		return FALSE;
01917d
+	    }
01917d
 	  break;
01917d
 
01917d
 	case R_PPC64_PLT16_HA:
01917d
@@ -5467,12 +5480,6 @@ ppc64_elf_check_relocs (bfd *abfd, struc
01917d
 	    }
01917d
 	  /* Fall through.  */
01917d
 
01917d
-	case R_PPC64_REL30:
01917d
-	case R_PPC64_REL32:
01917d
-	case R_PPC64_REL64:
01917d
-	case R_PPC64_ADDR14:
01917d
-	case R_PPC64_ADDR14_BRNTAKEN:
01917d
-	case R_PPC64_ADDR14_BRTAKEN:
01917d
 	case R_PPC64_ADDR16:
01917d
 	case R_PPC64_ADDR16_DS:
01917d
 	case R_PPC64_ADDR16_HA:
01917d
@@ -5483,6 +5490,23 @@ ppc64_elf_check_relocs (bfd *abfd, struc
01917d
 	case R_PPC64_ADDR16_HIGHESTA:
01917d
 	case R_PPC64_ADDR16_LO:
01917d
 	case R_PPC64_ADDR16_LO_DS:
01917d
+	  if (h != NULL && !info->shared && abiversion (abfd) == 2
01917d
+	      && rel->r_addend == 0)
01917d
+	    {
01917d
+	      /* We may need a .plt entry if this reloc refers to a
01917d
+		 function in a shared lib.  */
01917d
+	      if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend))
01917d
+		return FALSE;
01917d
+	      h->pointer_equality_needed = 1;
01917d
+	    }
01917d
+	  /* Fall through.  */
01917d
+
01917d
+	case R_PPC64_REL30:
01917d
+	case R_PPC64_REL32:
01917d
+	case R_PPC64_REL64:
01917d
+	case R_PPC64_ADDR14:
01917d
+	case R_PPC64_ADDR14_BRNTAKEN:
01917d
+	case R_PPC64_ADDR14_BRTAKEN:
01917d
 	case R_PPC64_ADDR24:
01917d
 	case R_PPC64_ADDR32:
01917d
 	case R_PPC64_UADDR16:
01917d
@@ -6667,6 +6691,25 @@ ppc64_elf_func_desc_adjust (bfd *obfd AT
01917d
   return TRUE;
01917d
 }
01917d
 
01917d
+/* Return true if we have dynamic relocs that apply to read-only sections.  */
01917d
+
01917d
+static bfd_boolean
01917d
+readonly_dynrelocs (struct elf_link_hash_entry *h)
01917d
+{
01917d
+  struct ppc_link_hash_entry *eh;
01917d
+  struct elf_dyn_relocs *p;
01917d
+
01917d
+  eh = (struct ppc_link_hash_entry *) h;
01917d
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
01917d
+    {
01917d
+      asection *s = p->sec->output_section;
01917d
+
01917d
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
01917d
+	return TRUE;
01917d
+    }
01917d
+  return FALSE;
01917d
+}
01917d
+
01917d
 /* Adjust a symbol defined by a dynamic object and referenced by a
01917d
    regular object.  The current definition is in some section of the
01917d
    dynamic object, but we're not including those sections.  We have to
01917d
@@ -6704,6 +6747,26 @@ ppc64_elf_adjust_dynamic_symbol (struct
01917d
 	  h->plt.plist = NULL;
01917d
 	  h->needs_plt = 0;
01917d
 	}
01917d
+      else if (abiversion (info->output_bfd) == 2)
01917d
+	{
01917d
+	  /* After adjust_dynamic_symbol, non_got_ref set in the
01917d
+	     non-shared case means that we have allocated space in
01917d
+	     .dynbss for the symbol and thus dyn_relocs for this
01917d
+	     symbol should be discarded.
01917d
+	     If we get here we know we are making a PLT entry for this
01917d
+	     symbol, and in an executable we'd normally resolve
01917d
+	     relocations against this symbol to the PLT entry.  Allow
01917d
+	     dynamic relocs if the reference is weak, and the dynamic
01917d
+	     relocs will not cause text relocation.  */
01917d
+	  if (!h->ref_regular_nonweak
01917d
+	      && h->non_got_ref
01917d
+	      && h->type != STT_GNU_IFUNC
01917d
+	      && !readonly_dynrelocs (h))
01917d
+	    h->non_got_ref = 0;
01917d
+
01917d
+	  /* If making a plt entry, then we don't need copy relocs.  */
01917d
+	  return TRUE;
01917d
+	}
01917d
     }
01917d
   else
01917d
     h->plt.plist = NULL;
01917d
@@ -6738,26 +6801,12 @@ ppc64_elf_adjust_dynamic_symbol (struct
01917d
   if (!h->def_dynamic || !h->ref_regular || h->def_regular)
01917d
     return TRUE;
01917d
 
01917d
-  if (ELIMINATE_COPY_RELOCS)
01917d
+  /* If we didn't find any dynamic relocs in read-only sections, then
01917d
+     we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
01917d
+  if (ELIMINATE_COPY_RELOCS && !readonly_dynrelocs (h))
01917d
     {
01917d
-      struct ppc_link_hash_entry * eh;
01917d
-      struct elf_dyn_relocs *p;
01917d
-
01917d
-      eh = (struct ppc_link_hash_entry *) h;
01917d
-      for (p = eh->dyn_relocs; p != NULL; p = p->next)
01917d
-	{
01917d
-	  s = p->sec->output_section;
01917d
-	  if (s != NULL && (s->flags & SEC_READONLY) != 0)
01917d
-	    break;
01917d
-	}
01917d
-
01917d
-      /* If we didn't find any dynamic relocs in read-only sections, then
01917d
-	 we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
01917d
-      if (p == NULL)
01917d
-	{
01917d
-	  h->non_got_ref = 0;
01917d
-	  return TRUE;
01917d
-	}
01917d
+      h->non_got_ref = 0;
01917d
+      return TRUE;
01917d
     }
01917d
 
01917d
   if (h->plt.plist != NULL)
01917d
@@ -9167,7 +9216,8 @@ allocate_dynrelocs (struct elf_link_hash
01917d
 
01917d
   if (eh->dyn_relocs == NULL
01917d
       || (!htab->elf.dynamic_sections_created
01917d
-	  && h->type != STT_GNU_IFUNC))
01917d
+	  && (h->type != STT_GNU_IFUNC
01917d
+	      || !htab->opd_abi)))
01917d
     return TRUE;
01917d
 
01917d
   /* In the shared -Bsymbolic case, discard space allocated for
01917d
@@ -9263,28 +9313,59 @@ allocate_dynrelocs (struct elf_link_hash
01917d
   return TRUE;
01917d
 }
01917d
 
01917d
-/* Find any dynamic relocs that apply to read-only sections.  */
01917d
+/* Called via elf_link_hash_traverse from ppc64_elf_size_dynamic_sections
01917d
+   to set up space for global entry stubs.  These are put in glink,
01917d
+   after the branch table.  */
01917d
 
01917d
 static bfd_boolean
01917d
-readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
01917d
+size_global_entry_stubs (struct elf_link_hash_entry *h, void *inf)
01917d
 {
01917d
-  struct ppc_link_hash_entry *eh;
01917d
-  struct elf_dyn_relocs *p;
01917d
+  struct bfd_link_info *info;
01917d
+  struct ppc_link_hash_table *htab;
01917d
+  struct plt_entry *pent;
01917d
+  asection *s;
01917d
 
01917d
-  eh = (struct ppc_link_hash_entry *) h;
01917d
-  for (p = eh->dyn_relocs; p != NULL; p = p->next)
01917d
-    {
01917d
-      asection *s = p->sec->output_section;
01917d
+  if (h->root.type == bfd_link_hash_indirect)
01917d
+    return TRUE;
01917d
 
01917d
-      if (s != NULL && (s->flags & SEC_READONLY) != 0)
01917d
-	{
01917d
-	  struct bfd_link_info *info = inf;
01917d
+  if (!h->pointer_equality_needed)
01917d
+    return TRUE;
01917d
 
01917d
-	  info->flags |= DF_TEXTREL;
01917d
+  if (h->def_regular)
01917d
+    return TRUE;
01917d
 
01917d
-	  /* Not an error, just cut short the traversal.  */
01917d
-	  return FALSE;
01917d
-	}
01917d
+  info = inf;
01917d
+  htab = ppc_hash_table (info);
01917d
+  if (htab == NULL)
01917d
+    return FALSE;
01917d
+
01917d
+  s = htab->glink;
01917d
+  for (pent = h->plt.plist; pent != NULL; pent = pent->next)
01917d
+    if (pent->plt.offset != (bfd_vma) -1
01917d
+	&& pent->addend == 0)
01917d
+      {
01917d
+	s->size = (s->size + 15) & -16;
01917d
+	s->size += 16;
01917d
+	break;
01917d
+      }
01917d
+  return TRUE;
01917d
+}
01917d
+
01917d
+/* Set DF_TEXTREL if we find any dynamic relocs that apply to
01917d
+   read-only sections.  */
01917d
+
01917d
+static bfd_boolean
01917d
+maybe_set_textrel (struct elf_link_hash_entry *h, void *info)
01917d
+{
01917d
+  if (h->root.type == bfd_link_hash_indirect)
01917d
+    return TRUE;
01917d
+
01917d
+  if (readonly_dynrelocs (h))
01917d
+    {
01917d
+      ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
01917d
+
01917d
+      /* Not an error, just cut short the traversal.  */
01917d
+      return FALSE;
01917d
     }
01917d
   return TRUE;
01917d
 }
01917d
@@ -9435,6 +9516,12 @@ ppc64_elf_size_dynamic_sections (bfd *ou
01917d
   /* Allocate global sym .plt and .got entries, and space for global
01917d
      sym dynamic relocs.  */
01917d
   elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
01917d
+  /* Stash the end of glink branch table.  */
01917d
+  if (htab->glink != NULL)
01917d
+    htab->glink->rawsize = htab->glink->size;
01917d
+
01917d
+  if (!htab->opd_abi && !info->shared)
01917d
+    elf_link_hash_traverse (&htab->elf, size_global_entry_stubs, info);
01917d
 
01917d
   first_tlsld = NULL;
01917d
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
01917d
@@ -9632,7 +9719,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
01917d
 	  /* If any dynamic relocs apply to a read-only section,
01917d
 	     then we need a DT_TEXTREL entry.  */
01917d
 	  if ((info->flags & DF_TEXTREL) == 0)
01917d
-	    elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
01917d
+	    elf_link_hash_traverse (&htab->elf, maybe_set_textrel, info);
01917d
 
01917d
 	  if ((info->flags & DF_TEXTREL) != 0)
01917d
 	    {
01917d
@@ -9646,6 +9733,19 @@ ppc64_elf_size_dynamic_sections (bfd *ou
01917d
   return TRUE;
01917d
 }
01917d
 
01917d
+/* Return TRUE if symbol should be hashed in the `.gnu.hash' section.  */
01917d
+
01917d
+static bfd_boolean
01917d
+ppc64_elf_hash_symbol (struct elf_link_hash_entry *h)
01917d
+{
01917d
+  if (h->plt.plist != NULL
01917d
+      && !h->def_regular
01917d
+      && !h->pointer_equality_needed)
01917d
+    return FALSE;
01917d
+
01917d
+  return _bfd_elf_hash_symbol (h);
01917d
+}
01917d
+
01917d
 /* Determine the type of stub needed, if any, for a call.  */
01917d
 
01917d
 static inline enum ppc_stub_type
01917d
@@ -12049,6 +12149,79 @@ ppc64_elf_toc (bfd *obfd)
01917d
   return TOCstart;
01917d
 }
01917d
 
01917d
+/* Called via elf_link_hash_traverse from ppc64_elf_build_stubs to
01917d
+   write out any global entry stubs.  */
01917d
+
01917d
+static bfd_boolean
01917d
+build_global_entry_stubs (struct elf_link_hash_entry *h, void *inf)
01917d
+{
01917d
+  struct bfd_link_info *info;
01917d
+  struct ppc_link_hash_table *htab;
01917d
+  struct plt_entry *pent;
01917d
+  asection *s;
01917d
+
01917d
+  if (h->root.type == bfd_link_hash_indirect)
01917d
+    return TRUE;
01917d
+
01917d
+  if (!h->pointer_equality_needed)
01917d
+    return TRUE;
01917d
+
01917d
+  if (h->def_regular)
01917d
+    return TRUE;
01917d
+
01917d
+  info = inf;
01917d
+  htab = ppc_hash_table (info);
01917d
+  if (htab == NULL)
01917d
+    return FALSE;
01917d
+
01917d
+  s = htab->glink;
01917d
+  for (pent = h->plt.plist; pent != NULL; pent = pent->next)
01917d
+    if (pent->plt.offset != (bfd_vma) -1
01917d
+	&& pent->addend == 0)
01917d
+      {
01917d
+	bfd_byte *p;
01917d
+	asection *plt;
01917d
+	bfd_vma off;
01917d
+
01917d
+	/* For ELFv2, if this symbol is not defined in a regular file
01917d
+	   and we are not generating a shared library or pie, then we
01917d
+	   need to define the symbol in the executable on a call stub.
01917d
+	   This is to avoid text relocations.  */
01917d
+	h->root.u.def.section = s;
01917d
+	h->root.u.def.value = s->size;
01917d
+	s->size += 16;
01917d
+	p = s->contents + h->root.u.def.value;
01917d
+	plt = htab->plt;
01917d
+	if (!htab->elf.dynamic_sections_created
01917d
+	    || h->dynindx == -1)
01917d
+	  plt = htab->iplt;
01917d
+	off = pent->plt.offset + plt->output_offset + plt->output_section->vma;
01917d
+	off -= h->root.u.def.value + s->output_offset + s->output_section->vma;
01917d
+
01917d
+	if (off + 0x80008000 > 0xffffffff || (off & 3) != 0)
01917d
+	  {
01917d
+	    info->callbacks->einfo
01917d
+	      (_("%P: linkage table error against `%T'\n"),
01917d
+	       h->root.root.string);
01917d
+	    bfd_set_error (bfd_error_bad_value);
01917d
+	    htab->stub_error = TRUE;
01917d
+	  }
01917d
+
01917d
+	if (PPC_HA (off) != 0)
01917d
+	  {
01917d
+	    bfd_put_32 (s->owner, ADDIS_R12_R12 | PPC_HA (off), p);
01917d
+	    p += 4;
01917d
+	  }
01917d
+	bfd_put_32 (s->owner, LD_R12_0R12 | PPC_LO (off), p);
01917d
+	p += 4;
01917d
+	bfd_put_32 (s->owner, MTCTR_R12, p);
01917d
+	p += 4;
01917d
+	bfd_put_32 (s->owner, BCTR, p);
01917d
+	break;
01917d
+      }
01917d
+  return TRUE;
01917d
+}
01917d
+
01917d
 /* Build all the stubs associated with the current output file.
01917d
    The stubs are kept in a hash table attached to the main linker
01917d
    hash table.  This function is called via gldelf64ppc_finish.  */
01917d
@@ -12184,7 +12357,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_
01917d
 
01917d
       /* Build the .glink lazy link call stubs.  */
01917d
       indx = 0;
01917d
-      while (p < htab->glink->contents + htab->glink->size)
01917d
+      while (p < htab->glink->contents + htab->glink->rawsize)
01917d
 	{
01917d
 	  if (htab->opd_abi)
01917d
 	    {
01917d
@@ -12207,7 +12380,13 @@ ppc64_elf_build_stubs (bfd_boolean emit_
01917d
 	  indx++;
01917d
 	  p += 4;
01917d
 	}
01917d
-      htab->glink->rawsize = p - htab->glink->contents;
01917d
+
01917d
+      /* Build .glink global entry stubs.  */
01917d
+      if (htab->glink->size > htab->glink->rawsize)
01917d
+	{
01917d
+	  htab->glink->size = (htab->glink->rawsize + 15) & -16;
01917d
+	  elf_link_hash_traverse (&htab->elf, build_global_entry_stubs, info);
01917d
+	}
01917d
     }
01917d
 
01917d
   if (htab->brlt->size != 0)
01917d
@@ -12311,7 +12490,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_
01917d
 	  bfd_put_32 (htab->elf.dynobj, val, p);
01917d
 	  p += 4;
01917d
 	  /* .glink size.  */
01917d
-	  bfd_put_32 (htab->elf.dynobj, htab->glink->rawsize - 8, p);
01917d
+	  bfd_put_32 (htab->elf.dynobj, htab->glink->size - 8, p);
01917d
 	  p += 4;
01917d
 	  /* Augmentation.  */
01917d
 	  p += 1;
01917d
@@ -12361,7 +12540,6 @@ ppc64_elf_build_stubs (bfd_boolean emit_
01917d
       }
01917d
 
01917d
   if (stub_sec != NULL
01917d
-      || htab->glink->rawsize != htab->glink->size
01917d
       || (htab->glink_eh_frame != NULL
01917d
 	  && htab->glink_eh_frame->rawsize != htab->glink_eh_frame->size))
01917d
     {
01917d
@@ -13588,13 +13766,14 @@ ppc64_elf_relocate_section (bfd *output_
01917d
 	    {
01917d
 	      struct plt_entry *ent;
01917d
 	      for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
01917d
-		if (ent->addend == orig_rel.r_addend
01917d
-		    && ent->plt.offset != (bfd_vma) -1)
01917d
+		if (ent->plt.offset != (bfd_vma) -1
01917d
+		    && ent->addend == orig_rel.r_addend)
01917d
 		  {
01917d
 		    relocation = (htab->plt->output_section->vma
01917d
 				  + htab->plt->output_offset
01917d
 				  + ent->plt.offset);
01917d
 		    unresolved_reloc = FALSE;
01917d
+		    break;
01917d
 		  }
01917d
 	    }
01917d
 	  break;
01917d
@@ -14297,6 +14476,30 @@ ppc64_elf_finish_dynamic_symbol (bfd *ou
01917d
 		      / PLT_ENTRY_SIZE (htab) * sizeof (Elf64_External_Rela)));
01917d
 	  }
01917d
 	bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
01917d
+
01917d
+	if (!htab->opd_abi)
01917d
+	  {
01917d
+	    if (!h->def_regular)
01917d
+	      {
01917d
+		/* Mark the symbol as undefined, rather than as
01917d
+		   defined in glink.  Leave the value if there were
01917d
+		   any relocations where pointer equality matters
01917d
+		   (this is a clue for the dynamic linker, to make
01917d
+		   function pointer comparisons work between an
01917d
+		   application and shared library), otherwise set it
01917d
+		   to zero.  */
01917d
+		sym->st_shndx = SHN_UNDEF;
01917d
+		if (!h->pointer_equality_needed)
01917d
+		  sym->st_value = 0;
01917d
+		else if (!h->ref_regular_nonweak)
01917d
+		  {
01917d
+		    /* This breaks function pointer comparisons, but
01917d
+		       that is better than breaking tests for a NULL
01917d
+		       function pointer.  */
01917d
+		    sym->st_value = 0;
01917d
+		  }
01917d
+	      }
01917d
+	  }
01917d
       }
01917d
 
01917d
   if (h->needs_copy)