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]

PowerPC unwind info for linker generated sections


This adds unwind info for PowerPC linker generated sections.

bfd/
	* elf32-ppc.c: Include dwarf2.h.
	(struct ppc_elf_link_hash_table): Add glink_eh_frame.
	(ppc_elf_create_glink): Create .eh_frame section.
	(glink_eh_frame_cie): New array.
	(ppc_elf_size_dynamic_sections): Size glink_eh_frame.
	(ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
	* elf64-ppc.c: Include dwarg2.h.
	(struct ppc_link_hash_table): Add glink_eh_frame.
	(create_linkage_sections): Create .eh_frame section.
	(ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
	glink_eh_frame.
	(glink_eh_frame_cie): New array.
	(ppc64_elf_size_stubs): Size glink_eh_frame.
	(ppc64_elf_build_stubs): Init glink_eh_frame contents.
	(ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
ld/
	* emulparams/elf32ppc.sh: Source plt_unwind.sh.
	* emulparams/elf64ppc.sh: Likewise.
	* emultempl/ppc32elf.em (OPTION_NO_TLS_OPT): Adjust.
	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
	PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Append to
	existing values.
	* emultempl/ppc64elf.em (OPTION_STUBGROUP_SIZE): Adjust.
	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
	PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Append to
	existing values.
ld/testsuite/
	* ld-powerpc/powerpc.exp: Use --no-ld-generated-unwind-info
	with some tests.
	* ld-powerpc/relbrlt.d: Likewise.

Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.299
diff -u -p -r1.299 elf32-ppc.c
--- bfd/elf32-ppc.c	1 Jul 2011 07:49:07 -0000	1.299
+++ bfd/elf32-ppc.c	26 Jul 2011 01:40:37 -0000
@@ -36,6 +36,7 @@
 #include "elf/ppc.h"
 #include "elf32-ppc.h"
 #include "elf-vxworks.h"
+#include "dwarf2.h"
 
 /* RELA relocations are used here.  */
 
@@ -2679,6 +2680,7 @@ struct ppc_elf_link_hash_table
   asection *relsbss;
   elf_linker_section_t sdata[2];
   asection *sbss;
+  asection *glink_eh_frame;
 
   /* The (unloaded but important) .rela.plt.unloaded on VxWorks.  */
   asection *srelplt2;
@@ -2869,6 +2871,17 @@ ppc_elf_create_glink (bfd *abfd, struct 
       || !bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
 
+  if (!info->no_ld_generated_unwind_info)
+    {
+      flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+      s = bfd_make_section_anyway_with_flags (abfd, ".eh_frame", flags);
+      htab->glink_eh_frame = s;
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s, 2))
+	return FALSE;
+    }
+
   flags = SEC_ALLOC | SEC_LINKER_CREATED;
   s = bfd_make_section_anyway_with_flags (abfd, ".iplt", flags);
   htab->iplt = s;
@@ -5508,6 +5521,20 @@ maybe_set_textrel (struct elf_link_hash_
   return TRUE;
 }
 
+static const unsigned char glink_eh_frame_cie[] =
+{
+  0, 0, 0, 16,				/* length.  */
+  0, 0, 0, 0,				/* id.  */
+  1,					/* CIE version.  */
+  'z', 'R', 0,				/* Augmentation string.  */
+  4,					/* Code alignment.  */
+  0x7c,					/* Data alignment.  */
+  65,					/* RA reg.  */
+  1,					/* Augmentation size.  */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding.  */
+  DW_CFA_def_cfa, 1, 0			/* def_cfa: r1 offset 0.  */
+};
+
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
@@ -5768,6 +5795,21 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	}
     }
 
