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]

multiple GOT sections for powerpc64


Implements multiple GOT sections for ppc64, so I don't need to hack the
ppc64 gcc tls support to use the TOC.  Seemed like a neat thing to have
too..

Implementing got entry counting, allocation and writing was easy since
we already had support for multiple got entries on the same sym.  It's
also relatively straight-forward to create and manage .got and .rela.got
sections per input file.  However, making .toc and .got sections play
together nicely was a bit tricky.  For starters, output of .toc and .got
needs to be grouped by input file, so there's a linker script change
for this.  Secondly, the .got has a reserved entry, which must come
before any other .got or .toc entries.  Attaching the .got section
containing the reserved entry to a fake bfd opened before all other
input bfd's made this possible without a special section name.  Since we
already had a fake bfd for stubs, the same bfd does for both.  Finally,
combreloc support needed to find .rela.dyn input sections the right way,
via link_orders, rather than assuming they all came from dynobj.

I'll commit this tomorrow morning, after looking it over when I'm
fresh..

bfd/ChangeLog
	* elf64-ppc.c (bfd_elf64_mkobject): Define.
	(struct ppc64_elf_obj_tdata): New.
	(ppc64_elf_tdata, ppc64_tlsld_got): Define.
	(ppc64_elf_mkobject): New function.
	(struct got_entry): Add "owner".  Move "tls_type".
	(struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
	(ppc64_elf_init_stub_bfd): New function.
	(create_got_section): Create header .got in dynobj.  Create .got
	and .rela.got in each bfd.  Stash pointers in ppc64_elf_obj_tdata.
	(ppc64_elf_create_dynamic_sections): Don't call create_got_section.
	Look for dynobj .got, and test it.
	(ppc64_elf_copy_indirect_symbol): Adjust for changed got.
	(update_local_sym_info): Likewise.
	(ppc64_elf_check_relocs): Likewise.
	(ppc64_elf_gc_sweep_hook): Likewise.
	(ppc64_elf_tls_optimize): Likewise.
	(allocate_dynrelocs): Likewise.
	(ppc64_elf_size_dynamic_sections): Likewise.
	(ppc64_elf_relocate_section): Likewise.
	(ppc64_elf_next_toc_section): Update comment.
	(toc_adjusting_stub_needed): Remove unneeded cast.
	(ppc64_elf_build_stubs): Check for stub sections in stub bfd by
	testing section flags.
	(ppc64_elf_build_stubs): Likewise.
	(ppc64_elf_size_stubs): Likewise.  Remove stub_bfd param.
	(ppc64_elf_finish_dynamic_sections): Write out got sections.
	(func_desc_adjust): Copy over dynamic info for undef weaks.
	* elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
	(ppc64_elf_size_stubs): Update prototype.
	* elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
	input sections rather than scanning dynobj.

ld/ChangeLog
	* emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.
	(GOT): Define.
	* emultempl/ppc64elf.em (stub_added): New static var.
	(ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd.
	(ppc_add_stub_section): Set stub_added.
	(gld${EMULATION_NAME}_finish): Look for .got rather than .toc.  Adjust
	ppc64_elf_size_stubs call and test for stubs.
	* scripttempl/elf.sc (GOT): Define and use.

ld/testsuite/ChangeLog
	* ld-powerpc/powerpc.exp: Dump output .got section rather than .toc.
	* ld-powerpc/tlsexetoc.g: Update.
	* ld-powerpc/tlsexetoc.r: Update.
	* ld-powerpc/tlstoc.g: Update.
	* ld-powerpc/tlstocso.g: Update.
	* ld-powerpc/tlstocso.r: Update.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.117
diff -u -p -r1.117 elf64-ppc.c
--- bfd/elf64-ppc.c	4 Jul 2003 13:53:37 -0000	1.117
+++ bfd/elf64-ppc.c	9 Jul 2003 14:10:34 -0000
@@ -69,6 +69,7 @@ static bfd_reloc_status_type ppc64_elf_u
 #define elf_backend_can_refcount 1
 #define elf_backend_rela_normal 1
 
+#define bfd_elf64_mkobject		      ppc64_elf_mkobject
 #define bfd_elf64_bfd_reloc_type_lookup	      ppc64_elf_reloc_type_lookup
 #define bfd_elf64_bfd_merge_private_bfd_data  ppc64_elf_merge_private_bfd_data
 #define bfd_elf64_new_section_hook	      ppc64_elf_new_section_hook
@@ -2316,6 +2317,40 @@ ppc64_elf_unhandled_reloc (bfd *abfd, ar
   return bfd_reloc_dangerous;
 }
 
+struct ppc64_elf_obj_tdata
+{
+  struct elf_obj_tdata elf;
+
+  /* Shortcuts to dynamic linker sections.  */
+  asection *got;
+  asection *relgot;
+
+  /* TLS local dynamic got entry handling.  Suppose for multiple GOT
+     sections means we potentially need one of these for each input bfd.  */
+  union {
+    bfd_signed_vma refcount;
+    bfd_vma offset;
+  } tlsld_got;
+};
+
+#define ppc64_elf_tdata(bfd) \
+  ((struct ppc64_elf_obj_tdata *) (bfd)->tdata.any)
+
+#define ppc64_tlsld_got(bfd) \
+  (&ppc64_elf_tdata (bfd)->tlsld_got)
+
+/* Override the generic function because we store some extras.  */
+
+static bfd_boolean
+ppc64_elf_mkobject (bfd *abfd)
+{
+  bfd_size_type amt = sizeof (struct ppc64_elf_obj_tdata);
+  abfd->tdata.any = bfd_zalloc (abfd, amt);
+  if (abfd->tdata.any == NULL)
+    return FALSE;
+  return TRUE;
+}
+
 /* Fix bad default arch selected for a 64 bit input bfd when the
    default is 32 bit.  */
 
@@ -2497,16 +2532,24 @@ struct got_entry
   /* The symbol addend that we'll be placing in the GOT.  */
   bfd_vma addend;
 
+  /* Unlike other ELF targets, we use separate GOT entries for the same
+     symbol referenced from different input files.  This is to support
+     automatic multiple TOC/GOT sections, where the TOC base can vary
+     from one input file to another.
+
+     Point to the BFD owning this GOT entry.  */
+  bfd *owner;
+
+  /* Zero for non-tls entries, or TLS_TLS and one of TLS_GD, TLS_LD,
+     TLS_TPREL or TLS_DTPREL for tls entries.  */
+  char tls_type;
+
   /* Reference count until size_dynamic_sections, GOT offset thereafter.  */
   union
     {
       bfd_signed_vma refcount;
       bfd_vma offset;
     } got;
-
-  /* Zero for non-tls entries, or TLS_TLS and one of TLS_GD, TLS_LD,
-     TLS_TPREL or TLS_DTPREL for tls entries.  */
-  char tls_type;
 };
 
 /* The same for PLT.  */
@@ -2719,7 +2762,6 @@ struct ppc_link_hash_table
 
   /* Short-cuts to get to dynamic linker sections.  */
   asection *got;
-  asection *relgot;
   asection *plt;
   asection *relplt;
   asection *dynbss;
@@ -2735,12 +2777,6 @@ struct ppc_link_hash_table
   /* Shortcut to .__tls_get_addr.  */
   struct elf_link_hash_entry *tls_get_addr;
 
-  /* TLS local dynamic got entry handling.  */
-  union {
-    bfd_signed_vma refcount;
-    bfd_vma offset;
-  } tlsld_got;
-
   /* Statistics.  */
   unsigned long stub_count[ppc_stub_plt_call];
 
@@ -2928,6 +2964,23 @@ ppc64_elf_link_hash_table_free (struct b
   _bfd_generic_link_hash_table_free (hash);
 }
 
+/* Satisfy the ELF linker by filling in some fields in our fake bfd.  */
+
+void
+ppc64_elf_init_stub_bfd (bfd *abfd, struct bfd_link_info *info)
+{
+  struct ppc_link_hash_table *htab;
+
+  elf_elfheader (abfd)->e_ident[EI_CLASS] = ELFCLASS64;
+
+/* Always hook our dynamic sections into the first bfd, which is the
+   linker created stub bfd.  This ensures that the GOT header is at
+   the start of the output TOC section.  */
+  htab = ppc_hash_table (info);
+  htab->stub_bfd = abfd;
+  htab->elf.dynobj = abfd;
+}
+
 /* Build a name for an entry in the stub hash table.  */
 
 static char *
@@ -3122,30 +3175,45 @@ create_linkage_sections (bfd *dynobj, st
   return TRUE;
 }
 
-/* Create .got and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
+/* Create .got and .rela.got sections in ABFD, and .got in dynobj if
+   not already done.  */
 
 static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
+create_got_section (bfd *abfd, struct bfd_link_info *info)
 {
-  struct ppc_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
+  asection *got, *relgot;
+  struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
-  htab = ppc_hash_table (info);
-  htab->got = bfd_get_section_by_name (dynobj, ".got");
   if (!htab->got)
-    abort ();
+    {
+      if (! _bfd_elf_create_got_section (htab->elf.dynobj, info))
+	return FALSE;
+
+      htab->got = bfd_get_section_by_name (htab->elf.dynobj, ".got");
+      if (!htab->got)
+	abort ();
+    }
 
-  htab->relgot = bfd_make_section (dynobj, ".rela.got");
-  if (!htab->relgot
-      || ! bfd_set_section_flags (dynobj, htab->relgot,
+  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+		    | SEC_LINKER_CREATED);
+
+  got = bfd_make_section (abfd, ".got");
+  if (!got
+      || !bfd_set_section_flags (abfd, got, flags)
+      || !bfd_set_section_alignment (abfd, got, 3))
+    return FALSE;
+
+  relgot = bfd_make_section (abfd, ".rela.got");
+  if (!relgot
+      || ! bfd_set_section_flags (abfd, relgot,
 				  (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
 				   | SEC_IN_MEMORY | SEC_LINKER_CREATED
 				   | SEC_READONLY))
-      || ! bfd_set_section_alignment (dynobj, htab->relgot, 3))
+      || ! bfd_set_section_alignment (abfd, relgot, 3))
     return FALSE;
+
+  ppc64_elf_tdata (abfd)->got = got;
+  ppc64_elf_tdata (abfd)->relgot = relgot;
   return TRUE;
 }
 
@@ -3156,20 +3224,19 @@ ppc64_elf_create_dynamic_sections (bfd *
 {
   struct ppc_link_hash_table *htab;
 
-  htab = ppc_hash_table (info);
-  if (!htab->got && !create_got_section (dynobj, info))
-    return FALSE;
-
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
+  htab = ppc_hash_table (info);
+  if (!htab->got)
+    htab->got = bfd_get_section_by_name (dynobj, ".got");
   htab->plt = bfd_get_section_by_name (dynobj, ".plt");
   htab->relplt = bfd_get_section_by_name (dynobj, ".rela.plt");
   htab->dynbss = bfd_get_section_by_name (dynobj, ".dynbss");
   if (!info->shared)
     htab->relbss = bfd_get_section_by_name (dynobj, ".rela.bss");
 
-  if (!htab->plt || !htab->relplt || !htab->dynbss
+  if (!htab->got || !htab->plt || !htab->relplt || !htab->dynbss
       || (!info->shared && !htab->relbss))
     abort ();
 
@@ -3260,6 +3327,7 @@ ppc64_elf_copy_indirect_symbol (struct e
 
 	      for (dent = edir->elf.got.glist; dent != NULL; dent = dent->next)
 		if (dent->addend == ent->addend
+		    && dent->owner == ent->owner
 		    && dent->tls_type == ent->tls_type)
 		  {
 		    dent->got.refcount += ent->got.refcount;
@@ -3360,7 +3428,9 @@ update_local_sym_info (bfd *abfd, Elf_In
       struct got_entry *ent;
 
       for (ent = local_got_ents[r_symndx]; ent != NULL; ent = ent->next)
-	if (ent->addend == r_addend && ent->tls_type == tls_type)
+	if (ent->addend == r_addend
+	    && ent->owner == abfd
+	    && ent->tls_type == tls_type)
 	  break;
       if (ent == NULL)
 	{
@@ -3370,6 +3440,7 @@ update_local_sym_info (bfd *abfd, Elf_In
 	    return FALSE;
 	  ent->next = local_got_ents[r_symndx];
 	  ent->addend = r_addend;
+	  ent->owner = abfd;
 	  ent->tls_type = tls_type;
 	  ent->got.refcount = 0;
 	  local_got_ents[r_symndx] = ent;
@@ -3460,8 +3531,6 @@ ppc64_elf_check_relocs (bfd *abfd, struc
       ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
     }
 
-  if (htab->elf.dynobj == NULL)
-    htab->elf.dynobj = abfd;
   if (htab->sfpr == NULL
       && !create_linkage_sections (htab->elf.dynobj, info))
     return FALSE;
@@ -3487,7 +3556,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_GOT_TLSLD16_LO:
 	case R_PPC64_GOT_TLSLD16_HI:
 	case R_PPC64_GOT_TLSLD16_HA:
-	  htab->tlsld_got.refcount += 1;
+	  ppc64_tlsld_got (abfd)->refcount += 1;
 	  tls_type = TLS_TLS | TLS_LD;
 	  goto dogottls;
 
@@ -3524,8 +3593,8 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	case R_PPC64_GOT16_LO_DS:
 	  /* This symbol requires a global offset table entry.  */
 	  sec->has_gp_reloc = 1;
-	  if (htab->got == NULL
-	      && !create_got_section (htab->elf.dynobj, info))
+	  if (ppc64_elf_tdata (abfd)->got == NULL
+	      && !create_got_section (abfd, info))
 	    return FALSE;
 
 	  if (h != NULL)
@@ -3536,6 +3605,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	      eh = (struct ppc_link_hash_entry *) h;
 	      for (ent = eh->elf.got.glist; ent != NULL; ent = ent->next)
 		if (ent->addend == rel->r_addend
+		    && ent->owner == abfd
 		    && ent->tls_type == tls_type)
 		  break;
 	      if (ent == NULL)
@@ -3546,6 +3616,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 		    return FALSE;
 		  ent->next = eh->elf.got.glist;
 		  ent->addend = rel->r_addend;
+		  ent->owner = abfd;
 		  ent->tls_type = tls_type;
 		  ent->got.refcount = 0;
 		  eh->elf.got.glist = ent;
@@ -4054,7 +4125,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
 	case R_PPC64_GOT_TLSLD16_LO:
 	case R_PPC64_GOT_TLSLD16_HI:
 	case R_PPC64_GOT_TLSLD16_HA:
-	  htab->tlsld_got.refcount -= 1;
+	  ppc64_tlsld_got (abfd)->refcount -= 1;
 	  tls_type = TLS_TLS | TLS_LD;
 	  goto dogot;
 
@@ -4096,6 +4167,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, stru
 
 	    for (; ent != NULL; ent = ent->next)
 	      if (ent->addend == rel->r_addend
+		  && ent->owner == abfd
 		  && ent->tls_type == tls_type)
 		break;
 	    if (ent == NULL)
@@ -4213,7 +4285,9 @@ func_desc_adjust (struct elf_link_hash_e
 	  && (fdh->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
 	  && (info->shared
 	      || (fdh->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
-	      || (fdh->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+	      || (fdh->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
+	      || (fdh->root.type == bfd_link_hash_undefweak
+		  && ELF_ST_VISIBILITY (fdh->other) == STV_DEFAULT)))
 	{
 	  if (fdh->dynindx == -1)
 	    if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
@@ -5138,7 +5212,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIB
 		    /* These relocs should never be against a symbol
 		       defined in a shared lib.  Leave them alone if
 		       that turns out to be the case.  */
-		    htab->tlsld_got.refcount -= 1;
+		    ppc64_tlsld_got (ibfd)->refcount -= 1;
 		    if (!is_local)
 		      continue;
 
@@ -5276,6 +5350,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIB
 
 		    for (; ent != NULL; ent = ent->next)
 		      if (ent->addend == rel->r_addend
+			  && ent->owner == ibfd
 			  && ent->tls_type == tls_type)
 			break;
 		    if (ent == NULL)
@@ -5431,7 +5506,8 @@ allocate_dynrelocs (struct elf_link_hash
 	  for (ent = h->got.glist; ent != NULL; ent = ent->next)
 	    if (ent->got.refcount > 0
 		&& (ent->tls_type & TLS_TPREL) != 0
-		&& ent->addend == gent->addend)
+		&& ent->addend == gent->addend
+		&& ent->owner == gent->owner)
 	      {
 		gent->got.refcount = 0;
 		break;
@@ -5460,11 +5536,11 @@ allocate_dynrelocs (struct elf_link_hash
 	if ((gent->tls_type & TLS_LD) != 0
 	    && !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
 	  {
-	    gent->got.offset = htab->tlsld_got.offset;
+	    gent->got.offset = ppc64_tlsld_got (gent->owner)->offset;
 	    continue;
 	  }
 
-	s = htab->got;
+	s = ppc64_elf_tdata (gent->owner)->got;
 	gent->got.offset = s->_raw_size;
 	s->_raw_size
 	  += (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8;
@@ -5473,7 +5549,7 @@ allocate_dynrelocs (struct elf_link_hash
 	     || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
 	    && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 		|| h->root.type != bfd_link_hash_undefweak))
-	  htab->relgot->_raw_size
+	  ppc64_elf_tdata (gent->owner)->relgot->_raw_size
 	    += (gent->tls_type & eh->tls_mask & TLS_GD
 		? 2 * sizeof (Elf64_External_Rela)
 		: sizeof (Elf64_External_Rela));
@@ -5618,16 +5694,6 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	}
     }
 
-  if (htab->tlsld_got.refcount > 0)
-    {
-      htab->tlsld_got.offset = htab->got->_raw_size;
-      htab->got->_raw_size += 16;
-      if (info->shared)
-	htab->relgot->_raw_size += sizeof (Elf64_External_Rela);
-    }
-  else
-    htab->tlsld_got.offset = (bfd_vma) -1;
-
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
@@ -5642,6 +5708,20 @@ ppc64_elf_size_dynamic_sections (bfd *ou
       if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
 	continue;
 
+      if (ppc64_tlsld_got (ibfd)->refcount > 0)
+	{
+	  s = ppc64_elf_tdata (ibfd)->got;
+	  ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
+	  s->_raw_size += 16;
+	  if (info->shared)
+	    {
+	      srel = ppc64_elf_tdata (ibfd)->relgot;
+	      srel->_raw_size += sizeof (Elf64_External_Rela);
+	    }
+	}
+      else
+	ppc64_tlsld_got (ibfd)->offset = (bfd_vma) -1;
+
       for (s = ibfd->sections; s != NULL; s = s->next)
 	{
 	  struct ppc_dyn_relocs *p;
@@ -5677,8 +5757,8 @@ ppc64_elf_size_dynamic_sections (bfd *ou
       locsymcount = symtab_hdr->sh_info;
       end_lgot_ents = lgot_ents + locsymcount;
       lgot_masks = (char *) end_lgot_ents;
-      s = htab->got;
-      srel = htab->relgot;
+      s = ppc64_elf_tdata (ibfd)->got;
+      srel = ppc64_elf_tdata (ibfd)->relgot;
       for (; lgot_ents < end_lgot_ents; ++lgot_ents, ++lgot_masks)
 	{
 	  struct got_entry *ent;
@@ -5688,14 +5768,14 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	      {
 		if ((ent->tls_type & *lgot_masks & TLS_LD) != 0)
 		  {
-		    if (htab->tlsld_got.offset == (bfd_vma) -1)
+		    if (ppc64_tlsld_got (ibfd)->offset == (bfd_vma) -1)
 		      {
-			htab->tlsld_got.offset = s->_raw_size;
+			ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
 			s->_raw_size += 16;
 			if (info->shared)
 			  srel->_raw_size += sizeof (Elf64_External_Rela);
 		      }
-		    ent->got.offset = htab->tlsld_got.offset;
+		    ent->got.offset = ppc64_tlsld_got (ibfd)->offset;
 		  }
 		else
 		  {
@@ -5738,16 +5818,8 @@ ppc64_elf_size_dynamic_sections (bfd *ou
       if (s == htab->brlt || s == htab->relbrlt)
 	/* These haven't been allocated yet;  don't strip.  */
 	continue;
-      else if (s == htab->got)
-	{
-	  /* Automatic multiple tocs aren't possible if we are using the
-	     GOT.  The GOT is accessed via r2, so we can't adjust r2.
-	     FIXME: There's no reason why we couldn't lay out multiple
-	     GOTs too.  */
-	  if (s->_raw_size > elf_backend_got_header_size)
-	    htab->no_multi_toc = 1;
-	}
-      else if (s == htab->plt
+      else if (s == htab->got
+	       || s == htab->plt
 	       || s == htab->glink)
 	{
 	  /* Strip this section if we don't need it; see the
@@ -5805,6 +5877,38 @@ ppc64_elf_size_dynamic_sections (bfd *ou
 	return FALSE;
     }
 
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    {
+      s = ppc64_elf_tdata (ibfd)->got;
+      if (s != NULL && s != htab->got)
+	{
+	  s->_cooked_size = 0;
+	  if (s->_raw_size == 0)
+	    _bfd_strip_section_from_output (info, s);
+	  else
+	    {
+	      s->contents = bfd_zalloc (ibfd, s->_raw_size);
+	      if (s->contents == NULL)
+		return FALSE;
+	    }
+	}
+      s = ppc64_elf_tdata (ibfd)->relgot;
+      if (s != NULL)
+	{
+	  s->_cooked_size = 0;
+	  if (s->_raw_size == 0)
+	    _bfd_strip_section_from_output (info, s);
+	  else
+	    {
+	      s->contents = bfd_zalloc (ibfd, s->_raw_size);
+	      if (s->contents == NULL)
+		return FALSE;
+	      relocs = TRUE;
+	      s->reloc_count = 0;
+	    }
+	}
+    }
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -6323,10 +6427,10 @@ ppc64_elf_setup_section_lists (bfd *outp
   return 1;
 }
 
-/* The linker repeatedly calls this function for each toc input
-   section.  Group input bfds such that the toc within a group
-   is less than 64k in size.  Will break with cute linker scripts
-   that play games with dot in the output toc section.  */
+/* The linker repeatedly calls this function for each TOC input section
+   and linker generated GOT section.  Group input bfds such that the toc
+   within a group is less than 64k in size.  Will break with cute linker
+   scripts that play games with dot in the output toc section.  */
 
 void
 ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
@@ -6389,7 +6493,7 @@ toc_adjusting_stub_needed (struct bfd_li
       if (contents == NULL)
 	return -1;
       if (! bfd_get_section_contents (isec->owner, isec, contents,
-				      (file_ptr) 0, isec->_raw_size))
+				      0, isec->_raw_size))
 	{
 	  free (contents);
 	  return -1;
@@ -6555,7 +6659,6 @@ group_sections (struct ppc_link_hash_tab
 
 bfd_boolean
 ppc64_elf_size_stubs (bfd *output_bfd,
-		      bfd *stub_bfd,
 		      struct bfd_link_info *info,
 		      bfd_signed_vma group_size,
 		      asection *(*add_stub_section) (const char *, asection *),
@@ -6566,7 +6669,6 @@ ppc64_elf_size_stubs (bfd *output_bfd,
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
   /* Stash our params away.  */
-  htab->stub_bfd = stub_bfd;
   htab->add_stub_section = add_stub_section;
   htab->layout_sections_again = layout_sections_again;
   stubs_always_before_branch = group_size < 0;
@@ -6820,10 +6922,11 @@ ppc64_elf_size_stubs (bfd *output_bfd,
       for (stub_sec = htab->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
-	{
-	  stub_sec->_raw_size = 0;
-	  stub_sec->_cooked_size = 0;
-	}
+	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	  {
+	    stub_sec->_raw_size = 0;
+	    stub_sec->_cooked_size = 0;
+	  }
       htab->brlt->_raw_size = 0;
       htab->brlt->_cooked_size = 0;
 
@@ -6909,24 +7012,26 @@ ppc64_elf_build_stubs (bfd_boolean emit_
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
   asection *stub_sec;
   bfd_byte *p;
+  int stub_sec_count = 0;
 
   htab->emit_stub_syms = emit_stub_syms;
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
        stub_sec = stub_sec->next)
-    {
-      bfd_size_type size;
+    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+      {
+	bfd_size_type size;
 
-      /* Allocate memory to hold the linker stubs.  */
-      size = stub_sec->_raw_size;
-      if (size != 0)
-	{
-	  stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
-	  if (stub_sec->contents == NULL)
-	    return FALSE;
-	}
-      stub_sec->_cooked_size = 0;
-    }
+	/* Allocate memory to hold the linker stubs.  */
+	size = stub_sec->_raw_size;
+	if (size != 0)
+	  {
+	    stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
+	    if (stub_sec->contents == NULL)
+	      return FALSE;
+	  }
+	stub_sec->_cooked_size = 0;
+      }
 
   if (htab->plt != NULL)
     {
@@ -7018,10 +7123,12 @@ ppc64_elf_build_stubs (bfd_boolean emit_
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
        stub_sec = stub_sec->next)
-    {
-      if (stub_sec->_raw_size != stub_sec->_cooked_size)
-	break;
-    }
+    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+      {
+	stub_sec_count += 1;
+	if (stub_sec->_raw_size != stub_sec->_cooked_size)
+	  break;
+      }
 
   if (stub_sec != NULL
       || htab->glink->_raw_size != htab->glink->_cooked_size)
@@ -7045,7 +7152,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_
 			 "  long branch  %lu\n"
 			 "  long toc adj %lu\n"
 			 "  plt call     %lu"),
-	       htab->stub_bfd->section_count,
+	       stub_sec_count,
 	       htab->stub_count[ppc_stub_long_branch - 1],
 	       htab->stub_count[ppc_stub_long_branch_r2off - 1],
 	       htab->stub_count[ppc_stub_plt_branch - 1],
@@ -7736,17 +7843,15 @@ ppc64_elf_relocate_section (bfd *output_
 	  {
 	    /* Relocation is to the entry for this symbol in the global
 	       offset table.  */
+	    asection *got;
 	    bfd_vma *offp;
 	    bfd_vma off;
 	    unsigned long indx = 0;
 
-	    if (htab->got == NULL)
-	      abort ();
-
 	    if (tls_type == (TLS_TLS | TLS_LD)
 		&& (h == NULL
 		    || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
-	      offp = &htab->tlsld_got.offset;
+	      offp = &ppc64_tlsld_got (input_bfd)->offset;
 	    else
 	      {
 		struct got_entry *ent;
@@ -7778,6 +7883,7 @@ ppc64_elf_relocate_section (bfd *output_
 
 		for (; ent != NULL; ent = ent->next)
 		  if (ent->addend == rel->r_addend
+		      && ent->owner == input_bfd
 		      && ent->tls_type == tls_type)
 		    break;
 		if (ent == NULL)
@@ -7785,6 +7891,10 @@ ppc64_elf_relocate_section (bfd *output_
 		offp = &ent->got.offset;
 	      }
 
+	    got = ppc64_elf_tdata (input_bfd)->got;
+	    if (got == NULL)
+	      abort ();
+
 	    /* The offset must always be a multiple of 8.  We use the
 	       least significant bit to record whether we have already
 	       processed this entry.  */
@@ -7796,14 +7906,16 @@ ppc64_elf_relocate_section (bfd *output_
 		/* Generate relocs for the dynamic linker, except in
 		   the case of TLSLD where we'll use one entry per
 		   module.  */
+		asection *relgot = ppc64_elf_tdata (input_bfd)->relgot;
+
 		*offp = off | 1;
 		if ((info->shared || indx != 0)
 		    && (h == NULL
 			|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
 			|| h->root.type != bfd_link_hash_undefweak))
 		  {
-		    outrel.r_offset = (htab->got->output_section->vma
-				       + htab->got->output_offset
+		    outrel.r_offset = (got->output_section->vma
+				       + got->output_offset
 				       + off);
 		    outrel.r_addend = rel->r_addend;
 		    if (tls_type & (TLS_LD | TLS_GD))
@@ -7812,8 +7924,8 @@ ppc64_elf_relocate_section (bfd *output_
 			outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPMOD64);
 			if (tls_type == (TLS_TLS | TLS_GD))
 			  {
-			    loc = htab->relgot->contents;
-			    loc += (htab->relgot->reloc_count++
+			    loc = relgot->contents;
+			    loc += (relgot->reloc_count++
 				    * sizeof (Elf64_External_Rela));
 			    bfd_elf64_swap_reloca_out (output_bfd,
 						       &outrel, loc);
@@ -7833,7 +7945,7 @@ ppc64_elf_relocate_section (bfd *output_
 
 			/* Write the .got section contents for the sake
 			   of prelink.  */
-			loc = htab->got->contents + off;
+			loc = got->contents + off;
 			bfd_put_64 (output_bfd, outrel.r_addend + relocation,
 				    loc);
 		      }
@@ -7846,8 +7958,8 @@ ppc64_elf_relocate_section (bfd *output_
 			if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL))
 			  outrel.r_addend -= htab->tls_sec->vma;
 		      }
-		    loc = htab->relgot->contents;
-		    loc += (htab->relgot->reloc_count++
+		    loc = relgot->contents;
+		    loc += (relgot->reloc_count++
 			    * sizeof (Elf64_External_Rela));
 		    bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
 		  }
@@ -7868,23 +7980,23 @@ ppc64_elf_relocate_section (bfd *output_
 			if (tls_type == (TLS_TLS | TLS_GD))
 			  {
 			    bfd_put_64 (output_bfd, relocation,
-					htab->got->contents + off + 8);
+					got->contents + off + 8);
 			    relocation = 1;
 			  }
 		      }
 
 		    bfd_put_64 (output_bfd, relocation,
-				htab->got->contents + off);
+				got->contents + off);
 		  }
 	      }
 
 	    if (off >= (bfd_vma) -2)
 	      abort ();
 
-	    relocation = htab->got->output_offset + off;
+	    relocation = got->output_offset + off;
 
 	    /* TOC base (r2) is TOC start plus 0x8000.  */
-	    addend = - TOC_BASE_OFF;
+	    addend = -TOC_BASE_OFF;
 	  }
 	  break;
 
@@ -8626,6 +8738,29 @@ ppc64_elf_finish_dynamic_sections (bfd *
 	= PLT_ENTRY_SIZE;
     }
 
+  /* We need to handle writing out multiple GOT sections ourselves,
+     since we didn't add them to DYNOBJ.  */
+  while ((dynobj = dynobj->link_next) != NULL)
+    {
+      asection *s;
+      s = ppc64_elf_tdata (dynobj)->got;
+      if (s != NULL
+	  && s->_raw_size != 0
+	  && s->output_section != bfd_abs_section_ptr
+	  && !bfd_set_section_contents (output_bfd, s->output_section,
+					s->contents, s->output_offset,
+					s->_raw_size))
+	return FALSE;
+      s = ppc64_elf_tdata (dynobj)->relgot;
+      if (s != NULL
+	  && s->_raw_size != 0
+	  && s->output_section != bfd_abs_section_ptr
+	  && !bfd_set_section_contents (output_bfd, s->output_section,
+					s->contents, s->output_offset,
+					s->_raw_size))
+	return FALSE;
+    }
+  
   return TRUE;
 }
 
Index: bfd/elf64-ppc.h
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.h,v
retrieving revision 1.12
diff -u -p -r1.12 elf64-ppc.h
--- bfd/elf64-ppc.h	20 Jun 2003 05:30:46 -0000	1.12
+++ bfd/elf64-ppc.h	9 Jul 2003 14:10:34 -0000
@@ -17,6 +17,8 @@ You should have received a copy of the G
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+void ppc64_elf_init_stub_bfd
+  (bfd *, struct bfd_link_info *);
 bfd_boolean ppc64_elf_mark_entry_syms
   (struct bfd_link_info *);
 bfd_boolean ppc64_elf_edit_opd
@@ -36,7 +38,7 @@ void ppc64_elf_reinit_toc
 bfd_boolean ppc64_elf_next_input_section
   (struct bfd_link_info *, asection *);
 bfd_boolean ppc64_elf_size_stubs
-  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+  (bfd *, struct bfd_link_info *, bfd_signed_vma,
    asection *(*) (const char *, asection *), void (*) (void));
 bfd_boolean ppc64_elf_build_stubs
   (bfd_boolean, struct bfd_link_info *, char **);
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.234
diff -u -p -r1.234 elflink.h
--- bfd/elflink.h	4 Jul 2003 01:50:11 -0000	1.234
+++ bfd/elflink.h	9 Jul 2003 14:10:37 -0000
@@ -3029,8 +3029,7 @@ elf_link_sort_relocs (abfd, info, psec)
      struct bfd_link_info *info;
      asection **psec;
 {
-  bfd *dynobj = elf_hash_table (info)->dynobj;
-  asection *reldyn, *o;
+  asection *reldyn;
   bfd_size_type count, size;
   size_t i, ret, sort_elt, ext_size;
   bfd_byte *sort, *s_non_relative, *p;
@@ -3039,6 +3038,7 @@ elf_link_sort_relocs (abfd, info, psec)
   int i2e = bed->s->int_rels_per_ext_rel;
   void (*swap_in) PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
   void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+  struct bfd_link_order *lo;
 
   reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
   if (reldyn == NULL || reldyn->_raw_size == 0)
@@ -3059,11 +3059,12 @@ elf_link_sort_relocs (abfd, info, psec)
   count = reldyn->_raw_size / ext_size;
 
   size = 0;
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-	== (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-	&& o->output_section == reldyn)
-      size += o->_raw_size;
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
+      {
+	asection *o = lo->u.indirect.section;
+	size += o->_raw_size;
+      }
 
   if (size != reldyn->_raw_size)
     return 0;
@@ -3079,12 +3080,11 @@ elf_link_sort_relocs (abfd, info, psec)
       return 0;
     }
 
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-	== (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-	&& o->output_section == reldyn)
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
       {
 	bfd_byte *erel, *erelend;
+	asection *o = lo->u.indirect.section;
 
 	erel = o->contents;
 	erelend = o->contents + o->_raw_size;
@@ -3121,12 +3121,11 @@ elf_link_sort_relocs (abfd, info, psec)
 
   qsort (s_non_relative, (size_t) count - ret, sort_elt, elf_link_sort_cmp2);
 
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-	== (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-	&& o->output_section == reldyn)
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
       {
 	bfd_byte *erel, *erelend;
+	asection *o = lo->u.indirect.section;
 
 	erel = o->contents;
 	erelend = o->contents + o->_raw_size;
Index: ld/emulparams/elf64ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ppc.sh,v
retrieving revision 1.13
diff -u -p -r1.13 elf64ppc.sh
--- ld/emulparams/elf64ppc.sh	10 Jun 2003 04:35:28 -0000	1.13
+++ ld/emulparams/elf64ppc.sh	9 Jul 2003 14:10:45 -0000
@@ -18,8 +18,8 @@ OTHER_BSS_SYMBOLS="
   .tocbss	${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
 OTHER_PLT_RELOC_SECTIONS="
   .rela.tocbss	${RELOCATING-0} : { *(.rela.tocbss) }"
-OTHER_GOT_SECTIONS="
-  .toc		${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc) }"
+GOT="
+  .got		${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.got .toc) }"
 OTHER_GOT_RELOC_SECTIONS="
   .rela.toc	${RELOCATING-0} : { *(.rela.toc) }"
 OTHER_READWRITE_SECTIONS="
Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.21
diff -u -p -r1.21 ppc64elf.em
--- ld/emultempl/ppc64elf.em	25 Jun 2003 06:40:27 -0000	1.21
+++ ld/emultempl/ppc64elf.em	9 Jul 2003 14:10:46 -0000
@@ -29,6 +29,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 
 /* Fake input file for stubs.  */
 static lang_input_statement_type *stub_file;
+static int stub_added = 0;
 
 /* Whether we need to call ppc_layout_sections_again.  */
 static int need_laying_out = 0;
@@ -77,6 +78,7 @@ ppc_create_output_section_statements (vo
     }
 
   ldlang_add_file (stub_file);
+  ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
 }
 
 static void
@@ -232,6 +234,7 @@ ppc_add_stub_section (const char *stub_s
   if (info.add.head == NULL)
     goto err_ret;
 
+  stub_added = 1;
   if (hook_in_stub (&info, &os->children.head))
     return stub_sec;
 
@@ -330,7 +333,7 @@ gld${EMULATION_NAME}_finish (void)
 	      return;
 	    }
 
-	  toc_section = bfd_get_section_by_name (output_bfd, ".toc");
+	  toc_section = bfd_get_section_by_name (output_bfd, ".got");
 	  if (toc_section != NULL)
 	    lang_for_each_statement (build_toc_list);
 
@@ -340,7 +343,6 @@ gld${EMULATION_NAME}_finish (void)
 
 	  /* Call into the BFD backend to do the real work.  */
 	  if (!ppc64_elf_size_stubs (output_bfd,
-				     stub_file->the_bfd,
 				     &link_info,
 				     group_size,
 				     &ppc_add_stub_section,
@@ -355,7 +357,7 @@ gld${EMULATION_NAME}_finish (void)
   if (need_laying_out)
     ppc_layout_sections_again ();
 
-  if (stub_file != NULL && stub_file->the_bfd->sections != NULL)
+  if (stub_added)
     {
       char *msg = NULL;
       char *line, *endline;
Index: ld/scripttempl/elf.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
retrieving revision 1.39
diff -u -p -r1.39 elf.sc
--- ld/scripttempl/elf.sc	4 Jul 2003 13:53:38 -0000	1.39
+++ ld/scripttempl/elf.sc	9 Jul 2003 14:10:46 -0000
@@ -82,6 +82,7 @@ if test -n "${COMMONPAGESIZE}"; then
 fi
 INTERP=".interp       ${RELOCATING-0} : { *(.interp) }"
 PLT=".plt          ${RELOCATING-0} : { *(.plt) }"
+test -z "$GOT" && GOT=".got          ${RELOCATING-0} : { *(.got.plt) *(.got) }"
 DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
 STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
@@ -325,7 +326,7 @@ cat <<EOF
   .jcr          ${RELOCATING-0} : { KEEP (*(.jcr)) }
   ${DATA_PLT+${PLT}}
   ${RELOCATING+${OTHER_GOT_SYMBOLS}}
-  .got          ${RELOCATING-0} : { *(.got.plt) *(.got) }
+  ${GOT}
   ${OTHER_GOT_SECTIONS}
   ${CREATE_SHLIB+${SDATA2}}
   ${CREATE_SHLIB+${SBSS2}}
Index: ld/testsuite/ld-powerpc/powerpc.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/powerpc.exp,v
retrieving revision 1.6
diff -u -p -r1.6 powerpc.exp
--- ld/testsuite/ld-powerpc/powerpc.exp	18 Feb 2003 06:11:32 -0000	1.6
+++ ld/testsuite/ld-powerpc/powerpc.exp	9 Jul 2003 14:10:47 -0000
@@ -86,17 +86,17 @@ set ppc64elftests {
       {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}}
       "tls.so"}
     {"TLSTOC static exec" "-melf64ppc tmpdir/tlslib.o " "-a64"  {tlstoc.s}
-     {{objdump -dr tlstoc.d} {objdump -sj.toc tlstoc.g}
+     {{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"
      "" {}
      {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d}
-      {objdump -sj.toc tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}}
+      {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}}
       "tlsexetoc"}
     {"TLSTOC shared" "-shared -melf64ppc tmpdir/tlstoc.o" "" {}
      {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d}
-      {objdump -sj.toc tlstocso.g} {objdump -sj.tdata tlstocso.t}}
+      {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}}
       "tlstoc.so"}
 }
 
Index: ld/testsuite/ld-powerpc/tlsexetoc.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexetoc.g,v
retrieving revision 1.2
diff -u -p -r1.2 tlsexetoc.g
--- ld/testsuite/ld-powerpc/tlsexetoc.g	9 Feb 2003 04:37:04 -0000	1.2
+++ ld/testsuite/ld-powerpc/tlsexetoc.g	9 Jul 2003 14:10:47 -0000
@@ -1,14 +1,15 @@
 #source: tlstoc.s
 #as: -a64
 #ld: -melf64ppc tmpdir/libtlslib.so
-#objdump: -sj.toc
+#objdump: -sj.got
 #target: powerpc64*-*-*
 
 .*: +file format elf64-powerpc
 
-Contents of section \.toc:
- 100105a0 00000000 00000000 00000000 00000000  .*
- 100105b0 00000000 00000000 00000000 00000000  .*
- 100105c0 00000000 00000001 00000000 00000000  .*
- 100105d0 00000000 00000001 00000000 00000000  .*
- 100105e0 ffffffff ffff8050 00000000 00000000  .*
+Contents of section \.got:
+ 10010598 00000000 10018598 00000000 00000000  .*
+ 100105a8 00000000 00000000 00000000 00000000  .*
+ 100105b8 00000000 00000000 00000000 00000001  .*
+ 100105c8 00000000 00000000 00000000 00000001  .*
+ 100105d8 00000000 00000000 ffffffff ffff8050  .*
+ 100105e8 00000000 00000000                    .*
Index: ld/testsuite/ld-powerpc/tlsexetoc.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexetoc.r,v
retrieving revision 1.3
diff -u -p -r1.3 tlsexetoc.r
--- ld/testsuite/ld-powerpc/tlsexetoc.r	10 Jun 2003 04:36:01 -0000	1.3
+++ ld/testsuite/ld-powerpc/tlsexetoc.r	9 Jul 2003 14:10:47 -0000
@@ -5,7 +5,7 @@
 #readelf: -WSsrl
 #target: powerpc64*-*-*
 
-There are 21 section headers.*
+There are 20 section headers.*
 
 Section Headers:
  +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -15,21 +15,20 @@ Section Headers:
  +\[ 3\] \.dynsym +DYNSYM +0+100001e0 0+1e0 0+d8 18 +A +4 +1 +8
  +\[ 4\] \.dynstr +STRTAB +0+100002b8 0+2b8 0+4c 0+ +A +0 +0 +1
  +\[ 5\] \.rela\.dyn +RELA +0+10000308 0+308 0+30 18 +A +3 +0 +8
- +\[ 6\] \.rela\.plt +RELA +0+10000338 0+338 0+18 18 +A +3 +10 +8
+ +\[ 6\] \.rela\.plt +RELA +0+10000338 0+338 0+18 18 +A +3 +f +8
  +\[ 7\] \.text +PROGBITS +0+10000350 0+350 0+bc 0+ +AX +0 +0 +4
  +\[ 8\] \.data +PROGBITS +0+10010410 0+410 0+ 0+ +WA +0 +0 +1
  +\[ 9\] \.branch_lt +PROGBITS +0+10010410 0+410 0+ 0+ +WA +0 +0 +8
  +\[10\] \.tdata +PROGBITS +0+10010410 0+410 0+38 0+ WAT +0 +0 +8
  +\[11\] \.tbss +NOBITS +0+10010448 0+448 0+38 0+ WAT +0 +0 +8
  +\[12\] \.dynamic +DYNAMIC +0+10010448 0+448 0+150 10 +WA +4 +0 +8
- +\[13\] \.got +PROGBITS +0+10010598 0+598 0+8 08 +WA +0 +0 +8
- +\[14\] \.toc +PROGBITS +0+100105a0 0+5a0 0+50 0+ +WA +0 +0 +1
- +\[15\] \.sbss +PROGBITS +0+100105f0 0+5f0 0+ 0+ +W +0 +0 +1
- +\[16\] \.plt +NOBITS +0+100105f0 0+5f0 0+30 18 +WA +0 +0 +8
- +\[17\] \.bss +NOBITS +0+10010620 0+5f0 0+ 0+ +WA +0 +0 +1
- +\[18\] \.shstrtab +STRTAB +0+ 0+5f0 0+8f 0+ +0 +0 +1
- +\[19\] \.symtab +SYMTAB +0+ 0+bc0 0+438 18 +20 +1d +8
- +\[20\] \.strtab +STRTAB +0+ 0+ff8 0+8c 0+ +0 +0 +1
+ +\[13\] \.got +PROGBITS +0+10010598 0+598 0+58 08 +WA +0 +0 +8
+ +\[14\] \.sbss +PROGBITS +0+100105f0 0+5f0 0+ 0+ +W +0 +0 +1
+ +\[15\] \.plt +NOBITS +0+100105f0 0+5f0 0+30 18 +WA +0 +0 +8
+ +\[16\] \.bss +NOBITS +0+10010620 0+5f0 0+ 0+ +WA +0 +0 +1
+ +\[17\] \.shstrtab +STRTAB +0+ 0+5f0 0+8a 0+ +0 +0 +1
+ +\[18\] \.symtab +SYMTAB +0+ 0+b80 0+420 18 +19 +1c +8
+ +\[19\] \.strtab +STRTAB +0+ 0+fa0 0+8c 0+ +0 +0 +1
 #...
 
 Elf file type is EXEC \(Executable file\)
@@ -51,7 +50,7 @@ Program Headers:
  +0+ +
  +01 +\.interp 
  +02 +\.interp \.hash \.dynsym \.dynstr \.rela\.dyn \.rela\.plt \.text 
- +03 +\.tdata \.tbss \.dynamic \.got \.toc \.plt 
+ +03 +\.tdata \.tbss \.dynamic \.got \.plt 
  +04 +\.tbss \.dynamic 
  +05 +\.tdata \.tbss 
 
@@ -76,7 +75,7 @@ Symbol table '\.dynsym' contains 9 entri
  +7: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
  +8: 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
 
-Symbol table '\.symtab' contains 45 entries:
+Symbol table '\.symtab' contains 44 entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
  +0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND 
  +1: 0+10000190 +0 SECTION LOCAL +DEFAULT +1 
@@ -92,34 +91,33 @@ Symbol table '\.symtab' contains 45 entr
  +11: 0+10010448 +0 SECTION LOCAL +DEFAULT +11 
  +12: 0+10010448 +0 SECTION LOCAL +DEFAULT +12 
  +13: 0+10010598 +0 SECTION LOCAL +DEFAULT +13 
- +14: 0+100105a0 +0 SECTION LOCAL +DEFAULT +14 
+ +14: 0+100105f0 +0 SECTION LOCAL +DEFAULT +14 
  +15: 0+100105f0 +0 SECTION LOCAL +DEFAULT +15 
- +16: 0+100105f0 +0 SECTION LOCAL +DEFAULT +16 
- +17: 0+10010620 +0 SECTION LOCAL +DEFAULT +17 
+ +16: 0+10010620 +0 SECTION LOCAL +DEFAULT +16 
+ +17: 0+ +0 SECTION LOCAL +DEFAULT +17 
  +18: 0+ +0 SECTION LOCAL +DEFAULT +18 
  +19: 0+ +0 SECTION LOCAL +DEFAULT +19 
- +20: 0+ +0 SECTION LOCAL +DEFAULT +20 
- +21: 0+ +0 TLS +LOCAL +DEFAULT +10 gd4
- +22: 0+8 +0 TLS +LOCAL +DEFAULT +10 ld4
- +23: 0+10 +0 TLS +LOCAL +DEFAULT +10 ld5
- +24: 0+18 +0 TLS +LOCAL +DEFAULT +10 ld6
- +25: 0+20 +0 TLS +LOCAL +DEFAULT +10 ie4
- +26: 0+28 +0 TLS +LOCAL +DEFAULT +10 le4
- +27: 0+30 +0 TLS +LOCAL +DEFAULT +10 le5
- +28: 0+100105e8 +0 NOTYPE +LOCAL +DEFAULT +14 \.Lie0
- +29: 0+10010448 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
- +30: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
- +31: 0+60 +0 TLS +GLOBAL DEFAULT +11 le0
- +32: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
- +33: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
- +34: 0+40 +0 TLS +GLOBAL DEFAULT +11 ld0
- +35: 0+68 +0 TLS +GLOBAL DEFAULT +11 le1
- +36: 0+ +0 TLS +GLOBAL DEFAULT +UND ld
- +37: 0+1000036c +0 NOTYPE +GLOBAL DEFAULT +7 _start
- +38: 0+50 +0 TLS +GLOBAL DEFAULT +11 ld2
- +39: 0+48 +0 TLS +GLOBAL DEFAULT +11 ld1
- +40: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
- +41: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
- +42: 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
- +43: 0+38 +0 TLS +GLOBAL DEFAULT +11 gd0
- +44: 0+58 +0 TLS +GLOBAL DEFAULT +11 ie0
+ +20: 0+ +0 TLS +LOCAL +DEFAULT +10 gd4
+ +21: 0+8 +0 TLS +LOCAL +DEFAULT +10 ld4
+ +22: 0+10 +0 TLS +LOCAL +DEFAULT +10 ld5
+ +23: 0+18 +0 TLS +LOCAL +DEFAULT +10 ld6
+ +24: 0+20 +0 TLS +LOCAL +DEFAULT +10 ie4
+ +25: 0+28 +0 TLS +LOCAL +DEFAULT +10 le4
+ +26: 0+30 +0 TLS +LOCAL +DEFAULT +10 le5
+ +27: 0+100105e8 +0 NOTYPE +LOCAL +DEFAULT +13 \.Lie0
+ +28: 0+10010448 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +29: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+ +30: 0+60 +0 TLS +GLOBAL DEFAULT +11 le0
+ +31: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +32: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
+ +33: 0+40 +0 TLS +GLOBAL DEFAULT +11 ld0
+ +34: 0+68 +0 TLS +GLOBAL DEFAULT +11 le1
+ +35: 0+ +0 TLS +GLOBAL DEFAULT +UND ld
+ +36: 0+1000036c +0 NOTYPE +GLOBAL DEFAULT +7 _start
+ +37: 0+50 +0 TLS +GLOBAL DEFAULT +11 ld2
+ +38: 0+48 +0 TLS +GLOBAL DEFAULT +11 ld1
+ +39: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+ +40: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+ +41: 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+ +42: 0+38 +0 TLS +GLOBAL DEFAULT +11 gd0
+ +43: 0+58 +0 TLS +GLOBAL DEFAULT +11 ie0
Index: ld/testsuite/ld-powerpc/tlstoc.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstoc.g,v
retrieving revision 1.1
diff -u -p -r1.1 tlstoc.g
--- ld/testsuite/ld-powerpc/tlstoc.g	4 Feb 2003 14:52:11 -0000	1.1
+++ ld/testsuite/ld-powerpc/tlstoc.g	9 Jul 2003 14:10:47 -0000
@@ -2,12 +2,12 @@
 #source: tlstoc.s
 #as: -a64
 #ld: -melf64ppc
-#objdump: -sj.toc
+#objdump: -sj.got
 #target: powerpc64*-*-*
 
 .*: +file format elf64-powerpc
 
-Contents of section \.toc:
+Contents of section \.got:
  100101a0 00000000 00000001 00000000 00000000  .*
  100101b0 00000000 00000001 00000000 00000000  .*
  100101c0 00000000 00000001 00000000 00000000  .*
Index: ld/testsuite/ld-powerpc/tlstocso.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.g,v
retrieving revision 1.2
diff -u -p -r1.2 tlstocso.g
--- ld/testsuite/ld-powerpc/tlstocso.g	10 Jun 2003 04:36:01 -0000	1.2
+++ ld/testsuite/ld-powerpc/tlstocso.g	9 Jul 2003 14:10:47 -0000
@@ -1,14 +1,15 @@
 #source: tlstoc.s
 #as: -a64
 #ld: -shared -melf64ppc
-#objdump: -sj.toc
+#objdump: -sj.got
 #target: powerpc64*-*-*
 
 .*: +file format elf64-powerpc
 
-Contents of section \.toc:
- 108b8 00000000 00000000 00000000 00000000  .*
- 108c8 00000000 00000000 00000000 00000000  .*
- 108d8 00000000 00000000 00000000 00000000  .*
- 108e8 00000000 00000000 00000000 00000000  .*
- 108f8 00000000 00000000 00000000 00000000  .*
+Contents of section \.got:
+ 10890 00000000 00018890 00000000 00000000  .*
+ 108a0 00000000 00000000 00000000 00000000  .*
+ 108b0 00000000 00000000 00000000 00000000  .*
+ 108c0 00000000 00000000 00000000 00000000  .*
+ 108d0 00000000 00000000 00000000 00000000  .*
+ 108e0 00000000 00000000                    .*
Index: ld/testsuite/ld-powerpc/tlstocso.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.r,v
retrieving revision 1.3
diff -u -p -r1.3 tlstocso.r
--- ld/testsuite/ld-powerpc/tlstocso.r	16 Jun 2003 10:51:07 -0000	1.3
+++ ld/testsuite/ld-powerpc/tlstocso.r	9 Jul 2003 14:10:47 -0000
@@ -4,146 +4,143 @@
 #readelf: -WSsrl
 #target: powerpc64*-*-*
 
-There are 20 section headers.*
+There are 19 section headers.*
 
 Section Headers:
  +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
  +\[ 0\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
- +\[ 1\] \.hash +HASH +0+120 0+120 0+cc 04 +A +2 +0 +8
- +\[ 2\] \.dynsym +DYNSYM +0+1f0 0+1f0 0+300 18 +A +3 +11 +8
- +\[ 3\] \.dynstr +STRTAB +0+4f0 0+4f0 0+53 0+ +A +0 +0 +1
- +\[ 4\] \.rela\.dyn +RELA +0+548 0+548 0+108 18 +A +2 +0 +8
- +\[ 5\] \.rela\.plt +RELA +0+650 0+650 0+18 18 +A +2 +f +8
- +\[ 6\] \.text +PROGBITS +0+668 0+668 0+bc 0+ +AX +0 +0 +4
- +\[ 7\] \.data +PROGBITS +0+10728 0+728 0+ 0+ +WA +0 +0 +1
- +\[ 8\] \.branch_lt +PROGBITS +0+10728 0+728 0+ 0+ +WA +0 +0 +8
- +\[ 9\] \.tdata +PROGBITS +0+10728 0+728 0+38 0+ WAT +0 +0 +8
- +\[10\] \.tbss +NOBITS +0+10760 0+760 0+38 0+ WAT +0 +0 +8
- +\[11\] \.dynamic +DYNAMIC +0+10760 0+760 0+150 10 +WA +3 +0 +8
- +\[12\] \.got +PROGBITS +0+108b0 0+8b0 0+8 08 +WA +0 +0 +8
- +\[13\] \.toc +PROGBITS +0+108b8 0+8b8 0+50 0+ +WA +0 +0 +1
- +\[14\] \.sbss +PROGBITS +0+10908 0+908 0+ 0+ +W +0 +0 +1
- +\[15\] \.plt +NOBITS +0+10908 0+908 0+30 18 +WA +0 +0 +8
- +\[16\] \.bss +NOBITS +0+10938 0+908 0+ 0+ +WA +0 +0 +1
- +\[17\] \.shstrtab +STRTAB +0+ 0+908 0+87 0+ +0 +0 +1
- +\[18\] \.symtab +SYMTAB +0+ 0+e90 0+420 18 +19 +1d +8
- +\[19\] \.strtab +STRTAB +0+ 0+12b0 0+8c 0+ +0 +0 +1
+ +\[ 1\] \.hash +HASH +0+120 0+120 0+c8 04 +A +2 +0 +8
+ +\[ 2\] \.dynsym +DYNSYM +0+1e8 0+1e8 0+2e8 18 +A +3 +10 +8
+ +\[ 3\] \.dynstr +STRTAB +0+4d0 0+4d0 0+53 0+ +A +0 +0 +1
+ +\[ 4\] \.rela\.dyn +RELA +0+528 0+528 0+108 18 +A +2 +0 +8
+ +\[ 5\] \.rela\.plt +RELA +0+630 0+630 0+18 18 +A +2 +e +8
+ +\[ 6\] \.text +PROGBITS +0+648 0+648 0+bc 0+ +AX +0 +0 +4
+ +\[ 7\] \.data +PROGBITS +0+10708 0+708 0+ 0+ +WA +0 +0 +1
+ +\[ 8\] \.branch_lt +PROGBITS +0+10708 0+708 0+ 0+ +WA +0 +0 +8
+ +\[ 9\] \.tdata +PROGBITS +0+10708 0+708 0+38 0+ WAT +0 +0 +8
+ +\[10\] \.tbss +NOBITS +0+10740 0+740 0+38 0+ WAT +0 +0 +8
+ +\[11\] \.dynamic +DYNAMIC +0+10740 0+740 0+150 10 +WA +3 +0 +8
+ +\[12\] \.got +PROGBITS +0+10890 0+890 0+58 08 +WA +0 +0 +8
+ +\[13\] \.sbss +PROGBITS +0+108e8 0+8e8 0+ 0+ +W +0 +0 +1
+ +\[14\] \.plt +NOBITS +0+108e8 0+8e8 0+30 18 +WA +0 +0 +8
+ +\[15\] \.bss +NOBITS +0+10918 0+8e8 0+ 0+ +WA +0 +0 +1
+ +\[16\] \.shstrtab +STRTAB +0+ 0+8e8 0+82 0+ +0 +0 +1
+ +\[17\] \.symtab +SYMTAB +0+ 0+e30 0+408 18 +18 +1c +8
+ +\[18\] \.strtab +STRTAB +0+ 0+1238 0+8c 0+ +0 +0 +1
 #...
 
 Elf file type is DYN \(Shared object file\)
-Entry point 0x684
+Entry point 0x664
 There are 4 program headers.*
 
 Program Headers:
  +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+724 0x0+724 R E 0x10000
- +LOAD +0x0+728 0x0+10728 0x0+10728 0x0+1e0 0x0+210 RW +0x10000
- +DYNAMIC +0x0+760 0x0+10760 0x0+10760 0x0+150 0x0+150 RW +0x8
- +TLS +0x0+728 0x0+10728 0x0+10728 0x0+38 0x0+70 R +0x8
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+704 0x0+704 R E 0x10000
+ +LOAD +0x0+708 0x0+10708 0x0+10708 0x0+1e0 0x0+210 RW +0x10000
+ +DYNAMIC +0x0+740 0x0+10740 0x0+10740 0x0+150 0x0+150 RW +0x8
+ +TLS +0x0+708 0x0+10708 0x0+10708 0x0+38 0x0+70 R +0x8
 
  Section to Segment mapping:
  +Segment Sections\.\.\.
  +0+ +\.hash \.dynsym \.dynstr \.rela\.dyn \.rela\.plt \.text 
- +01 +\.tdata \.tbss \.dynamic \.got \.toc \.plt 
+ +01 +\.tdata \.tbss \.dynamic \.got \.plt 
  +02 +\.tbss \.dynamic 
  +03 +\.tdata \.tbss 
 
 Relocation section '\.rela\.dyn' at offset .* contains 11 entries:
  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+6d2 +0+1300000045 R_PPC64_TPREL16 +0+60 le0 \+ 0
-0+6d6 +0+1600000048 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
-0+6da +0+1600000046 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
-0+108b8 +0+1200000044 R_PPC64_DTPMOD64 +0+ gd \+ 0
-0+108c0 +0+120000004e R_PPC64_DTPREL64 +0+ gd \+ 0
-0+108c8 +0+1700000044 R_PPC64_DTPMOD64 +0+ ld \+ 0
-0+108d8 +0+1e00000044 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
-0+108e0 +0+1e0000004e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
-0+108e8 +0+1500000044 R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
-0+108f8 +0+190000004e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
-0+10900 +0+1f00000049 R_PPC64_TPREL64 +0+58 ie0 \+ 0
+0+6b2 +0+1200000045 R_PPC64_TPREL16 +0+60 le0 \+ 0
+0+6b6 +0+1500000048 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
+0+6ba +0+1500000046 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
+0+10898 +0+1100000044 R_PPC64_DTPMOD64 +0+ gd \+ 0
+0+108a0 +0+110000004e R_PPC64_DTPREL64 +0+ gd \+ 0
+0+108a8 +0+1600000044 R_PPC64_DTPMOD64 +0+ ld \+ 0
+0+108b8 +0+1d00000044 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
+0+108c0 +0+1d0000004e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
+0+108c8 +0+1400000044 R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
+0+108d8 +0+180000004e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
+0+108e0 +0+1e00000049 R_PPC64_TPREL64 +0+58 ie0 \+ 0
 
 Relocation section '\.rela\.plt' at offset .* contains 1 entries:
  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+10920 +0+1400000015 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
+0+10900 +0+1300000015 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
 
-Symbol table '\.dynsym' contains 32 entries:
+Symbol table '\.dynsym' contains 31 entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
  +0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND 
  +1: 0+120 +0 SECTION LOCAL +DEFAULT +1 
- +2: 0+1f0 +0 SECTION LOCAL +DEFAULT +2 
- +3: 0+4f0 +0 SECTION LOCAL +DEFAULT +3 
- +4: 0+548 +0 SECTION LOCAL +DEFAULT +4 
- +5: 0+650 +0 SECTION LOCAL +DEFAULT +5 
- +6: 0+668 +0 SECTION LOCAL +DEFAULT +6 
- +7: 0+10728 +0 SECTION LOCAL +DEFAULT +7 
- +8: 0+10728 +0 SECTION LOCAL +DEFAULT +8 
- +9: 0+10728 +0 SECTION LOCAL +DEFAULT +9 
- +10: 0+10760 +0 SECTION LOCAL +DEFAULT +10 
- +11: 0+10760 +0 SECTION LOCAL +DEFAULT +11 
- +12: 0+108b0 +0 SECTION LOCAL +DEFAULT +12 
- +13: 0+108b8 +0 SECTION LOCAL +DEFAULT +13 
- +14: 0+10908 +0 SECTION LOCAL +DEFAULT +14 
- +15: 0+10908 +0 SECTION LOCAL +DEFAULT +15 
- +16: 0+10938 +0 SECTION LOCAL +DEFAULT +16 
- +17: 0+10760 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
- +18: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
- +19: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
- +20: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
- +21: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
- +22: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
- +23: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
- +24: 0+684 +0 NOTYPE +GLOBAL DEFAULT +6 _start
- +25: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
- +26: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
- +27: 0+10908 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
- +28: 0+10908 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
- +29: 0+10938 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
- +30: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
- +31: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+ +2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2 
+ +3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3 
+ +4: 0+528 +0 SECTION LOCAL +DEFAULT +4 
+ +5: 0+630 +0 SECTION LOCAL +DEFAULT +5 
+ +6: 0+648 +0 SECTION LOCAL +DEFAULT +6 
+ +7: 0+10708 +0 SECTION LOCAL +DEFAULT +7 
+ +8: 0+10708 +0 SECTION LOCAL +DEFAULT +8 
+ +9: 0+10708 +0 SECTION LOCAL +DEFAULT +9 
+ +10: 0+10740 +0 SECTION LOCAL +DEFAULT +10 
+ +11: 0+10740 +0 SECTION LOCAL +DEFAULT +11 
+ +12: 0+10890 +0 SECTION LOCAL +DEFAULT +12 
+ +13: 0+108e8 +0 SECTION LOCAL +DEFAULT +13 
+ +14: 0+108e8 +0 SECTION LOCAL +DEFAULT +14 
+ +15: 0+10918 +0 SECTION LOCAL +DEFAULT +15 
+ +16: 0+10740 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +17: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+ +18: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+ +19: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +20: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+ +21: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+ +22: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+ +23: 0+664 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+ +24: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+ +25: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+ +26: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+ +27: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+ +28: 0+10918 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+ +29: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+ +30: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
 
-Symbol table '\.symtab' contains 44 entries:
+Symbol table '\.symtab' contains 43 entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
  +0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND 
  +1: 0+120 +0 SECTION LOCAL +DEFAULT +1 
- +2: 0+1f0 +0 SECTION LOCAL +DEFAULT +2 
- +3: 0+4f0 +0 SECTION LOCAL +DEFAULT +3 
- +4: 0+548 +0 SECTION LOCAL +DEFAULT +4 
- +5: 0+650 +0 SECTION LOCAL +DEFAULT +5 
- +6: 0+668 +0 SECTION LOCAL +DEFAULT +6 
- +7: 0+10728 +0 SECTION LOCAL +DEFAULT +7 
- +8: 0+10728 +0 SECTION LOCAL +DEFAULT +8 
- +9: 0+10728 +0 SECTION LOCAL +DEFAULT +9 
- +10: 0+10760 +0 SECTION LOCAL +DEFAULT +10 
- +11: 0+10760 +0 SECTION LOCAL +DEFAULT +11 
- +12: 0+108b0 +0 SECTION LOCAL +DEFAULT +12 
- +13: 0+108b8 +0 SECTION LOCAL +DEFAULT +13 
- +14: 0+10908 +0 SECTION LOCAL +DEFAULT +14 
- +15: 0+10908 +0 SECTION LOCAL +DEFAULT +15 
- +16: 0+10938 +0 SECTION LOCAL +DEFAULT +16 
+ +2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2 
+ +3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3 
+ +4: 0+528 +0 SECTION LOCAL +DEFAULT +4 
+ +5: 0+630 +0 SECTION LOCAL +DEFAULT +5 
+ +6: 0+648 +0 SECTION LOCAL +DEFAULT +6 
+ +7: 0+10708 +0 SECTION LOCAL +DEFAULT +7 
+ +8: 0+10708 +0 SECTION LOCAL +DEFAULT +8 
+ +9: 0+10708 +0 SECTION LOCAL +DEFAULT +9 
+ +10: 0+10740 +0 SECTION LOCAL +DEFAULT +10 
+ +11: 0+10740 +0 SECTION LOCAL +DEFAULT +11 
+ +12: 0+10890 +0 SECTION LOCAL +DEFAULT +12 
+ +13: 0+108e8 +0 SECTION LOCAL +DEFAULT +13 
+ +14: 0+108e8 +0 SECTION LOCAL +DEFAULT +14 
+ +15: 0+10918 +0 SECTION LOCAL +DEFAULT +15 
+ +16: 0+ +0 SECTION LOCAL +DEFAULT +16 
  +17: 0+ +0 SECTION LOCAL +DEFAULT +17 
  +18: 0+ +0 SECTION LOCAL +DEFAULT +18 
- +19: 0+ +0 SECTION LOCAL +DEFAULT +19 
- +20: 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
- +21: 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
- +22: 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
- +23: 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
- +24: 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
- +25: 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
- +26: 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
- +27: 0+10900 +0 NOTYPE +LOCAL +DEFAULT +13 \.Lie0
- +28: 0+668 +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
- +29: 0+10760 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
- +30: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
- +31: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
- +32: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
- +33: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
- +34: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
- +35: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
- +36: 0+684 +0 NOTYPE +GLOBAL DEFAULT +6 _start
- +37: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
- +38: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
- +39: 0+10908 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
- +40: 0+10908 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
- +41: 0+10938 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
- +42: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
- +43: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+ +19: 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
+ +20: 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
+ +21: 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
+ +22: 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
+ +23: 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
+ +24: 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
+ +25: 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
+ +26: 0+108e0 +0 NOTYPE +LOCAL +DEFAULT +12 \.Lie0
+ +27: 0+648 +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
+ +28: 0+10740 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +29: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+ +30: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+ +31: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +32: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+ +33: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+ +34: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+ +35: 0+664 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+ +36: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+ +37: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+ +38: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+ +39: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+ +40: 0+10918 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+ +41: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+ +42: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0

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