+2013-07-02  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
+       .TOC. after relocatable check.
+
 2013-07-01  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.h (ppc64_elf_toc): Delete.
 
                      }
                  }
            }
-         if (h_elf == htab->elf.hgot)
-           {
-             relocation = (TOCstart
-                           + htab->stub_group[input_section->id].toc_off);
-             sec = bfd_abs_section_ptr;
-             unresolved_reloc = FALSE;
-           }
        }
       h = (struct ppc_link_hash_entry *) h_elf;
 
       if (info->relocatable)
        continue;
 
+      if (h != NULL && &h->elf == htab->elf.hgot)
+       {
+         relocation = (TOCstart
+                       + htab->stub_group[input_section->id].toc_off);
+         sec = bfd_abs_section_ptr;
+         unresolved_reloc = FALSE;
+       }
+
       /* TLS optimizations.  Replace instruction sequences and relocs
         based on information we collected in tls_optimize.  We edit
         RELOCS so that --emit-relocs will output something sensible
 
+2013-07-02  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-ppc.c (ppc_elf_adjust_symtab): Don't make .TOC. weak.
+
 2013-06-26  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * doc/as.texinfo (Overview): Remove @samp from MIPS ISA names.
 
          asymbol *bsym = symbol_get_bfdsym (symp);
          if ((bsym->flags & BSF_KEEP) == 0)
            symbol_remove (symp, &symbol_rootP, &symbol_lastP);
-         else
-           S_SET_WEAK (symp);
        }
     }
 }