+  if (htab->glink != NULL
+      && htab->glink->size != 0
+      && htab->glink_eh_frame != NULL
+      && !bfd_is_abs_section (htab->glink_eh_frame->output_section))
+    {
+      s = htab->glink_eh_frame;
+      s->size = sizeof (glink_eh_frame_cie) + 20;
+      if (info->shared)
+	{
+	  s->size += 4;
+	  if (htab->glink->size - GLINK_PLTRESOLVE + 8 >= 256)
+	    s->size += 4;
+	}
+    }
+
   /* We've now determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
   relocs = FALSE;
@@ -5791,6 +5833,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
 	}
       else if (s == htab->iplt
 	       || s == htab->glink
+	       || s == htab->glink_eh_frame
 	       || s == htab->sgotplt
 	       || s == htab->sbss
 	       || s == htab->dynbss
@@ -8915,6 +8958,78 @@ ppc_elf_finish_dynamic_sections (bfd *ou
 	}
     }
 
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->contents != NULL)
+    {
+      unsigned char *p = htab->glink_eh_frame->contents;
+      bfd_vma val;
+
+      memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
+      /* CIE length (rewrite in case little-endian).  */
+      bfd_put_32 (htab->elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
+      p += sizeof (glink_eh_frame_cie);
+      /* FDE length.  */
+      val = htab->glink_eh_frame->size - 4 - sizeof (glink_eh_frame_cie);
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* CIE pointer.  */
+      val = p - htab->glink_eh_frame->contents;
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* Offset to .glink.  */
+      val = (htab->glink->output_section->vma
+	     + htab->glink->output_offset);
+      val -= (htab->glink_eh_frame->output_section->vma
+	      + htab->glink_eh_frame->output_offset);
+      val -= p - htab->glink_eh_frame->contents;
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* .glink size.  */
+      bfd_put_32 (htab->elf.dynobj, htab->glink->size, p);
+      p += 4;
+      /* Augmentation.  */
+      p += 1;
+
+      if (info->shared
+	  && htab->elf.dynamic_sections_created)
+	{
+	  bfd_vma adv = (htab->glink->size - GLINK_PLTRESOLVE + 8) >> 2;
+	  if (adv < 64)
+	    *p++ = DW_CFA_advance_loc + adv;
+	  else if (adv < 256)
+	    {
+	      *p++ = DW_CFA_advance_loc1;
+	      *p++ = adv;
+	    }
+	  else if (adv < 65536)
+	    {
+	      *p++ = DW_CFA_advance_loc2;
+	      bfd_put_16 (htab->elf.dynobj, adv, p);
+	      p += 2;
+	    }
+	  else
+	    {
+	      *p++ = DW_CFA_advance_loc4;
+	      bfd_put_32 (htab->elf.dynobj, adv, p);
+	      p += 4;
+	    }
+	  *p++ = DW_CFA_register;
+	  *p++ = 65;
+	  p++;
+	  *p++ = DW_CFA_advance_loc + 4;
+	  *p++ = DW_CFA_restore_extended;
+	  *p++ = 65;
+	}
+      BFD_ASSERT ((bfd_vma) ((p + 3 - htab->glink_eh_frame->contents) & -4)
+		  == htab->glink_eh_frame->size);
+
+      if (htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+	  && !_bfd_elf_write_section_eh_frame (output_bfd, info,
+					       htab->glink_eh_frame,
+					       htab->glink_eh_frame->contents))
+	return FALSE;
+    }
+
   return ret;
 }
 
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.356
diff -u -p -r1.356 elf64-ppc.c
--- bfd/elf64-ppc.c	14 Jul 2011 03:28:21 -0000	1.356
+++ bfd/elf64-ppc.c	26 Jul 2011 01:40:41 -0000
@@ -34,6 +34,7 @@
 #include "elf-bfd.h"
 #include "elf/ppc64.h"
 #include "elf64-ppc.h"
+#include "dwarf2.h"
 
 static bfd_reloc_status_type ppc64_elf_ha_reloc
   (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@@ -3720,6 +3721,7 @@ struct ppc_link_hash_table
   asection *sfpr;
   asection *brlt;
   asection *relbrlt;
+  asection *glink_eh_frame;
 
   /* Shortcut to .__tls_get_addr and __tls_get_addr.  */
   struct ppc_link_hash_entry *tls_get_addr;
@@ -4170,6 +4172,18 @@ create_linkage_sections (bfd *dynobj, st
       || ! bfd_set_section_alignment (dynobj, htab->glink, 3))
     return FALSE;
 
+  if (!info->no_ld_generated_unwind_info)
+    {
+      flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+      htab->glink_eh_frame = bfd_make_section_anyway_with_flags (dynobj,
+								 ".eh_frame",
+								 flags);
+      if (htab->glink_eh_frame == NULL
+	  || !bfd_set_section_alignment (abfd, htab->glink_eh_frame, 2))
+	return FALSE;
+    }
+
   flags = SEC_ALLOC | SEC_LINKER_CREATED;
   htab->iplt = bfd_make_section_anyway_with_flags (dynobj, ".iplt", flags);
   if (htab->iplt == NULL
@@ -9025,6 +9039,12 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
 	}
+      else if (s == htab->glink_eh_frame)
+	{
+	  if (!bfd_is_abs_section (s->output_section))
+	    /* Not sized yet.  */
+	    continue;
+	}
       else if (CONST_STRNEQ (s->name, ".rela"))
 	{
 	  if (s->size != 0)
@@ -10826,6 +10846,20 @@ group_sections (struct ppc_link_hash_tab
 #undef PREV_SEC
 }
 
+static const unsigned char glink_eh_frame_cie[] =
+{
+  0, 0, 0, 16,				/* length.  */
+  0, 0, 0, 0,				/* id.  */
+  1,					/* CIE version.  */
+  'z', 'R', 0,				/* Augmentation string.  */
+  4,					/* Code alignment.  */
+  0x78,					/* Data alignment.  */
+  65,					/* RA reg.  */
+  1,					/* Augmentation size.  */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding.  */
+  DW_CFA_def_cfa, 1, 0			/* def_cfa: r1 offset 0.  */
+};
+
 /* Determine and set the size of the stub section for a final link.
 
    The basic idea here is to examine all the relocations looking for
@@ -11169,6 +11203,25 @@ ppc64_elf_size_stubs (struct bfd_link_in
 	  htab->glink->flags |= SEC_RELOC;
 	}
 
+      if (htab->glink_eh_frame != NULL
+	  && !bfd_is_abs_section (htab->glink_eh_frame->output_section)
+	  && (htab->glink_eh_frame->flags & SEC_EXCLUDE) == 0)
+	{
+	  bfd_size_type size = 0;
+
+	  for (stub_sec = htab->stub_bfd->sections;
+	       stub_sec != NULL;
+	       stub_sec = stub_sec->next)
+	    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	      size += 20;
+	  if (htab->glink != NULL && htab->glink->size != 0)
+	    size += 24;
+	  if (size != 0)
+	    size += sizeof (glink_eh_frame_cie);
+	  htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
+	  htab->glink_eh_frame->size = size;
+	}
+
       for (stub_sec = htab->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
@@ -11178,7 +11231,9 @@ ppc64_elf_size_stubs (struct bfd_link_in
 
       /* Exit from this loop when no stubs have been added, and no stubs
 	 have changed size.  */
-      if (stub_sec == NULL)
+      if (stub_sec == NULL
+	  && (htab->glink_eh_frame == NULL
+	      || htab->glink_eh_frame->rawsize == htab->glink_eh_frame->size))
 	break;
 
       /* Ask the linker to do its stuff.  */
@@ -11393,6 +11448,100 @@ ppc64_elf_build_stubs (bfd_boolean emit_
 	return FALSE;
     }
 
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->size != 0)
+    {
+      bfd_vma val;
+
+      p = bfd_zalloc (htab->glink_eh_frame->owner, htab->glink_eh_frame->size);
+      if (p == NULL)
+	return FALSE;
+      htab->glink_eh_frame->contents = p;
+
+      htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
+
+      memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
+      /* CIE length (rewrite in case little-endian).  */
+      bfd_put_32 (htab->elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
+      p += sizeof (glink_eh_frame_cie);
+
+      for (stub_sec = htab->stub_bfd->sections;
+	   stub_sec != NULL;
+	   stub_sec = stub_sec->next)
+	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	  {
+	    /* FDE length.  */
+	    bfd_put_32 (htab->elf.dynobj, 16, p);
+	    p += 4;
+	    /* CIE pointer.  */
+	    val = p - htab->glink_eh_frame->contents;
+	    bfd_put_32 (htab->elf.dynobj, val, p);
+	    p += 4;
+	    /* Offset to stub section.  */
+	    val = (stub_sec->output_section->vma
+		   + stub_sec->output_offset);
+	    val -= (htab->glink_eh_frame->output_section->vma
+		    + htab->glink_eh_frame->output_offset);
+	    val -= p - htab->glink_eh_frame->contents;
+	    if (val + 0x80000000 > 0xffffffff)
+	      {
+		info->callbacks->einfo
+		  (_("%s offset too large for .eh_frame sdata4 encoding"),
+		   stub_sec->name);
+		return FALSE;
+	      }
+	    bfd_put_32 (htab->elf.dynobj, val, p);
+	    p += 4;
+	    /* stub section size.  */
+	    bfd_put_32 (htab->elf.dynobj, stub_sec->rawsize, p);
+	    p += 4;
+	    /* Augmentation.  */
+	    p += 1;
+	    /* Pad.  */
+	    p += 3;
+	  }
+      if (htab->glink != NULL && htab->glink->size != 0)
+	{
+	  /* FDE length.  */
+	  bfd_put_32 (htab->elf.dynobj, 20, p);
+	  p += 4;
+	  /* CIE pointer.  */
+	  val = p - htab->glink_eh_frame->contents;
+	  bfd_put_32 (htab->elf.dynobj, val, p);
+	  p += 4;
+	  /* Offset to .glink.  */
+	  val = (htab->glink->output_section->vma
+		 + htab->glink->output_offset
+		 + 8);
+	  val -= (htab->glink_eh_frame->output_section->vma
+		  + htab->glink_eh_frame->output_offset);
+	  val -= p - htab->glink_eh_frame->contents;
+	  if (val + 0x80000000 > 0xffffffff)
+	    {
+	      info->callbacks->einfo
+		(_("%s offset too large for .eh_frame sdata4 encoding"),
+		 htab->glink->name);
+	      return FALSE;
+	    }
+	  bfd_put_32 (htab->elf.dynobj, val, p);
+	  p += 4;
+	  /* .glink size.  */
+	  bfd_put_32 (htab->elf.dynobj, htab->glink->rawsize - 8, p);
+	  p += 4;
+	  /* Augmentation.  */
+	  p += 1;
+
+	  *p++ = DW_CFA_advance_loc + 1;
+	  *p++ = DW_CFA_register;
+	  *p++ = 65;
+	  *p++ = 12;
+	  *p++ = DW_CFA_advance_loc + 4;
+	  *p++ = DW_CFA_restore_extended;
+	  *p++ = 65;
+	}
+      htab->glink_eh_frame->size = p - htab->glink_eh_frame->contents;
+    }
+
   /* Build the stubs as directed by the stub hash table.  */
   bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
 
@@ -11410,7 +11559,9 @@ ppc64_elf_build_stubs (bfd_boolean emit_
       }
 
   if (stub_sec != NULL
-      || htab->glink->rawsize != htab->glink->size)
+      || htab->glink->rawsize != htab->glink->size
+      || (htab->glink_eh_frame != NULL
+	  && htab->glink_eh_frame->rawsize != htab->glink_eh_frame->size))
     {
       htab->stub_error = TRUE;
       info->callbacks->einfo (_("stubs don't match calculated size\n"));
@@ -13559,6 +13710,14 @@ ppc64_elf_finish_dynamic_sections (bfd *
 				       NULL))
     return FALSE;
 
+
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+      && !_bfd_elf_write_section_eh_frame (output_bfd, info,
+					   htab->glink_eh_frame,
+					   htab->glink_eh_frame->contents))
+    return FALSE;
+
   /* We need to handle writing out multiple GOT sections ourselves,
      since we didn't add them to DYNOBJ.  We know dynobj is the first
      bfd.  */
Index: ld/emulparams/elf32ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ppc.sh,v
retrieving revision 1.23
diff -u -p -r1.23 elf32ppc.sh
--- ld/emulparams/elf32ppc.sh	29 Jul 2009 14:59:23 -0000	1.23
+++ ld/emulparams/elf32ppc.sh	25 Jul 2011 15:21:50 -0000
@@ -3,6 +3,7 @@
 # elf32ppcsim.sh
 
 . ${srcdir}/emulparams/elf32ppccommon.sh
+. ${srcdir}/emulparams/plt_unwind.sh
 # Yes, we want duplicate .got and .plt sections.  The linker chooses the
 # appropriate one magically in ppc_after_open
 DATA_GOT=
Index: ld/emulparams/elf64ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ppc.sh,v
retrieving revision 1.22
diff -u -p -r1.22 elf64ppc.sh
--- ld/emulparams/elf64ppc.sh	9 Dec 2009 01:26:03 -0000	1.22
+++ ld/emulparams/elf64ppc.sh	25 Jul 2011 15:21:50 -0000
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
 TEMPLATE_NAME=elf32
 EXTRA_EM_FILE=ppc64elf
 ELFSIZE=64
Index: ld/emultempl/ppc32elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc32elf.em,v
retrieving revision 1.25
diff -u -p -r1.25 ppc32elf.em
--- ld/emultempl/ppc32elf.em	4 Feb 2010 09:16:43 -0000	1.25
+++ ld/emultempl/ppc32elf.em	25 Jul 2011 15:21:50 -0000
@@ -176,8 +176,8 @@ fi
 # Define some shell vars to insert bits of code into the standard elf
 # parse_args and list_options functions.
 #
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_TLS_OPT		301
+PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
+#define OPTION_NO_TLS_OPT		321
 #define OPTION_NO_TLS_GET_ADDR_OPT	(OPTION_NO_TLS_OPT + 1)
 #define OPTION_NEW_PLT			(OPTION_NO_TLS_GET_ADDR_OPT + 1)
 #define OPTION_OLD_PLT			(OPTION_NEW_PLT + 1)
@@ -186,7 +186,7 @@ PARSE_AND_LIST_PROLOGUE='
 #define OPTION_NO_STUBSYMS		(OPTION_STUBSYMS + 1)
 '
 
-PARSE_AND_LIST_LONGOPTS='
+PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
   { "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
   { "no-emit-stub-syms", no_argument, NULL, OPTION_NO_STUBSYMS },
   { "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
@@ -196,7 +196,7 @@ PARSE_AND_LIST_LONGOPTS='
   { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
 '
 
-PARSE_AND_LIST_OPTIONS='
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
   fprintf (file, _("\
   --emit-stub-syms            Label linker stubs with a symbol.\n\
   --no-emit-stub-syms         Don'\''t label linker stubs with a symbol.\n\
@@ -208,7 +208,7 @@ PARSE_AND_LIST_OPTIONS='
 		   ));
 '
 
-PARSE_AND_LIST_ARGS_CASES='
+PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
     case OPTION_STUBSYMS:
       emit_stub_syms = 1;
       break;
Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.74
diff -u -p -r1.74 ppc64elf.em
--- ld/emultempl/ppc64elf.em	14 Jul 2011 03:28:22 -0000	1.74
+++ ld/emultempl/ppc64elf.em	25 Jul 2011 15:21:50 -0000
@@ -652,8 +652,8 @@ fi
 # Define some shell vars to insert bits of code into the standard elf
 # parse_args and list_options functions.
 #
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_STUBGROUP_SIZE		301
+PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
+#define OPTION_STUBGROUP_SIZE		321
 #define OPTION_PLT_STATIC_CHAIN		(OPTION_STUBGROUP_SIZE + 1)
 #define OPTION_NO_PLT_STATIC_CHAIN	(OPTION_PLT_STATIC_CHAIN + 1)
 #define OPTION_STUBSYMS			(OPTION_NO_PLT_STATIC_CHAIN + 1)
@@ -669,7 +669,7 @@ PARSE_AND_LIST_PROLOGUE='
 #define OPTION_NON_OVERLAPPING_OPD	(OPTION_NO_TOC_SORT + 1)
 '
 
-PARSE_AND_LIST_LONGOPTS='
+PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
   { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
   { "plt-static-chain", no_argument, NULL, OPTION_PLT_STATIC_CHAIN },
   { "no-plt-static-chain", no_argument, NULL, OPTION_NO_PLT_STATIC_CHAIN },
@@ -686,7 +686,7 @@ PARSE_AND_LIST_LONGOPTS='
   { "non-overlapping-opd", no_argument, NULL, OPTION_NON_OVERLAPPING_OPD },
 '
 
-PARSE_AND_LIST_OPTIONS='
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
   fprintf (file, _("\
   --stub-group-size=N         Maximum size of a group of input sections that\n\
                                 can be handled by one stub section.  A negative\n\
@@ -742,7 +742,7 @@ PARSE_AND_LIST_OPTIONS='
 		   ));
 '
 
-PARSE_AND_LIST_ARGS_CASES='
+PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
     case OPTION_STUBGROUP_SIZE:
       {
 	const char *end;
Index: ld/testsuite/ld-powerpc/powerpc.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/powerpc.exp,v
retrieving revision 1.34
diff -u -p -r1.34 powerpc.exp
--- ld/testsuite/ld-powerpc/powerpc.exp	11 Jul 2011 12:03:55 -0000	1.34
+++ ld/testsuite/ld-powerpc/powerpc.exp	25 Jul 2011 15:21:52 -0000
@@ -113,11 +113,11 @@ set ppcelftests {
      "tls32"}
     {"TLS32 helper shared library" "-shared -melf32ppc tmpdir/tlslib32.o" "" {}
      {} "libtlslib32.so"}
-    {"TLS32 dynamic exec" "-melf32ppc tmpdir/tls32.o tmpdir/libtlslib32.so" "" {}
+    {"TLS32 dynamic exec" "-melf32ppc --no-ld-generated-unwind-info tmpdir/tls32.o tmpdir/libtlslib32.so" "" {}
      {{readelf -WSsrl tlsexe32.r} {objdump -dr tlsexe32.d}
       {objdump -sj.got tlsexe32.g} {objdump -sj.tdata tlsexe32.t}}
       "tlsexe32"}
-    {"TLS32 shared" "-shared -melf32ppc tmpdir/tls32.o" "" {}
+    {"TLS32 shared" "-shared -melf32ppc --no-ld-generated-unwind-info tmpdir/tls32.o" "" {}
      {{readelf -WSsrl tlsso32.r} {objdump -dr tlsso32.d}
       {objdump -sj.got tlsso32.g} {objdump -sj.tdata tlsso32.t}}
       "tls32.so"}
@@ -156,15 +156,15 @@ set ppc64elftests {
      {} "libtlslib.so"}
     {"TLS helper old shared lib" "-shared -melf64ppc" "-a64" {oldtlslib.s}
      {} "liboldlib.so"}
-    {"TLS dynamic exec" "-melf64ppc tmpdir/tls.o tmpdir/libtlslib.so" "" {}
+    {"TLS dynamic exec" "-melf64ppc --no-ld-generated-unwind-info tmpdir/tls.o tmpdir/libtlslib.so" "" {}
      {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d}
       {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}}
       "tlsexe"}
-    {"TLS dynamic old" "-melf64ppc tmpdir/tls.o tmpdir/liboldlib.so" "" {}
+    {"TLS dynamic old" "-melf64ppc --no-ld-generated-unwind-info tmpdir/tls.o tmpdir/liboldlib.so" "" {}
      {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d}
       {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}}
       "tlsexeold"}
-    {"TLS shared" "-shared -melf64ppc tmpdir/tls.o" "" {}
+    {"TLS shared" "-shared -melf64ppc --no-ld-generated-unwind-info tmpdir/tls.o" "" {}
      {{readelf -WSsrl tlsso.r} {objdump -dr tlsso.d}
       {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}}
       "tls.so"}
@@ -172,17 +172,17 @@ set ppc64elftests {
      {{objdump -dr tlstoc.d} {objdump -sj.got tlstoc.g}
       {objdump -sj.tdata tlstoc.t}}
       "tlstoc"}
-    {"TLSTOC dynamic exec" "-melf64ppc tmpdir/tlstoc.o tmpdir/libtlslib.so"
+    {"TLSTOC dynamic exec" "-melf64ppc --no-ld-generated-unwind-info tmpdir/tlstoc.o tmpdir/libtlslib.so"
      "" {}
      {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d}
       {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}}
       "tlsexetoc"}
-    {"TLSTOC dynamic old" "-melf64ppc tmpdir/tlstoc.o tmpdir/liboldlib.so"
+    {"TLSTOC dynamic old" "-melf64ppc --no-ld-generated-unwind-info tmpdir/tlstoc.o tmpdir/liboldlib.so"
      "" {}
      {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d}
       {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}}
       "tlsexetocold"}
-    {"TLSTOC shared" "-shared -melf64ppc tmpdir/tlstoc.o" "" {}
+    {"TLSTOC shared" "-shared -melf64ppc --no-ld-generated-unwind-info tmpdir/tlstoc.o" "" {}
      {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d}
       {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}}
       "tlstoc.so"}
Index: ld/testsuite/ld-powerpc/relbrlt.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/relbrlt.d,v
retrieving revision 1.5
diff -u -p -r1.5 relbrlt.d
--- ld/testsuite/ld-powerpc/relbrlt.d	1 Mar 2008 06:52:52 -0000	1.5
+++ ld/testsuite/ld-powerpc/relbrlt.d	25 Jul 2011 15:21:52 -0000
@@ -1,6 +1,6 @@
 #source: relbrlt.s
 #as: -a64
-#ld: -melf64ppc --emit-relocs
+#ld: -melf64ppc --no-ld-generated-unwind-info --emit-relocs
 #objdump: -Dr
 
 .*:     file format elf64-powerpc

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