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 gold work in progress


This is a dump of my current progress at supporting powerpc in gold,
which gets to the point of linking a simple dynamic "hello world"
program on ppc32.  I wrote a lot of this well over a year ago, but
never found the time to test (or enthusiasm to wrestle with C++ - I'd
almost be more comfortable if this was fortran).  ;-)
Anyway, it seems that David and perhaps others are keen to work on
powerpc gold so it would be nice to have this committed sometime
soon.  There is much more to do yet.

Changes to generic code:
- Refactor code in object.cc searching for .eh_frame to allow more
  general use, in my case to find .got2 in each input file.
- Expose class Got_entry so I can extend Output_data_got to place
  the got header anywhere in the got section.

	* object.h (Sized_relobj_file::find_shdr): Two off new functions.
	(Sized_relobj_file::find_special_sections): New function.
	* object.cc (Sized_relobj_file::find_shdr): Two off new functions.
	(Sized_relobj_file::find_eh_frame): Use find_shdr.
	(Sized_relobj_file::find_special_sections): New function, split out..
	(Sized_relobj_file::do_read_symbols): ..from here.
	* output.h (Output_data_got::num_entries): New function.
	(Output_data_got::last_got_offset,set_got_size): Use it.
	(class Got_entry): No longer private.
	* powerpc.cc (class Powerpc_relobj): New.
	(class Powerpc_relocate_functions): Delete all psymval variants or
	convert to value,addend type.  Delete pcrela, pcrela_unaligned.
	Implement _ha functions using corresponding _hi function.
	(Powerpc_relobj::find_special_sections): New function.
	(Target_powerpc::do_make_elf_object): New function.
	(class Output_data_got_powerpc): New.
	(class Output_data_glink): New.
	(class Powerpc_scan_relocatable_reloc): New.
	Many more changes througout file.

Index: gold/object.h
===================================================================
RCS file: /cvs/src/src/gold/object.h,v
retrieving revision 1.117
diff -u -p -r1.117 object.h
--- gold/object.h	26 Apr 2012 00:07:17 -0000	1.117
+++ gold/object.h	9 Aug 2012 12:12:54 -0000
@@ -349,7 +349,7 @@ class Object
       this->input_file_->file().remove_object();
   }
 
-  // Return the name of the object as we would report it to the tuser.
+  // Return the name of the object as we would report it to the user.
   const std::string&
   name() const
   { return this->name_; }
@@ -2116,6 +2116,24 @@ class Sized_relobj_file : public Sized_r
   Address
   map_to_kept_section(unsigned int shndx, bool* found) const;
 
+  // Find the section header with the given SH_NAME.
+  const unsigned char*
+  find_shdr(const unsigned char* pshdrs, elfcpp::Elf_Word sh_name) const;
+
+  // Find the section header with the given NAME.  Ignore headers that
+  // have sh_name less than NAMES + UOFF.  If section header is
+  // found, updates UOFF so that a subsequent call will find the next
+  // match.
+  const unsigned char*
+  find_shdr(const unsigned char* pshdrs, const char *name,
+	    const char* names, section_size_type names_size,
+	    size_t& uoff) const;
+
+  // Stash away info for a number of special sections.
+  // Return true if any of the sections found require local symbols to be read.
+  virtual bool
+  find_special_sections(Read_symbols_data* sd);
+
   // Compute final local symbol value.  R_SYM is the local symbol index.
   // LV_IN points to a local symbol value containing the input value.
   // LV_OUT points to a local symbol value storing the final output value,
Index: gold/object.cc
===================================================================
RCS file: /cvs/src/src/gold/object.cc,v
retrieving revision 1.155
diff -u -p -r1.155 object.cc
--- gold/object.cc	2 May 2012 21:37:23 -0000	1.155
+++ gold/object.cc	9 Aug 2012 12:12:53 -0000
@@ -510,6 +510,53 @@ Sized_relobj_file<size, big_endian>::che
 	  && (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
 }
 
+// Find the section header with the given sh_name.
+
+template<int size, bool big_endian>
+const unsigned char*
+Sized_relobj_file<size, big_endian>::find_shdr(
+    const unsigned char* pshdrs,
+    elfcpp::Elf_Word sh_name) const
+{
+  const unsigned int shnum = this->shnum();
+  const unsigned char* p = pshdrs + This::shdr_size;
+  for (unsigned int i = 1; i < shnum; ++i, p += This::shdr_size)
+    {
+      typename This::Shdr shdr(p);
+      if (shdr.get_sh_name() == sh_name)
+	return p;
+    }
+  return NULL;
+}
+
+// Find the section header with the given name.
+
+template<int size, bool big_endian>
+const unsigned char*
+Sized_relobj_file<size, big_endian>::find_shdr(
+    const unsigned char* pshdrs,
+    const char *name,
+    const char* names,
+    section_size_type names_size,
+    size_t& uoff) const
+{
+  size_t len = strlen(name) + 1;
+  for (const char *p = names + uoff;
+       (p = reinterpret_cast<const char*>(memmem(p, names_size - (p - names),
+						 name, len))) != NULL;
+       p += len)
+    {
+      size_t off = p - names;
+      const unsigned char* s = this->find_shdr(pshdrs, off);
+      if (s != NULL)
+	{
+	  uoff = off + len;
+	  return s;
+	}
+    }
+  return NULL;
+}
+
 // Return whether there is a GNU .eh_frame section, given the section
 // headers and the section names.
 
@@ -520,24 +567,15 @@ Sized_relobj_file<size, big_endian>::fin
     const char* names,
     section_size_type names_size) const
 {
-  const unsigned int shnum = this->shnum();
-  const unsigned char* p = pshdrs + This::shdr_size;
-  for (unsigned int i = 1; i < shnum; ++i, p += This::shdr_size)
+  const unsigned char* s;
+  size_t off = 0;
+
+  while ((s = this->find_shdr(pshdrs, ".eh_frame",
+			      names, names_size, off)) != NULL)
     {
-      typename This::Shdr shdr(p);
+      typename This::Shdr shdr(s);
       if (this->check_eh_frame_flags(&shdr))
-	{
-	  if (shdr.get_sh_name() >= names_size)
-	    {
-	      this->error(_("bad section name offset for section %u: %lu"),
-			  i, static_cast<unsigned long>(shdr.get_sh_name()));
-	      continue;
-	    }
-
-	  const char* name = names + shdr.get_sh_name();
-	  if (strcmp(name, ".eh_frame") == 0)
-	    return true;
-	}
+	return true;
     }
   return false;
 }
@@ -651,39 +689,46 @@ build_compressed_section_map(
   return uncompressed_map;
 }
 
+// Stash away info for a number of special sections.
+// Return true if any of the sections found require local symbols to be read.
+
+template<int size, bool big_endian>
+bool
+Sized_relobj_file<size, big_endian>::find_special_sections(
+    Read_symbols_data* sd)
+{
+  const unsigned char* const pshdrs = sd->section_headers->data();
+  const unsigned char* namesu = sd->section_names->data();
+  const char* names = reinterpret_cast<const char*>(namesu);
+
+  if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
+    this->has_eh_frame_ = true;
+
+  if (memmem(names, sd->section_names_size, ".zdebug_", 8) != NULL)
+    this->compressed_sections_
+      = build_compressed_section_map(pshdrs, this->shnum(), names,
+				     sd->section_names_size, this);
+  return (this->has_eh_frame_
+	  || (!parameters->options().relocatable()
+	      && parameters->options().gdb_index()
+	      && (memmem(names, sd->section_names_size, "debug_info", 12) == 0
+		  || memmem(names, sd->section_names_size, "debug_types",
+			    13) == 0)));
+}
+
 // Read the sections and symbols from an object file.
 
 template<int size, bool big_endian>
 void
 Sized_relobj_file<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
 {
-  bool need_local_symbols = false;
-
   this->read_section_data(&this->elf_file_, sd);
 
   const unsigned char* const pshdrs = sd->section_headers->data();
 
   this->find_symtab(pshdrs);
 
-  const unsigned char* namesu = sd->section_names->data();
-  const char* names = reinterpret_cast<const char*>(namesu);
-  if (memmem(names, sd->section_names_size, ".eh_frame", 10) != NULL)
-    {
-      if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
-	this->has_eh_frame_ = true;
-    }
-  if (memmem(names, sd->section_names_size, ".zdebug_", 8) != NULL)
-    this->compressed_sections_ =
-	build_compressed_section_map(pshdrs, this->shnum(), names,
-				     sd->section_names_size, this);
-
-  if (this->has_eh_frame_
-      || (!parameters->options().relocatable()
-	  && parameters->options().gdb_index()
-	  && (memmem(names, sd->section_names_size, "debug_info", 12) == 0
-	      || memmem(names, sd->section_names_size, "debug_types",
-			13) == 0)))
-    need_local_symbols = true;
+  bool need_local_symbols = this->find_special_sections(sd);
 
   sd->symbols = NULL;
   sd->symbols_size = 0;
Index: gold/output.h
===================================================================
RCS file: /cvs/src/src/gold/output.h,v
retrieving revision 1.135
diff -u -p -r1.135 output.h
--- gold/output.h	10 Jul 2012 14:54:29 -0000	1.135
+++ gold/output.h	9 Aug 2012 12:12:55 -0000
@@ -2276,12 +2276,17 @@ class Output_data_got : public Output_da
   do_print_to_mapfile(Mapfile* mapfile) const
   { mapfile->print_output_data(this, _("** GOT")); }
 
+  // Return the number of words in the GOT.
+  unsigned int
+  num_entries () const
+  { return this->entries_.size(); }
+
   // Reserve the slot at index I in the GOT.
   virtual void
   do_reserve_slot(unsigned int i)
   { this->free_list_.remove(i * got_size / 8, (i + 1) * got_size / 8); }
 
- private:
+ protected:
   // This POD class holds a single GOT entry.
   class Got_entry
   {
@@ -2318,7 +2323,6 @@ class Output_data_got : public Output_da
     void
     write(unsigned char* pov) const;
 
-   private:
     enum
     {
       GSYM_CODE = 0x7fffffff,
@@ -2360,12 +2364,12 @@ class Output_data_got : public Output_da
   // Return the offset into the GOT of the last entry added.
   unsigned int
   last_got_offset() const
-  { return this->got_offset(this->entries_.size() - 1); }
+  { return this->got_offset(this->num_entries() - 1); }
 
   // Set the size of the section.
   void
   set_got_size()
-  { this->set_current_data_size(this->got_offset(this->entries_.size())); }
+  { this->set_current_data_size(this->got_offset(this->num_entries())); }
 
   // The list of GOT entries.
   Got_entries entries_;
Index: gold/powerpc.cc
===================================================================
RCS file: /cvs/src/src/gold/powerpc.cc,v
retrieving revision 1.44
diff -u -p -r1.44 powerpc.cc
--- gold/powerpc.cc	11 Jul 2012 14:18:40 -0000	1.44
+++ gold/powerpc.cc	9 Aug 2012 12:12:55 -0000
@@ -48,6 +48,60 @@ template<int size, bool big_endian>
 class Output_data_plt_powerpc;
 
 template<int size, bool big_endian>
+class Output_data_got_powerpc;
+
+template<int size, bool big_endian>
+class Output_data_glink;
+
+template<int size, bool big_endian>
+class Powerpc_relobj : public Sized_relobj_file<size, big_endian>
+{
+public:
+  Powerpc_relobj(const std::string& name, Input_file* input_file, off_t offset,
+		 const typename elfcpp::Ehdr<size, big_endian>& ehdr)
+    : Sized_relobj_file<size, big_endian>(name, input_file, offset, ehdr),
+      got2_section(0)
+  { }
+
+  ~Powerpc_relobj()
+  { }
+
+  unsigned int
+  got2_shndx() const
+  {
+    if (size == 32)
+      return this->got2_section;
+    else
+      return 0;
+  }
+
+  void
+  set_got2_shndx(unsigned int shndx)
+  {
+    if (size == 32)
+      this->got2_section = shndx;
+    else
+      gold_unreachable();
+  }
+
+  bool
+  find_special_sections(Read_symbols_data* sd);
+
+protected:
+  // Post constructor setup.
+  void
+  do_setup()
+  {
+    // Call parent's setup method.
+    Sized_relobj_file<size, big_endian>::do_setup();
+
+  }
+
+private:
+  unsigned int got2_section;
+};
+
+template<int size, bool big_endian>
 class Target_powerpc : public Sized_target<size, big_endian>
 {
  public:
@@ -55,8 +109,7 @@ class Target_powerpc : public Sized_targ
 
   Target_powerpc()
     : Sized_target<size, big_endian>(&powerpc_info),
-      got_(NULL), got2_(NULL), toc_(NULL),
-      plt_(NULL), rela_dyn_(NULL),
+      got_(NULL), plt_(NULL), glink_(NULL), rela_dyn_(NULL),
       copy_relocs_(elfcpp::R_POWERPC_COPY),
       dynbss_(NULL), got_mod_index_offset_(-1U)
   {
@@ -136,9 +189,9 @@ class Target_powerpc : public Sized_targ
 			   Output_section* output_section,
 			   off_t offset_in_output_section,
 			   const Relocatable_relocs*,
-			   unsigned char* view,
-			   typename elfcpp::Elf_types<size>::Elf_Addr view_address,
-			   section_size_type view_size,
+			   unsigned char*,
+			   typename elfcpp::Elf_types<size>::Elf_Addr,
+			   section_size_type,
 			   unsigned char* reloc_view,
 			   section_size_type reloc_view_size);
 
@@ -146,7 +199,7 @@ class Target_powerpc : public Sized_targ
   bool
   do_is_defined_by_abi(const Symbol* sym) const
   {
-    return strcmp(sym->name(), "___tls_get_addr") == 0;
+    return strcmp(sym->name(), "__tls_get_addr") == 0;
   }
 
   // Return the size of the GOT section.
@@ -157,6 +210,35 @@ class Target_powerpc : public Sized_targ
     return this->got_->data_size();
   }
 
+  // Get the PLT section.
+  const Output_data_plt_powerpc<size, big_endian>*
+  plt_section() const
+  {
+    gold_assert(this->plt_ != NULL);
+    return this->plt_;
+  }
+
+  // Get the .glink section.
+  const Output_data_glink<size, big_endian>*
+  glink_section() const
+  {
+    gold_assert(this->glink_ != NULL);
+    return this->glink_;
+  }
+
+  // Get the GOT section.
+  const Output_data_got_powerpc<size, big_endian>*
+  got_section() const
+  {
+    gold_assert(this->got_ != NULL);
+    return this->got_;
+  }
+
+ protected:
+  Object*
+  do_make_elf_object(const std::string&, Input_file*, off_t,
+		     const elfcpp::Ehdr<size, big_endian>&);
+
   // Return the number of entries in the GOT.
   unsigned int
   got_entry_count() const
@@ -284,45 +366,41 @@ class Target_powerpc : public Sized_targ
   {
    public:
     unsigned int
-    get_size_for_reloc(unsigned int, Relobj*);
+    get_size_for_reloc(unsigned int, Relobj*)
+    {
+      gold_unreachable ();
+      return 0;
+    }
   };
 
+  // Adjust TLS relocation type based on the options and whether this
+  // is a local symbol.
+  static tls::Tls_optimization
+  optimize_tls_reloc(bool is_final, int r_type);
+
   // Get the GOT section, creating it if necessary.
-  Output_data_got<size, big_endian>*
+  Output_data_got_powerpc<size, big_endian>*
   got_section(Symbol_table*, Layout*);
 
-  Output_data_space*
-  got2_section() const
-  {
-    gold_assert(this->got2_ != NULL);
-    return this->got2_;
-  }
+  // Create glink.
+  void
+  make_glink_section(Layout*);
 
-  // Get the TOC section.
-  Output_data_space*
-  toc_section() const
-  {
-    gold_assert(this->toc_ != NULL);
-    return this->toc_;
-  }
+  // Create the PLT section.
+  void
+  make_plt_section(Layout*);
 
   // Create a PLT entry for a global symbol.
   void
-  make_plt_entry(Symbol_table*, Layout*, Symbol*);
+  make_plt_entry(Layout*, Symbol*,
+		 const elfcpp::Rela<size, big_endian>&,
+		 const Sized_relobj<size, big_endian>* object);
 
   // Create a GOT entry for the TLS module index.
   unsigned int
   got_mod_index_entry(Symbol_table* symtab, Layout* layout,
 		      Sized_relobj_file<size, big_endian>* object);
 
-  // Get the PLT section.
-  const Output_data_plt_powerpc<size, big_endian>*
-  plt_section() const
-  {
-    gold_assert(this->plt_ != NULL);
-    return this->plt_;
-  }
-
   // Get the dynamic reloc section, creating it if necessary.
   Reloc_section*
   rela_dyn_section(Layout*);
@@ -355,15 +433,13 @@ class Target_powerpc : public Sized_targ
     GOT_TYPE_TLS_PAIR = 2,      // GOT entry for TLS module/offset pair
   };
 
-  // The GOT section.
-  Output_data_got<size, big_endian>* got_;
-  // The GOT2 section.
-  Output_data_space* got2_;
-  // The TOC section.
-  Output_data_space* toc_;
-  // The PLT section.
+  // The GOT output section.
+  Output_data_got_powerpc<size, big_endian>* got_;
+  // The PLT output section.
   Output_data_plt_powerpc<size, big_endian>* plt_;
-  // The dynamic reloc section.
+  // The .glink output section.
+  Output_data_glink<size, big_endian>* glink_;
+  // The dynamic reloc output section.
   Reloc_section* rela_dyn_;
   // Relocs saved to avoid a COPY reloc.
   Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
@@ -481,7 +557,7 @@ template<int size, bool big_endian>
 class Powerpc_relocate_functions
 {
 private:
-  // Do a simple relocation with the addend in the relocation.
+  // Do a simple RELA relocation
   template<int valsize>
   static inline void
   rela(unsigned char* view,
@@ -493,29 +569,7 @@ private:
     typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
     Valtype* wv = reinterpret_cast<Valtype*>(view);
     Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
-    Valtype reloc = ((value + addend) >> right_shift);
-
-    val &= ~dst_mask;
-    reloc &= dst_mask;
-
-    elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
-  }
-
-  // Do a simple relocation using a symbol value with the addend in
-  // the relocation.
-  template<int valsize>
-  static inline void
-  rela(unsigned char* view,
-       unsigned int right_shift,
-       elfcpp::Elf_Xword dst_mask,
-       const Sized_relobj_file<size, big_endian>* object,
-       const Symbol_value<size>* psymval,
-       typename elfcpp::Swap<valsize, big_endian>::Valtype addend)
-  {
-    typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
-    Valtype* wv = reinterpret_cast<Valtype*>(view);
-    Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
-    Valtype reloc = (psymval->value(object, addend) >> right_shift);
+    Valtype reloc = (value + addend) >> right_shift;
 
     val &= ~dst_mask;
     reloc &= dst_mask;
@@ -523,65 +577,25 @@ private:
     elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
   }
 
-  // Do a simple relocation using a symbol value with the addend in
-  // the relocation, unaligned.
+  // Do a simple RELA relocation, unaligned.
   template<int valsize>
   static inline void
-  rela_ua(unsigned char* view, unsigned int right_shift,
+  rela_ua(unsigned char* view,
+	  unsigned int right_shift,
 	  elfcpp::Elf_Xword dst_mask,
-	  const Sized_relobj_file<size, big_endian>* object,
-	  const Symbol_value<size>* psymval,
+	  typename elfcpp::Swap<size, big_endian>::Valtype value,
 	  typename elfcpp::Swap<size, big_endian>::Valtype addend)
   {
     typedef typename elfcpp::Swap_unaligned<valsize,
-	    big_endian>::Valtype Valtype;
-    unsigned char* wv = view;
-    Valtype val = elfcpp::Swap_unaligned<valsize, big_endian>::readval(wv);
-    Valtype reloc = (psymval->value(object, addend) >> right_shift);
-
-    val &= ~dst_mask;
-    reloc &= dst_mask;
-
-    elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv, val | reloc);
-  }
-
-  // Do a simple PC relative relocation with a Symbol_value with the
-  // addend in the relocation.
-  template<int valsize>
-  static inline void
-  pcrela(unsigned char* view, unsigned int right_shift,
-	 elfcpp::Elf_Xword dst_mask,
-	 const Sized_relobj_file<size, big_endian>* object,
-	 const Symbol_value<size>* psymval,
-	 typename elfcpp::Swap<size, big_endian>::Valtype addend,
-	 typename elfcpp::Elf_types<size>::Elf_Addr address)
-  {
-    typedef typename elfcpp::Swap<valsize, big_endian>::Valtype Valtype;
+					    big_endian>::Valtype Valtype;
     Valtype* wv = reinterpret_cast<Valtype*>(view);
     Valtype val = elfcpp::Swap<valsize, big_endian>::readval(wv);
-    Valtype reloc = ((psymval->value(object, addend) - address)
-		     >> right_shift);
+    Valtype reloc = (value + addend) >> right_shift;
 
     val &= ~dst_mask;
     reloc &= dst_mask;
 
-    elfcpp::Swap<valsize, big_endian>::writeval(wv, val | reloc);
-  }
-
-  template<int valsize>
-  static inline void
-  pcrela_unaligned(unsigned char* view,
-		   const Sized_relobj_file<size, big_endian>* object,
-		   const Symbol_value<size>* psymval,
-		   typename elfcpp::Swap<size, big_endian>::Valtype addend,
-		   typename elfcpp::Elf_types<size>::Elf_Addr address)
-  {
-    typedef typename elfcpp::Swap_unaligned<valsize,
-	    big_endian>::Valtype Valtype;
-    unsigned char* wv = view;
-    Valtype reloc = (psymval->value(object, addend) - address);
-
-    elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv, reloc);
+    elfcpp::Swap_unaligned<valsize, big_endian>::writeval(wv, val | reloc);
   }
 
   typedef Powerpc_relocate_functions<size, big_endian> This;
@@ -590,34 +604,29 @@ public:
   // R_POWERPC_REL32: (Symbol + Addend - Address)
   static inline void
   rel32(unsigned char* view,
-	const Sized_relobj_file<size, big_endian>* object,
-	const Symbol_value<size>* psymval,
+	typename elfcpp::Elf_types<size>::Elf_Addr value,
 	typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	typename elfcpp::Elf_types<size>::Elf_Addr address)
-  { This_reloc::pcrela32(view, object, psymval, addend, address); }
+  { This_reloc::pcrela32(view, value, addend, address); }
 
   // R_POWERPC_REL24: (Symbol + Addend - Address) & 0x3fffffc
   static inline void
   rel24(unsigned char* view,
-	const Sized_relobj_file<size, big_endian>* object,
-	const Symbol_value<size>* psymval,
+	typename elfcpp::Elf_types<size>::Elf_Addr value,
 	typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	typename elfcpp::Elf_types<size>::Elf_Addr address)
   {
-    This::template pcrela<32>(view, 0, 0x03fffffc, object,
-			      psymval, addend, address);
+    This::template rela<32>(view, 0, 0x03fffffc, value - address, addend);
   }
 
   // R_POWERPC_REL14: (Symbol + Addend - Address) & 0xfffc
   static inline void
   rel14(unsigned char* view,
-	const Sized_relobj_file<size, big_endian>* object,
-	const Symbol_value<size>* psymval,
+	typename elfcpp::Elf_types<size>::Elf_Addr value,
 	typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	typename elfcpp::Elf_types<size>::Elf_Addr address)
   {
-    This::template pcrela<32>(view, 0, 0x0000fffc, object,
-			      psymval, addend, address);
+    This::template rela<32>(view, 0, 0xfffc, value - address, addend);
   }
 
   // R_POWERPC_ADDR16: (Symbol + Addend) & 0xffff
@@ -627,13 +636,6 @@ public:
 	 typename elfcpp::Elf_types<size>::Elf_Addr addend)
   { This_reloc::rela16(view, value, addend); }
 
-  static inline void
-  addr16(unsigned char* view,
-	 const Sized_relobj_file<size, big_endian>* object,
-	 const Symbol_value<size>* psymval,
-	 typename elfcpp::Elf_types<size>::Elf_Addr addend)
-  { This_reloc::rela16(view, object, psymval, addend); }
-
   // R_POWERPC_ADDR16_DS: (Symbol + Addend) & 0xfffc
   static inline void
   addr16_ds(unsigned char* view,
@@ -650,13 +652,6 @@ public:
 	 typename elfcpp::Elf_types<size>::Elf_Addr addend)
   { This_reloc::rela16(view, value, addend); }
 
-  static inline void
-  addr16_lo(unsigned char* view,
-	    const Sized_relobj_file<size, big_endian>* object,
-	    const Symbol_value<size>* psymval,
-	    typename elfcpp::Elf_types<size>::Elf_Addr addend)
-  { This_reloc::rela16(view, object, psymval, addend); }
-
   // R_POWERPC_ADDR16_HI: ((Symbol + Addend) >> 16) & 0xffff
   static inline void
   addr16_hi(unsigned char* view,
@@ -666,15 +661,6 @@ public:
     This::template rela<16>(view, 16, 0xffff, value, addend);
   }
 
-  static inline void
-  addr16_hi(unsigned char* view,
-	    const Sized_relobj_file<size, big_endian>* object,
-	    const Symbol_value<size>* psymval,
-	    typename elfcpp::Elf_types<size>::Elf_Addr addend)
-  {
-    This::template rela<16>(view, 16, 0xffff, object, psymval, addend);
-  }
-
   // R_POWERPC_ADDR16_HA: Same as R_POWERPC_ADDR16_HI except that if the
   //                      final value of the low 16 bits of the
   //                      relocation is negative, add one.
@@ -683,62 +669,33 @@ public:
 	    typename elfcpp::Elf_types<size>::Elf_Addr value,
 	    typename elfcpp::Elf_types<size>::Elf_Addr addend)
   {
-    typename elfcpp::Elf_types<size>::Elf_Addr reloc;
-
-    reloc = value + addend;
-
-    if (reloc & 0x8000)
-      reloc += 0x10000;
-    reloc >>= 16;
-
-    elfcpp::Swap<16, big_endian>::writeval(view, reloc);
-  }
-
-  static inline void
-  addr16_ha(unsigned char* view,
-	    const Sized_relobj_file<size, big_endian>* object,
-	    const Symbol_value<size>* psymval,
-	    typename elfcpp::Elf_types<size>::Elf_Addr addend)
-  {
-    typename elfcpp::Elf_types<size>::Elf_Addr reloc;
-
-    reloc = psymval->value(object, addend);
-
-    if (reloc & 0x8000)
-      reloc += 0x10000;
-    reloc >>= 16;
-
-    elfcpp::Swap<16, big_endian>::writeval(view, reloc);
+    This::addr16_hi (view, value + 0x8000, addend);
   }
 
   // R_PPC_REL16: (Symbol + Addend - Address) & 0xffff
   static inline void
   rel16(unsigned char* view,
-	const Sized_relobj_file<size, big_endian>* object,
-	const Symbol_value<size>* psymval,
+	typename elfcpp::Elf_types<size>::Elf_Addr value,
 	typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	typename elfcpp::Elf_types<size>::Elf_Addr address)
-  { This_reloc::pcrela16(view, object, psymval, addend, address); }
+  { This_reloc::pcrela16(view, value, addend, address); }
 
   // R_PPC_REL16_LO: (Symbol + Addend - Address) & 0xffff
   static inline void
   rel16_lo(unsigned char* view,
-	   const Sized_relobj_file<size, big_endian>* object,
-	   const Symbol_value<size>* psymval,
+	   typename elfcpp::Elf_types<size>::Elf_Addr value,
 	   typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	   typename elfcpp::Elf_types<size>::Elf_Addr address)
-  { This_reloc::pcrela16(view, object, psymval, addend, address); }
+  { This_reloc::pcrela16(view, value, addend, address); }
 
   // R_PPC_REL16_HI: ((Symbol + Addend - Address) >> 16) & 0xffff
   static inline void
   rel16_hi(unsigned char* view,
-	   const Sized_relobj_file<size, big_endian>* object,
-	   const Symbol_value<size>* psymval,
+	   typename elfcpp::Elf_types<size>::Elf_Addr value,
 	   typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	   typename elfcpp::Elf_types<size>::Elf_Addr address)
-  {
-    This::template pcrela<16>(view, 16, 0xffff, object,
-			      psymval, addend, address);
+  { 
+    This::template rela<16>(view, 16, 0xffff, value - address, addend);
   }
 
   // R_PPC_REL16_HA: Same as R_PPC_REL16_HI except that if the
@@ -746,26 +703,187 @@ public:
   //                 relocation is negative, add one.
   static inline void
   rel16_ha(unsigned char* view,
-	   const Sized_relobj_file<size, big_endian>* object,
-	   const Symbol_value<size>* psymval,
+	   typename elfcpp::Elf_types<size>::Elf_Addr value,
 	   typename elfcpp::Elf_types<size>::Elf_Addr addend,
 	   typename elfcpp::Elf_types<size>::Elf_Addr address)
+  { 
+    This::rel16_hi(view, value + 0x8000, addend, address);
+  }
+};
+
+// Stash away the index of .got2 in a relocatable object, if such
+// a section exists.
+
+template<int size, bool big_endian>
+bool
+Powerpc_relobj<size, big_endian>::find_special_sections(
+    Read_symbols_data* sd)
+{
+  if (size == 32)
+    {
+      const unsigned char* const pshdrs = sd->section_headers->data();
+      const unsigned char* namesu = sd->section_names->data();
+      const char* names = reinterpret_cast<const char*>(namesu);
+      section_size_type names_size = sd->section_names_size;
+      const unsigned char* s;
+      size_t off = 0;
+
+      s = this->find_shdr(pshdrs, ".got2", names, names_size, off);
+      if (s != NULL)
+	{
+	  unsigned int ndx = (s - pshdrs) / elfcpp::Elf_sizes<size>::shdr_size;
+	  this->set_got2_shndx (ndx);
+	}
+    }
+  return Sized_relobj_file<size, big_endian>::find_special_sections(sd);
+}
+
+// Set up PowerPC target specific relobj.
+
+template<int size, bool big_endian>
+Object*
+Target_powerpc<size, big_endian>::do_make_elf_object(
+    const std::string& name,
+    Input_file* input_file,
+    off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr)
+{
+  int et = ehdr.get_e_type();
+  if (et == elfcpp::ET_REL)
+    {
+      Powerpc_relobj<size, big_endian>* obj =
+        new Powerpc_relobj<size, big_endian>(name, input_file, offset, ehdr);
+      obj->setup();
+      return obj;
+    }
+  else if (et == elfcpp::ET_DYN)
+    {
+      Sized_dynobj<size, big_endian>* obj =
+        new Sized_dynobj<size, big_endian>(name, input_file, offset, ehdr);
+      obj->setup();
+      return obj;
+    }
+  else
+    {
+      gold_error(_("%s: unsupported ELF file type %d"),
+                 name.c_str(), et);
+      return NULL;
+    }
+}
+
+template<int size, bool big_endian>
+class Output_data_got_powerpc : public Output_data_got<size, big_endian>
+{
+public:
+  typedef typename elfcpp::Elf_types<size>::Elf_Addr Valtype;
+  typedef Output_data_reloc<elfcpp::SHT_RELA, true, size, big_endian> Rela_dyn;
+
+  Output_data_got_powerpc(Symbol_table* symtab, Layout* layout)
+    : Output_data_got<size, big_endian>(),
+      symtab_(symtab), layout_(layout),
+      header_ent_cnt_(size == 32 ? 3 : 1),
+      header_index_(size == 32 ? 0x2000 : 0)
+  {}
+
+  class Got_entry;
+
+  // Create a new GOT entry and return its offset.
+  unsigned int
+  add_got_entry(Got_entry got_entry)
   {
-    typename elfcpp::Elf_types<size>::Elf_Addr reloc;
+    this->reserve_ent();
+    return Output_data_got<size, big_endian>::add_got_entry(got_entry);
+  }
+
+  // Create a pair of new GOT entries and return the offset of the first.
+  unsigned int
+  add_got_entry_pair(Got_entry got_entry_1, Got_entry got_entry_2)
+  {
+    this->reserve_ent(2);
+    return Output_data_got<size, big_endian>::add_got_entry_pair(got_entry_1,
+								 got_entry_2);
+  }
+
+  // Value of _GLOBAL_OFFSET_TABLE_
+  unsigned int
+  g_o_t() const
+  {
+    return this->got_offset(this->header_index_);
+  }
+
+  // Ensure our GOT has a header.
+  void
+  set_final_data_size()
+  {
+    if (this->header_ent_cnt_ != 0)
+      this->make_header();
+    Output_data_got<size, big_endian>::set_final_data_size();
+  }
+
+  // First word of GOT header needs some values that are not
+  // handled by Output_data_got so poke them in here.
+  // For 32-bit, address of .dynamic, for 64-bit, address of TOCbase.
+  void
+  do_write(Output_file* of)
+  {
+    gold_assert(this->num_entries() > this->header_index_
+		&& (this->entries_[this->header_index_].local_sym_index_
+		    == Output_data_got<size, big_endian>::Got_entry::CONSTANT_CODE));
+    this->entries_[this->header_index_].u_.constant
+      = (size == 32
+	 ? this->layout_->dynamic_section()->address()
+	 : this->address() + 0x8000);
 
-    reloc = (psymval->value(object, addend) - address);
-    if (reloc & 0x8000)
-      reloc += 0x10000;
-    reloc >>= 16;
+    Output_data_got<size, big_endian>::do_write(of);
+  }
+
+private:
+  void
+  reserve_ent(unsigned int cnt = 1)
+  {
+    if (this->header_ent_cnt_ == 0)
+      return;
+    if (this->num_entries() + cnt > this->header_index_)
+      this->make_header();
+  }
 
-    elfcpp::Swap<16, big_endian>::writeval(view, reloc);
+  void
+  make_header()
+  {
+    this->header_ent_cnt_ = 0;
+    this->header_index_ = this->num_entries();
+    if (size == 32)
+      {
+	Output_data_got<size, big_endian>::add_constant(0);
+	Output_data_got<size, big_endian>::add_constant(0);
+	Output_data_got<size, big_endian>::add_constant(0);
+
+	// Define _GLOBAL_OFFSET_TABLE_ at the header
+	this->symtab_->define_in_output_data("_GLOBAL_OFFSET_TABLE_", NULL,
+					     Symbol_table::PREDEFINED,
+					     this, this->g_o_t(), 0,
+					     elfcpp::STT_OBJECT,
+					     elfcpp::STB_LOCAL,
+					     elfcpp::STV_HIDDEN,
+					     0, false, false);
+      }
+    else
+      Output_data_got<size, big_endian>::add_constant(0);
   }
+
+  // Stashed pointers.
+  Symbol_table* symtab_;
+  Layout* layout_;
+
+  // GOT header size.
+  unsigned int header_ent_cnt_;
+  // GOT header index.
+  unsigned int header_index_;
 };
 
 // Get the GOT section, creating it if necessary.
 
 template<int size, bool big_endian>
-Output_data_got<size, big_endian>*
+Output_data_got_powerpc<size, big_endian>*
 Target_powerpc<size, big_endian>::got_section(Symbol_table* symtab,
 					      Layout* layout)
 {
@@ -773,38 +891,12 @@ Target_powerpc<size, big_endian>::got_se
     {
       gold_assert(symtab != NULL && layout != NULL);
 
-      this->got_ = new Output_data_got<size, big_endian>();
+      this->got_
+	= new Output_data_got_powerpc<size, big_endian>(symtab, layout);
 
       layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
 				      elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE,
 				      this->got_, ORDER_DATA, false);
-
-      // Create the GOT2 or TOC in the .got section.
-      if (size == 32)
-	{
-	  this->got2_ = new Output_data_space(4, "** GOT2");
-	  layout->add_output_section_data(".got2", elfcpp::SHT_PROGBITS,
-					  elfcpp::SHF_ALLOC
-					  | elfcpp::SHF_WRITE,
-					  this->got2_, ORDER_DATA, false);
-	}
-      else
-	{
-	  this->toc_ = new Output_data_space(8, "** TOC");
-	  layout->add_output_section_data(".toc", elfcpp::SHT_PROGBITS,
-					  elfcpp::SHF_ALLOC
-					  | elfcpp::SHF_WRITE,
-					  this->toc_, ORDER_DATA, false);
-	}
-
-      // Define _GLOBAL_OFFSET_TABLE_ at the start of the .got section.
-      symtab->define_in_output_data("_GLOBAL_OFFSET_TABLE_", NULL,
-				    Symbol_table::PREDEFINED,
-				    this->got_,
-				    0, 0, elfcpp::STT_OBJECT,
-				    elfcpp::STB_LOCAL,
-				    elfcpp::STV_HIDDEN, 0,
-				    false, false);
     }
 
   return this->got_;
@@ -830,70 +922,70 @@ Target_powerpc<size, big_endian>::rela_d
 // A class to handle the PLT data.
 
 template<int size, bool big_endian>
-class Output_data_plt_powerpc : public Output_section_data
+class Output_data_plt_powerpc : public Output_section_data_build
 {
  public:
   typedef Output_data_reloc<elfcpp::SHT_RELA, true,
 			    size, big_endian> Reloc_section;
 
-  Output_data_plt_powerpc(Layout*);
+  Output_data_plt_powerpc(Layout*, Target_powerpc<size, big_endian>*);
 
   // Add an entry to the PLT.
-  void add_entry(Symbol* gsym);
+  void
+  add_entry(Symbol*);
 
   // Return the .rela.plt section data.
-  const Reloc_section* rel_plt() const
- {
+  const Reloc_section*
+  rel_plt() const
+  {
     return this->rel_;
   }
 
   // Return the number of PLT entries.
   unsigned int
   entry_count() const
-  { return this->count_; }
+  { return (this->current_data_size() - initial_plt_entry_size) / plt_entry_size; }
 
   // Return the offset of the first non-reserved PLT entry.
   static unsigned int
   first_plt_entry_offset()
-  { return 4 * base_plt_entry_size; }
+  { return initial_plt_entry_size; }
 
   // Return the size of a PLT entry.
   static unsigned int
   get_plt_entry_size()
-  { return base_plt_entry_size; }
+  { return plt_entry_size; }
 
  protected:
-  void do_adjust_output_section(Output_section* os);
-
- private:
-  // The size of an entry in the PLT.
-  static const int base_plt_entry_size = (size == 32 ? 16 : 24);
-
-  // Set the final size.
   void
-  set_final_data_size()
+  do_adjust_output_section(Output_section* os)
   {
-    unsigned int full_count = this->count_ + 4;
-
-    this->set_data_size(full_count * base_plt_entry_size);
+    os->set_entsize(0);
   }
 
+ private:
+  // The size of an entry in the PLT.
+  static const int plt_entry_size = size == 32 ? 4 : 24;
+  // The size of the first reserved entry.
+  static const int initial_plt_entry_size = size == 32 ? 0 : 24;
+
   // Write out the PLT data.
   void
   do_write(Output_file*);
 
   // The reloc section.
   Reloc_section* rel_;
-  // The number of PLT entries.
-  unsigned int count_;
+  // Allows access to .glink for do_write.
+  Target_powerpc<size, big_endian>* targ_;
 };
 
-// Create the PLT section.  The ordinary .got section is an argument,
-// since we need to refer to the start.
+// Create the PLT section.
 
 template<int size, bool big_endian>
-Output_data_plt_powerpc<size, big_endian>::Output_data_plt_powerpc(Layout* layout)
-  : Output_section_data(size == 32 ? 4 : 8), count_(0)
+Output_data_plt_powerpc<size, big_endian>::Output_data_plt_powerpc(Layout* layout,
+								   Target_powerpc<size, big_endian>* targ)
+  : Output_section_data_build(size == 32 ? 4 : 8),
+    targ_(targ)
 {
   this->rel_ = new Reloc_section(false);
   layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
@@ -901,35 +993,24 @@ Output_data_plt_powerpc<size, big_endian
 				  ORDER_DYNAMIC_PLT_RELOCS, false);
 }
 
-template<int size, bool big_endian>
-void
-Output_data_plt_powerpc<size, big_endian>::do_adjust_output_section(Output_section* os)
-{
-  os->set_entsize(0);
-}
-
 // Add an entry to the PLT.
 
 template<int size, bool big_endian>
 void
 Output_data_plt_powerpc<size, big_endian>::add_entry(Symbol* gsym)
 {
-  gold_assert(!gsym->has_plt_offset());
-  unsigned int index = this->count_+ + 4;
-  section_offset_type plt_offset;
-
-  if (index < 8192)
-    plt_offset = index * base_plt_entry_size;
-  else
-    gold_unreachable();
-
-  gsym->set_plt_offset(plt_offset);
-
-  ++this->count_;
+  if (!gsym->has_plt_offset())
+    {
+      off_t off = this->current_data_size();
 
-  gsym->set_needs_dynsym_entry();
-  this->rel_->add_global(gsym, elfcpp::R_POWERPC_JMP_SLOT, this,
-			 plt_offset, 0);
+      if (off == 0)
+	off += initial_plt_entry_size;
+      gsym->set_plt_offset(off);
+      gsym->set_needs_dynsym_entry();
+      this->rel_->add_global(gsym, elfcpp::R_POWERPC_JMP_SLOT, this, off, 0);
+      off += plt_entry_size;
+      this->set_current_data_size(off);
+    }
 }
 
 static const unsigned int addis_11_11     = 0x3d6b0000;
@@ -941,6 +1022,7 @@ static const unsigned int add_11_0_11   
 static const unsigned int b               = 0x48000000;
 static const unsigned int bcl_20_31       = 0x429f0005;
 static const unsigned int bctr            = 0x4e800420;
+static const unsigned int blrl            = 0x4e800021;
 static const unsigned int lis_11          = 0x3d600000;
 static const unsigned int lis_12          = 0x3d800000;
 static const unsigned int lwzu_0_12       = 0x840c0000;
@@ -955,13 +1037,21 @@ static const unsigned int mtctr_11      
 static const unsigned int mtlr_0          = 0x7c0803a6;
 static const unsigned int nop             = 0x60000000;
 static const unsigned int sub_11_11_12    = 0x7d6c5850;
-
-static const unsigned int addis_r12_r2    = 0x3d820000;  /* addis %r12,%r2,xxx@ha     */
-static const unsigned int std_r2_40r1     = 0xf8410028;  /* std   %r2,40(%r1)         */
-static const unsigned int ld_r11_0r12     = 0xe96c0000;  /* ld    %r11,xxx+0@l(%r12)  */
-static const unsigned int ld_r2_0r12      = 0xe84c0000;  /* ld    %r2,xxx+8@l(%r12)   */
-							 /* ld    %r11,xxx+16@l(%r12) */
-
+static const unsigned int addis_12_2      = 0x3d820000;
+static const unsigned int std_2_1         = 0xf8410000;
+static const unsigned int ld_11_12        = 0xe96c0000;
+static const unsigned int ld_2_12         = 0xe84c0000;
+static const unsigned int addi_12_12      = 0x398c0000;
+static const unsigned int ld_11_2         = 0xe9620000;
+static const unsigned int addi_2_2        = 0x38420000;
+static const unsigned int ld_2_2          = 0xe8420000;
+static const unsigned int mflr_11         = 0x7d6802a6;
+static const unsigned int ld_2_11         = 0xe84b0000;
+static const unsigned int mtlr_12         = 0x7d8803a6;
+static const unsigned int add_12_2_11     = 0x7d825a14;
+static const unsigned int li_0_0          = 0x38000000;
+static const unsigned int lis_0_0         = 0x3c000000;
+static const unsigned int ori_0_0_0       = 0x60000000;
 
 // Write out the PLT.
 
@@ -969,82 +1059,533 @@ template<int size, bool big_endian>
 void
 Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of)
 {
-  const off_t offset = this->offset();
+  if (size == 32)
+    {
+      const off_t offset = this->offset();
+      const section_size_type oview_size
+	= convert_to_section_size_type(this->data_size());
+      unsigned char* const oview = of->get_output_view(offset, oview_size);
+      unsigned char* pov = oview;
+      unsigned char* endpov = oview + oview_size;
+
+      // The address the .glink branch table
+      const Output_data_glink<size, big_endian>* glink
+	= this->targ_->glink_section();
+      elfcpp::Elf_types<32>::Elf_Addr branch_tab
+	= glink->address() + glink->pltresolve();
+
+      while (pov < endpov)
+	{
+	  elfcpp::Swap<32, big_endian>::writeval(pov, branch_tab);
+	  pov += 4;
+	  branch_tab += 4;
+	}
+
+      of->write_output_view(offset, oview_size, oview);
+    }
+}
+
+// Create the PLT section.
+
+template<int size, bool big_endian>
+void
+Target_powerpc<size, big_endian>::make_plt_section(Layout* layout)
+{
+  if (this->plt_ == NULL)
+    {
+      if (this->glink_ == NULL)
+	make_glink_section(layout);
+
+      // Ensure that .rela.dyn always appears before .rela.plt  This is
+      // necessary due to how, on PowerPC and some other targets, .rela.dyn
+      // needs to include .rela.plt in it's range.
+      this->rela_dyn_section(layout);
+
+      this->plt_ = new Output_data_plt_powerpc<size, big_endian>(layout, this);
+      layout->add_output_section_data(".plt",
+				      (size == 32
+				       ? elfcpp::SHT_PROGBITS
+				       : elfcpp::SHT_NOBITS),
+				      elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE,
+				      this->plt_,
+				      (size == 32
+				       ? ORDER_SMALL_DATA
+				       : ORDER_SMALL_BSS),
+				      false);
+    }
+}
+
+// A class to handle .glink.
+
+template<int size, bool big_endian>
+class Output_data_glink : public Output_section_data
+{
+ public:
+  Output_data_glink(Target_powerpc<size, big_endian>*);
+
+  // Add an entry
+  void
+  add_entry(const Symbol*, const elfcpp::Rela<size, big_endian>&,
+	    const Sized_relobj<size, big_endian>*, unsigned int);
+
+  unsigned int
+  find_entry(const Symbol*, const elfcpp::Rela<size, big_endian>&,
+	     const Sized_relobj<size, big_endian>*, unsigned int) const;
+
+  unsigned int
+  glink_entry_size() const
+  {
+    if (size == 32)
+      return 4 * 4;
+    else
+      // FIXME: We should be using multiple glink sections for
+      // stubs to support > 33M applications.
+      return 8 * 4;
+  }
+
+  off_t
+  pltresolve() const
+  {
+    return this->pltresolve_;
+  }
+
+ private:
+  static const int pltresolve_size = 16*4;
+
+  void
+  set_final_data_size();
+
+  // Write out .glink
+  void
+  do_write(Output_file*);
+
+  struct Glink_sym_ent
+  {
+    Glink_sym_ent(const Symbol *sym,
+		  const elfcpp::Rela<size, big_endian>& reloc,
+		  const Sized_relobj<size, big_endian>* object,
+		  unsigned int shndx)
+      : sym_(sym), object_(0), shndx_(0), addend_(0)
+    {
+      if (size != 32)
+	this->addend_ = reloc.get_r_addend();
+      else if (parameters->options().output_is_position_independent())
+	{
+	  if (object != NULL && shndx != 0)
+	    this->addend_ = reloc.get_r_addend();
+	  if (this->addend_ != 0)
+	    {
+	      this->object_ = object;
+	      this->shndx_ = shndx;
+	    }
+	}
+    }
+
+    const Symbol *sym_;
+    const Sized_relobj<size, big_endian>* object_;
+    unsigned int shndx_;
+    unsigned int addend_;
+
+    bool operator==(const Glink_sym_ent& that) const
+    {
+      return (this->sym_ == that.sym_
+	      && this->object_ == that.object_
+              && this->shndx_ == that.shndx_
+              && this->addend_ == that.addend_);
+    }
+  };
+
+  struct Glink_sym_ent_hash
+  {
+    size_t operator()(const Glink_sym_ent& ent) const
+    {
+      return (reinterpret_cast<uintptr_t>(ent.sym_)
+	      ^ reinterpret_cast<uintptr_t>(ent.object_)
+	      ^ ent.shndx_
+	      ^ ent.addend_);
+    }
+  };
+
+  // Set of sym/shndx/addend entries.
+  typedef Unordered_map<Glink_sym_ent, unsigned int,
+			Glink_sym_ent_hash> Glink_entries;
+  Glink_entries glink_entries_;
+
+  // Offset of pltresolve stub (actually, branch table for 32-bit)
+  off_t pltresolve_;
+
+  // Allows access to .got and .plt for do_write.
+  Target_powerpc<size, big_endian>* targ_;
+};
+
+// Create the glink section.
+
+template<int size, bool big_endian>
+Output_data_glink<size, big_endian>::Output_data_glink(Target_powerpc<size, big_endian>* targ)
+  : Output_section_data(16),
+    pltresolve_(0), targ_(targ)
+{
+}
+
+// Add an entry to glink, if we do not already have one for this
+// sym/addend/shndx combo.
+
+template<int size, bool big_endian>
+void
+Output_data_glink<size, big_endian>
+::add_entry(const Symbol* gsym,
+	    const elfcpp::Rela<size, big_endian>& reloc,
+	    const Sized_relobj<size, big_endian>* object,
+	    unsigned int shndx)
+{
+  Glink_sym_ent ent(gsym, reloc, object, shndx);
+  unsigned int indx = this->glink_entries_.size();
+  this->glink_entries_[ent] = indx;
+}
+
+template<int size, bool big_endian>
+unsigned int
+Output_data_glink<size, big_endian>
+::find_entry(const Symbol* gsym,
+	     const elfcpp::Rela<size, big_endian>& reloc,
+	     const Sized_relobj<size, big_endian>* object,
+	     unsigned int shndx) const
+{
+  Glink_sym_ent ent(gsym, reloc, object, shndx);
+  typename Glink_entries::const_iterator p = this->glink_entries_.find(ent);
+  gold_assert(p != this->glink_entries_.end());
+  return p->second;
+}
+
+template<int size, bool big_endian>
+void
+Output_data_glink<size, big_endian>::set_final_data_size()
+{
+  unsigned int count = this->glink_entries_.size();
+  off_t total = count;
+
+  if (count != 0)
+    {
+      if (size == 32)
+	{
+	  total *= 16;
+	  this->pltresolve_ = total;
+
+	  // space for branch table
+	  total += 4 * (count - 1);
+
+	  total += -total & 15;
+	  total += this->pltresolve_size;
+	}
+      else
+	{
+	  total *= 32;
+	  this->pltresolve_ = total;
+	  total += this->pltresolve_size;
+
+	  // space for branch table
+	  total += 8 * count;
+	  if (count > 0x8000)
+	    total += 4 * (count - 0x8000);
+	}
+    }
+
+  this->set_data_size(total);
+}
+
+static inline uint32_t
+l(uint32_t a)
+{
+  return a & 0xffff;
+}
+
+static inline uint32_t
+hi(uint32_t a)
+{
+  return l(a >> 16);
+}
+
+static inline uint32_t
+ha(uint32_t a)
+{
+  return hi(a + 0x8000);
+}
+
+template<bool big_endian>
+static inline void
+write_insn(unsigned char *p, uint32_t v)
+{
+  elfcpp::Swap<32, big_endian>::writeval(p, v);
+}
+
+// Write out .glink.
+
+template<int size, bool big_endian>
+void
+Output_data_glink<size, big_endian>::do_write(Output_file* of)
+{
+  const off_t off = this->offset();
   const section_size_type oview_size =
     convert_to_section_size_type(this->data_size());
-  unsigned char* const oview = of->get_output_view(offset, oview_size);
-  unsigned char* pov = oview;
+  unsigned char* const oview = of->get_output_view(off, oview_size);
+  unsigned char *p;
 
-  memset(pov, 0, base_plt_entry_size * 4);
-  pov += base_plt_entry_size * 4;
+  // The base address of the .plt section.
+  uint32_t plt_base = this->targ_->plt_section()->address();
+
+  // The address of _GLOBAL_OFFSET_TABLE_.
+  const Output_data_got_powerpc<size, big_endian> *got;
+  typename elfcpp::Elf_types<size>::Elf_Addr g_o_t;
+  got = this->targ_->got_section();
+  g_o_t = got->address() + got->g_o_t();
+
+  if (size == 64)
+    {
+      // Write out call stubs.
+      typename Glink_entries::const_iterator g;
+      for (g = this->glink_entries_.begin();
+	   g != this->glink_entries_.end();
+	   ++g)
+	{
+	  uint64_t plt_addr = plt_base + g->first.sym_->plt_offset();
+	  uint64_t got_addr = g_o_t;
+	  uint64_t pltoff = plt_addr - got_addr;
+
+	  if (pltoff + 0x80008000 > 0xffffffff || (pltoff & 7) != 0)
+	    gold_error(_("%s: linkage table error against `%s'"),
+		       g->first.object_->name().c_str(),
+		       g->first.sym_->demangled_name().c_str());
+
+	  p = oview + g->second * this->glink_entry_size();
+	  if (ha(pltoff) != 0)
+	    {
+	      write_insn<big_endian>(p, addis_12_2 + ha(pltoff)),	p += 4;
+	      write_insn<big_endian>(p, std_2_1 + 40),			p += 4;
+	      write_insn<big_endian>(p, ld_11_12 + l(pltoff)),		p += 4;
+	      if (ha(pltoff + 16) != ha(pltoff))
+		{
+		  write_insn<big_endian>(p, addi_12_12 + l(pltoff)),	p += 4;
+		  pltoff = 0;
+		}
+	      write_insn<big_endian>(p, mtctr_11),			p += 4;
+	      write_insn<big_endian>(p, ld_2_12 + l(pltoff + 8)),	p += 4;
+	      write_insn<big_endian>(p, ld_11_12 + l(pltoff + 16)),	p += 4;
+	      write_insn<big_endian>(p, bctr),				p += 4;
+	    }
+	  else
+	    {
+	      write_insn<big_endian>(p, std_2_1 + 40),			p += 4;
+	      write_insn<big_endian>(p, ld_11_2 + l(pltoff)),		p += 4;
+	      if (ha(pltoff + 16) != ha(pltoff))
+		{
+		  write_insn<big_endian>(p, addi_2_2 + l(pltoff)),	p += 4;
+		  pltoff = 0;
+		}
+	      write_insn<big_endian>(p, mtctr_11),			p += 4;
+	      write_insn<big_endian>(p, ld_11_2 + l(pltoff + 16)),	p += 4;
+	      write_insn<big_endian>(p, ld_2_2 + l(pltoff + 8)),	p += 4;
+	      write_insn<big_endian>(p, bctr),				p += 4;
+	    }
+	}
+
+      // Write pltresolve stub.
+      p = oview + this->pltresolve_;
+      uint64_t after_bcl = this->address() + this->pltresolve_ + 16;
+      uint64_t pltoff = plt_base - after_bcl;
+
+      elfcpp::Swap<64, big_endian>::writeval(p, pltoff),	p += 8;
+
+      write_insn<big_endian>(p, mflr_12),			p += 4;
+      write_insn<big_endian>(p, bcl_20_31),			p += 4;
+      write_insn<big_endian>(p, mflr_11),			p += 4;
+      write_insn<big_endian>(p, ld_2_11 + l(-16)),		p += 4;
+      write_insn<big_endian>(p, mtlr_12),			p += 4;
+      write_insn<big_endian>(p, add_12_2_11),			p += 4;
+      write_insn<big_endian>(p, ld_11_12 + 0),			p += 4;
+      write_insn<big_endian>(p, ld_2_12 + 8),			p += 4;
+      write_insn<big_endian>(p, mtctr_11),			p += 4;
+      write_insn<big_endian>(p, ld_11_12 + 16),			p += 4;
+      write_insn<big_endian>(p, bctr),				p += 4;
+      while (p < oview + this->pltresolve_ + this->pltresolve_size)
+	write_insn<big_endian>(p, nop), p += 4;
+
+      // Write lazy link call stubs.
+      uint32_t indx = 0;
+      while (p < oview + oview_size)
+	{
+	  if (indx < 0x8000)
+	    {
+	      write_insn<big_endian>(p, li_0_0 + indx),			p += 4;
+	    }
+	  else
+	    {
+	      write_insn<big_endian>(p, lis_0_0 + hi(indx)),		p += 4;
+	      write_insn<big_endian>(p, ori_0_0_0 + l(indx)),		p += 4;
+	    }
+	  uint16_t branch_off = this->pltresolve_ + 8 - (p - oview);
+	  write_insn<big_endian>(p, b + (branch_off & 0x3fffffc)),	p += 4;
+	  indx++;
+	}
+    }
+  else
+    {
+      // Write out call stubs.
+      typename Glink_entries::const_iterator g;
+      for (g = this->glink_entries_.begin();
+	   g != this->glink_entries_.end();
+	   ++g)
+	{
+	  uint32_t plt_addr = plt_base + g->first.sym_->plt_offset();
+	  uint32_t got_addr;
+
+	  p = oview + g->second * this->glink_entry_size();
+	  if (parameters->options().output_is_position_independent())
+	    {
+	      if (g->first.shndx_)
+		got_addr = (g->first.object_->output_section(g->first.shndx_)->address()
+			    + g->first.object_->output_section_offset(g->first.shndx_)
+			    + g->first.addend_);
+	      else
+		got_addr = g_o_t;
+
+	      uint32_t pltoff = plt_addr - got_addr;
+	      if (ha(pltoff) == 0)
+		{
+		  write_insn<big_endian>(p +  0, lwz_11_30 + l(pltoff));
+		  write_insn<big_endian>(p +  4, mtctr_11);
+		  write_insn<big_endian>(p +  8, bctr);
+		}
+	      else
+		{
+		  write_insn<big_endian>(p +  0, addis_11_30 + ha(pltoff));
+		  write_insn<big_endian>(p +  4, lwz_11_11 + l(pltoff));
+		  write_insn<big_endian>(p +  8, mtctr_11);
+		  write_insn<big_endian>(p + 12, bctr);
+		}
+	    }
+	  else
+	    {
+	      write_insn<big_endian>(p +  0, lis_11 + ha(plt_addr));
+	      write_insn<big_endian>(p +  4, lwz_11_11 + l(plt_addr));
+	      write_insn<big_endian>(p +  8, mtctr_11);
+	      write_insn<big_endian>(p + 12, bctr);
+	    }
+	}
 
-  unsigned int plt_offset = base_plt_entry_size * 4;
-  const unsigned int count = this->count_;
+      // Write out pltresolve branch table.
+      p = oview + this->pltresolve_;
+      unsigned int the_end = oview_size - this->pltresolve_size;
+      unsigned char *end_p = oview + the_end;
+      while (p < end_p - 8 * 4)
+	write_insn<big_endian>(p, b + end_p - p), p += 4;
+      while (p < end_p)
+	write_insn<big_endian>(p, nop), p += 4;
 
-  if (size == 64)
-    {
-      for (unsigned int i = 0; i < count; i++)
+      // Write out pltresolve call stub.
+      if (parameters->options().output_is_position_independent())
 	{
+	  uint32_t res0_off = this->pltresolve_;
+	  uint32_t after_bcl_off = the_end + 12;
+	  uint32_t bcl_res0 = after_bcl_off - res0_off;
+
+	  write_insn<big_endian>(p +  0, addis_11_11 + ha(bcl_res0));
+	  write_insn<big_endian>(p +  4, mflr_0);
+	  write_insn<big_endian>(p +  8, bcl_20_31);
+	  write_insn<big_endian>(p + 12, addi_11_11 + l(bcl_res0));
+	  write_insn<big_endian>(p + 16, mflr_12);
+	  write_insn<big_endian>(p + 20, mtlr_0);
+	  write_insn<big_endian>(p + 24, sub_11_11_12);
+
+	  uint32_t got_bcl = g_o_t + 4 - (after_bcl_off + this->address());
+
+	  write_insn<big_endian>(p + 28, addis_12_12 + ha(got_bcl));
+	  if (ha(got_bcl) == ha(got_bcl + 4))
+	    {
+	      write_insn<big_endian>(p + 32, lwz_0_12 + l(got_bcl));
+	      write_insn<big_endian>(p + 36, lwz_12_12 + l(got_bcl + 4));
+	    }
+	  else
+	    {
+	      write_insn<big_endian>(p + 32, lwzu_0_12 + l(got_bcl));
+	      write_insn<big_endian>(p + 36, lwz_12_12 + 4);
+	    }
+	  write_insn<big_endian>(p + 40, mtctr_0);
+	  write_insn<big_endian>(p + 44, add_0_11_11);
+	  write_insn<big_endian>(p + 48, add_11_0_11);
+	  write_insn<big_endian>(p + 52, bctr);
+	  write_insn<big_endian>(p + 56, nop);
+	  write_insn<big_endian>(p + 60, nop);
 	}
-    }
-  else
-    {
-      for (unsigned int i = 0; i < count; i++)
+      else
 	{
-	  elfcpp::Swap<32, true>::writeval(pov + 0x00,
-					   lwz_11_30 + plt_offset);
-	  elfcpp::Swap<32, true>::writeval(pov + 0x04, mtctr_11);
-	  elfcpp::Swap<32, true>::writeval(pov + 0x08, bctr);
-	  elfcpp::Swap<32, true>::writeval(pov + 0x0c, nop);
-	  pov += base_plt_entry_size;
-	  plt_offset += base_plt_entry_size;
+	  uint32_t res0 = this->pltresolve_ + this->address();
+
+	  write_insn<big_endian>(p + 0, lis_12 + ha(g_o_t + 4));
+	  write_insn<big_endian>(p + 4, addis_11_11 + ha(-res0));
+	  if (ha(g_o_t + 4) == ha(g_o_t + 8))
+	    write_insn<big_endian>(p + 8, lwz_0_12 + l(g_o_t + 4));
+	  else
+	    write_insn<big_endian>(p + 8, lwzu_0_12 + l(g_o_t + 4));
+	  write_insn<big_endian>(p + 12, addi_11_11 + l(-res0));
+	  write_insn<big_endian>(p + 16, mtctr_0);
+	  write_insn<big_endian>(p + 20, add_0_11_11);
+	  if (ha(g_o_t + 4) == ha(g_o_t + 8))
+	    write_insn<big_endian>(p + 24, lwz_12_12 + l(g_o_t + 8));
+	  else
+	    write_insn<big_endian>(p + 24, lwz_12_12 + 4);
+	  write_insn<big_endian>(p + 28, add_11_0_11);
+	  write_insn<big_endian>(p + 32, bctr);
+	  write_insn<big_endian>(p + 36, nop);
+	  write_insn<big_endian>(p + 40, nop);
+	  write_insn<big_endian>(p + 44, nop);
+	  write_insn<big_endian>(p + 48, nop);
+	  write_insn<big_endian>(p + 52, nop);
+	  write_insn<big_endian>(p + 56, nop);
+	  write_insn<big_endian>(p + 60, nop);
 	}
+      p += 64;
     }
 
-  gold_assert(static_cast<section_size_type>(pov - oview) == oview_size);
+  of->write_output_view(off, oview_size, oview);
+}
+
+// Create the glink section.
 
-  of->write_output_view(offset, oview_size, oview);
+template<int size, bool big_endian>
+void
+Target_powerpc<size, big_endian>::make_glink_section(Layout* layout)
+{
+  if (this->glink_ == NULL)
+    {
+      this->glink_ = new Output_data_glink<size, big_endian>(this);
+      layout->add_output_section_data(".text", elfcpp::SHT_PROGBITS,
+				      elfcpp::SHF_ALLOC | elfcpp::SHF_EXECINSTR,
+				      this->glink_, ORDER_TEXT, false);
+    }
 }
 
 // Create a PLT entry for a global symbol.
 
 template<int size, bool big_endian>
 void
-Target_powerpc<size, big_endian>::make_plt_entry(Symbol_table* symtab,
-						 Layout* layout,
-						 Symbol* gsym)
+Target_powerpc<size, big_endian>::make_plt_entry(Layout* layout,
+						 Symbol* gsym,
+						 const elfcpp::Rela<size, big_endian>& reloc,
+						 const Sized_relobj<size, big_endian>* object)
 {
-  if (gsym->has_plt_offset())
-    return;
-
   if (this->plt_ == NULL)
-    {
-      // Create the GOT section first.
-      this->got_section(symtab, layout);
+    this->make_plt_section(layout);
 
-      // Ensure that .rela.dyn always appears before .rela.plt  This is
-      // necessary due to how, on PowerPC and some other targets, .rela.dyn
-      // needs to include .rela.plt in it's range.
-      this->rela_dyn_section(layout);
+  this->plt_->add_entry(gsym);
 
-      this->plt_ = new Output_data_plt_powerpc<size, big_endian>(layout);
-      layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
-				      (elfcpp::SHF_ALLOC
-				       | elfcpp::SHF_EXECINSTR
-				       | elfcpp::SHF_WRITE),
-				      this->plt_, ORDER_PLT, false);
-
-      // Define _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section.
-      symtab->define_in_output_data("_PROCEDURE_LINKAGE_TABLE_", NULL,
-				    Symbol_table::PREDEFINED,
-				    this->plt_,
-				    0, 0, elfcpp::STT_OBJECT,
-				    elfcpp::STB_LOCAL,
-				    elfcpp::STV_HIDDEN, 0,
-				    false, false);
+  unsigned int got2_shndx = 0;
+  if (size == 32 && object != NULL)
+    {
+      const Powerpc_relobj<size, big_endian>* ppc_obj
+	= static_cast<const Powerpc_relobj<size, big_endian>*>(object);
+      got2_shndx = ppc_obj->got2_shndx();
     }
-
-  this->plt_->add_entry(gsym);
+  this->glink_->add_entry(gsym, reloc, object, got2_shndx);
 }
 
 // Return the number of entries in the PLT.
@@ -1089,10 +1630,11 @@ Target_powerpc<size, big_endian>::got_mo
     {
       gold_assert(symtab != NULL && layout != NULL && object != NULL);
       Reloc_section* rela_dyn = this->rela_dyn_section(layout);
-      Output_data_got<size, big_endian>* got;
+      Output_data_got_powerpc<size, big_endian>* got;
       unsigned int got_offset;
 
       got = this->got_section(symtab, layout);
+      got->reserve_ent(2);
       got_offset = got->add_constant(0);
       rela_dyn->add_local(object, 0, elfcpp::R_POWERPC_DTPMOD, got,
 			  got_offset, 0);
@@ -1106,19 +1648,12 @@ Target_powerpc<size, big_endian>::got_mo
 // symbol.  IS_FINAL is true if the final address of this symbol is
 // known at link time.
 
-static tls::Tls_optimization
-optimize_tls_reloc(bool /* is_final */, int r_type)
+template<int size, bool big_endian>
+tls::Tls_optimization
+Target_powerpc<size, big_endian>::optimize_tls_reloc(bool, int)
 {
-  // If we are generating a shared library, then we can't do anything
-  // in the linker.
-  if (parameters->options().shared())
-    return tls::TLSOPT_NONE;
-  switch (r_type)
-    {
-      // XXX
-    default:
-      gold_unreachable();
-    }
+  // FIXME
+  return tls::TLSOPT_NONE;
 }
 
 // Get the Reference_flags for a particular relocation.
@@ -1353,15 +1888,9 @@ Target_powerpc<size, big_endian>::Scan::
     case elfcpp::R_POWERPC_GOT16_LO:
     case elfcpp::R_POWERPC_GOT16_HI:
     case elfcpp::R_POWERPC_GOT16_HA:
-    case elfcpp::R_PPC64_TOC16:
-    case elfcpp::R_PPC64_TOC16_LO:
-    case elfcpp::R_PPC64_TOC16_HI:
-    case elfcpp::R_PPC64_TOC16_HA:
-    case elfcpp::R_PPC64_TOC16_DS:
-    case elfcpp::R_PPC64_TOC16_LO_DS:
       {
-	// The symbol requires a GOT entry.
-	Output_data_got<size, big_endian>* got;
+        // The symbol requires a GOT entry.
+        Output_data_got_powerpc<size, big_endian>* got;
 	unsigned int r_sym;
 
 	got = target->got_section(symtab, layout);
@@ -1388,6 +1917,12 @@ Target_powerpc<size, big_endian>::Scan::
       }
       break;
 
+    case elfcpp::R_PPC64_TOC16:
+    case elfcpp::R_PPC64_TOC16_LO:
+    case elfcpp::R_PPC64_TOC16_HI:
+    case elfcpp::R_PPC64_TOC16_HA:
+    case elfcpp::R_PPC64_TOC16_DS:
+    case elfcpp::R_PPC64_TOC16_LO_DS:
     case elfcpp::R_PPC64_TOC:
       // We need a GOT section.
       target->got_section(symtab, layout);
@@ -1443,21 +1978,7 @@ Target_powerpc<size, big_endian>::Scan::
     case elfcpp::R_POWERPC_NONE:
     case elfcpp::R_POWERPC_GNU_VTINHERIT:
     case elfcpp::R_POWERPC_GNU_VTENTRY:
-      break;
-
-    case elfcpp::R_PPC_PLTREL24:
-      // If the symbol is fully resolved, this is just a PC32 reloc.
-      // Otherwise we need a PLT entry.
-      if (gsym->final_value_is_known())
-	break;
-      // If building a shared library, we can also skip the PLT entry
-      // if the symbol is defined in the output file and is protected
-      // or hidden.
-      if (gsym->is_defined()
-	  && !gsym->is_from_dynobj()
-	  && !gsym->is_preemptible())
-	break;
-      target->make_plt_entry(symtab, layout, gsym);
+    case elfcpp::R_PPC_LOCAL24PC:
       break;
 
     case elfcpp::R_POWERPC_ADDR16:
@@ -1467,26 +1988,27 @@ Target_powerpc<size, big_endian>::Scan::
     case elfcpp::R_POWERPC_ADDR32:
     case elfcpp::R_PPC64_ADDR64:
       {
-	// Make a PLT entry if necessary.
-	if (gsym->needs_plt_entry())
-	  {
-	    target->make_plt_entry(symtab, layout, gsym);
+        // Make a PLT entry if necessary.
+        if (gsym->needs_plt_entry())
+          {
+	    target->make_plt_entry(layout, gsym, reloc, 0);
 	    // Since this is not a PC-relative relocation, we may be
 	    // taking the address of a function. In that case we need to
 	    // set the entry in the dynamic symbol table to the address of
 	    // the PLT entry.
-	    if (gsym->is_from_dynobj() && !parameters->options().shared())
+	    if (size == 32
+		&& gsym->is_from_dynobj() && !parameters->options().shared())
 	      gsym->set_needs_dynsym_value();
-	  }
-	// Make a dynamic relocation if necessary.
-	if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type)))
-	  {
-	    if (gsym->may_need_copy_reloc())
-	      {
-		target->copy_reloc(symtab, layout, object,
-				   data_shndx, output_section, gsym, reloc);
-	      }
-	    else if ((r_type == elfcpp::R_POWERPC_ADDR32
+          }
+        // Make a dynamic relocation if necessary.
+        if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type)))
+          {
+            if (gsym->may_need_copy_reloc())
+              {
+	        target->copy_reloc(symtab, layout, object,
+	                           data_shndx, output_section, gsym, reloc);
+              }
+            else if ((r_type == elfcpp::R_POWERPC_ADDR32
 		      || r_type == elfcpp::R_PPC64_ADDR64)
 		     && gsym->can_use_relative_reloc(false))
 	      {
@@ -1519,15 +2041,20 @@ Target_powerpc<size, big_endian>::Scan::
       }
       break;
 
+    case elfcpp::R_PPC_PLTREL24:
     case elfcpp::R_POWERPC_REL24:
-    case elfcpp::R_PPC_LOCAL24PC:
-    case elfcpp::R_PPC_REL16:
-    case elfcpp::R_PPC_REL16_LO:
-    case elfcpp::R_PPC_REL16_HI:
-    case elfcpp::R_PPC_REL16_HA:
       {
-	if (gsym->needs_plt_entry())
-	  target->make_plt_entry(symtab, layout, gsym);
+	if (gsym->needs_plt_entry()
+	    || (!gsym->final_value_is_known()
+		 && !(gsym->is_defined()
+		      && !gsym->is_from_dynobj()
+		      && !gsym->is_preemptible())))
+	  {
+	    if (r_type == elfcpp::R_PPC_PLTREL24)
+	      target->make_plt_entry(layout, gsym, reloc, object);
+	    else
+	      target->make_plt_entry(layout, gsym, reloc, 0);
+	  }
 	// Make a dynamic relocation if necessary.
 	if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type)))
 	  {
@@ -1549,19 +2076,19 @@ Target_powerpc<size, big_endian>::Scan::
       }
       break;
 
+    case elfcpp::R_PPC_REL16:
+    case elfcpp::R_PPC_REL16_LO:
+    case elfcpp::R_PPC_REL16_HI:
+    case elfcpp::R_PPC_REL16_HA:
+      break;
+
     case elfcpp::R_POWERPC_GOT16:
     case elfcpp::R_POWERPC_GOT16_LO:
     case elfcpp::R_POWERPC_GOT16_HI:
     case elfcpp::R_POWERPC_GOT16_HA:
-    case elfcpp::R_PPC64_TOC16:
-    case elfcpp::R_PPC64_TOC16_LO:
-    case elfcpp::R_PPC64_TOC16_HI:
-    case elfcpp::R_PPC64_TOC16_HA:
-    case elfcpp::R_PPC64_TOC16_DS:
-    case elfcpp::R_PPC64_TOC16_LO_DS:
       {
-	// The symbol requires a GOT entry.
-	Output_data_got<size, big_endian>* got;
+        // The symbol requires a GOT entry.
+        Output_data_got_powerpc<size, big_endian>* got;
 
 	got = target->got_section(symtab, layout);
 	if (gsym->final_value_is_known())
@@ -1589,6 +2116,12 @@ Target_powerpc<size, big_endian>::Scan::
       break;
 
     case elfcpp::R_PPC64_TOC:
+    case elfcpp::R_PPC64_TOC16:
+    case elfcpp::R_PPC64_TOC16_LO:
+    case elfcpp::R_PPC64_TOC16_HI:
+    case elfcpp::R_PPC64_TOC16_HA:
+    case elfcpp::R_PPC64_TOC16_DS:
+    case elfcpp::R_PPC64_TOC16_LO_DS:
       // We need a GOT section.
       target->got_section(symtab, layout);
       break;
@@ -1669,7 +2202,6 @@ Target_powerpc<size, big_endian>::scan_r
 {
   typedef Target_powerpc<size, big_endian> Powerpc;
   typedef typename Target_powerpc<size, big_endian>::Scan Scan;
-  static Output_data_space* sdata;
 
   if (sh_type == elfcpp::SHT_REL)
     {
@@ -1678,26 +2210,27 @@ Target_powerpc<size, big_endian>::scan_r
       return;
     }
 
-  // Define _SDA_BASE_ at the start of the .sdata section.
-  if (sdata == NULL)
-  {
-    // layout->find_output_section(".sdata") == NULL
-    sdata = new Output_data_space(4, "** sdata");
-    Output_section* os = layout->add_output_section_data(".sdata", 0,
-							 elfcpp::SHF_ALLOC
-							 | elfcpp::SHF_WRITE,
-							 sdata,
-							 ORDER_SMALL_DATA,
-							 false);
-    symtab->define_in_output_data("_SDA_BASE_", NULL,
-				  Symbol_table::PREDEFINED,
-				  os,
-				  32768, 0,
-				  elfcpp::STT_OBJECT,
-				  elfcpp::STB_LOCAL,
-				  elfcpp::STV_HIDDEN, 0,
-				  false, false);
-  }
+  if (size == 32)
+    {
+      static Output_data_space* sdata;
+
+      // Define _SDA_BASE_ at the start of the .sdata section.
+      if (sdata == NULL)
+	{
+	  // layout->find_output_section(".sdata") == NULL
+	  sdata = new Output_data_space(4, "** sdata");
+	  Output_section* os
+	    = layout->add_output_section_data(".sdata", 0,
+					      elfcpp::SHF_ALLOC
+					      | elfcpp::SHF_WRITE,
+					      sdata, ORDER_SMALL_DATA, false);
+	  symtab->define_in_output_data("_SDA_BASE_", NULL,
+					Symbol_table::PREDEFINED,
+					os, 32768, 0, elfcpp::STT_OBJECT,
+					elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN,
+					0, false, false);
+	}
+    }
 
   gold::scan_relocs<size, big_endian, Powerpc, elfcpp::SHT_RELA, Scan>(
     symtab,
@@ -1729,6 +2262,14 @@ Target_powerpc<size, big_endian>::do_fin
   layout->add_target_dynamic_tags(false, this->plt_, rel_plt,
 				  this->rela_dyn_, true, size == 32);
 
+  if (size == 32)
+    {
+      this->got_->finalize_data_size();
+      Output_data_dynamic* odyn = layout->dynamic_data();
+      odyn->add_section_plus_offset(elfcpp::DT_PPC_GOT,
+				    this->got_, this->got_->g_o_t());
+    }
+
   // Emit any relocs we saved in an attempt to avoid generating COPY
   // relocs.
   if (this->copy_relocs_.any_saved_relocs())
@@ -1742,7 +2283,7 @@ inline bool
 Target_powerpc<size, big_endian>::Relocate::relocate(
 			const Relocate_info<size, big_endian>* relinfo,
 			Target_powerpc* target,
-			Output_section*,
+			Output_section* os,
 			size_t relnum,
 			const elfcpp::Rela<size, big_endian>& rela,
 			unsigned int r_type,
@@ -1754,29 +2295,56 @@ Target_powerpc<size, big_endian>::Reloca
 {
   const unsigned int toc_base_offset = 0x8000;
   typedef Powerpc_relocate_functions<size, big_endian> Reloc;
-
-  // Pick the value to use for symbols defined in shared objects.
-  Symbol_value<size> symval;
-  if (gsym != NULL
-      && gsym->use_plt_offset(Scan::get_reference_flags(r_type)))
+  const Powerpc_relobj<size, big_endian>* const object
+    = static_cast<const Powerpc_relobj<size, big_endian>*>(relinfo->object);
+  elfcpp::Elf_Xword value;
+
+  if (r_type == elfcpp::R_POWERPC_GOT16
+      || r_type == elfcpp::R_POWERPC_GOT16_LO
+      || r_type == elfcpp::R_POWERPC_GOT16_HI
+      || r_type == elfcpp::R_POWERPC_GOT16_HA
+      || r_type == elfcpp::R_PPC64_GOT16_DS
+      || r_type == elfcpp::R_PPC64_GOT16_LO_DS)
     {
-      elfcpp::Elf_Xword value;
-
-      value = target->plt_section()->address() + gsym->plt_offset();
-
-      symval.set_output_value(value);
-
-      psymval = &symval;
+      if (gsym != NULL)
+	{
+	  gold_assert(gsym->has_got_offset(GOT_TYPE_STANDARD));
+	  value = gsym->got_offset(GOT_TYPE_STANDARD);
+	}
+      else
+	{
+	  unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
+	  gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_STANDARD));
+	  value = object->local_got_offset(r_sym, GOT_TYPE_STANDARD);
+	}
+      value -= target->got_section()->g_o_t();
+    }
+  else if (r_type == elfcpp::R_PPC64_TOC)
+    {
+      value = target->got_section()->address() + toc_base_offset;
     }
+  else if (gsym != NULL
+	   && (r_type == elfcpp::R_POWERPC_REL24
+	       || r_type == elfcpp::R_PPC_PLTREL24)
+	   && gsym->use_plt_offset(Scan::get_reference_flags(r_type)))
+    {
+      const Output_data_glink<size, big_endian>* glink;
 
-  const Sized_relobj_file<size, big_endian>* object = relinfo->object;
-  elfcpp::Elf_Xword addend = rela.get_r_addend();
+      glink = target->glink_section();
+      unsigned int shndx = 0;
+      if (size == 32 && r_type == elfcpp::R_PPC_PLTREL24)
+	shndx = object->got2_shndx();
+      unsigned int glink_index = glink->find_entry(gsym, rela, object, shndx);
+      value = glink->address() + glink_index * glink->glink_entry_size();
+    }
+  else
+    {
+      elfcpp::Elf_Xword addend = 0;
+      if (r_type != elfcpp::R_PPC_PLTREL24)
+	addend = rela.get_r_addend();
+      value = psymval->value(object, addend);
+    }
 
-  // Get the GOT offset if needed.  Unlike i386 and x86_64, our GOT
-  // pointer points to the beginning, not the end, of the table.
-  // So we just use the plain offset.
-  unsigned int got_offset = 0;
-  unsigned int got2_offset = 0;
   switch (r_type)
     {
     case elfcpp::R_PPC64_TOC16:
@@ -1785,39 +2353,18 @@ Target_powerpc<size, big_endian>::Reloca
     case elfcpp::R_PPC64_TOC16_HA:
     case elfcpp::R_PPC64_TOC16_DS:
     case elfcpp::R_PPC64_TOC16_LO_DS:
-	// Subtract the TOC base address.
-	addend -= target->toc_section()->address() + toc_base_offset;
-	/* FALLTHRU */
-
-    case elfcpp::R_POWERPC_GOT16:
-    case elfcpp::R_POWERPC_GOT16_LO:
-    case elfcpp::R_POWERPC_GOT16_HI:
-    case elfcpp::R_POWERPC_GOT16_HA:
-    case elfcpp::R_PPC64_GOT16_DS:
-    case elfcpp::R_PPC64_GOT16_LO_DS:
-      if (gsym != NULL)
-	{
-	  gold_assert(gsym->has_got_offset(GOT_TYPE_STANDARD));
-	  got_offset = gsym->got_offset(GOT_TYPE_STANDARD);
-	}
-      else
-	{
-	  unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
-	  gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_STANDARD));
-	  got_offset = object->local_got_offset(r_sym, GOT_TYPE_STANDARD);
-	}
+      // Subtract the TOC base address.
+      value -= target->got_section()->address() + toc_base_offset;
       break;
 
-      // R_PPC_PLTREL24 is rather special.  If non-zero,
-      // the addend specifies the GOT pointer offset within .got2.
-    case elfcpp::R_PPC_PLTREL24:
-      if (addend >= 32768)
-	{
-	  Output_data_space* got2;
-	  got2 = target->got2_section();
-	  got2_offset = got2->offset();
-	  addend += got2_offset;
-	}
+    case elfcpp::R_POWERPC_SECTOFF:
+    case elfcpp::R_POWERPC_SECTOFF_LO:
+    case elfcpp::R_POWERPC_SECTOFF_HI:
+    case elfcpp::R_POWERPC_SECTOFF_HA:
+    case elfcpp::R_PPC64_SECTOFF_DS:
+    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+      if (os != NULL)
+	value -= os->address();
       break;
 
     default:
@@ -1832,104 +2379,77 @@ Target_powerpc<size, big_endian>::Reloca
       break;
 
     case elfcpp::R_POWERPC_REL32:
-      Reloc::rel32(view, object, psymval, addend, address);
+      Reloc::rel32(view, value, 0, address);
       break;
 
     case elfcpp::R_POWERPC_REL24:
-      Reloc::rel24(view, object, psymval, addend, address);
-      break;
-
-    case elfcpp::R_POWERPC_REL14:
-      Reloc::rel14(view, object, psymval, addend, address);
-      break;
-
     case elfcpp::R_PPC_PLTREL24:
-      Reloc::rel24(view, object, psymval, addend, address);
+    case elfcpp::R_PPC_LOCAL24PC:
+      Reloc::rel24(view, value, 0, address);
       break;
 
-    case elfcpp::R_PPC_LOCAL24PC:
-      Reloc::rel24(view, object, psymval, addend, address);
+    case elfcpp::R_POWERPC_REL14:
+      Reloc::rel14(view, value, 0, address);
       break;
 
     case elfcpp::R_PPC64_ADDR64:
-      if (!parameters->options().output_is_position_independent())
-	Relocate_functions<size, big_endian>::rela64(view, object,
-						     psymval, addend);
+    case elfcpp::R_PPC64_TOC:
+      Relocate_functions<size, big_endian>::rela64(view, value, 0);
       break;
 
     case elfcpp::R_POWERPC_ADDR32:
-      if (!parameters->options().output_is_position_independent())
-	Relocate_functions<size, big_endian>::rela32(view, object,
-						     psymval, addend);
-      break;
-
-    case elfcpp::R_POWERPC_ADDR16_LO:
-      Reloc::addr16_lo(view, object, psymval, addend);
-      break;
-
-    case elfcpp::R_POWERPC_ADDR16_HI:
-      Reloc::addr16_hi(view, object, psymval, addend);
-      break;
-
-    case elfcpp::R_POWERPC_ADDR16_HA:
-      Reloc::addr16_ha(view, object, psymval, addend);
-      break;
-
-    case elfcpp::R_PPC_REL16_LO:
-      Reloc::rel16_lo(view, object, psymval, addend, address);
-      break;
-
-    case elfcpp::R_PPC_REL16_HI:
-      Reloc::rel16_lo(view, object, psymval, addend, address);
-      break;
-
-    case elfcpp::R_PPC_REL16_HA:
-      Reloc::rel16_ha(view, object, psymval, addend, address);
+      Relocate_functions<size, big_endian>::rela32(view, value, 0);
       break;
 
+    case elfcpp::R_POWERPC_ADDR16:
+    case elfcpp::R_PPC64_TOC16:
     case elfcpp::R_POWERPC_GOT16:
-      Reloc::addr16(view, got_offset, addend);
+    case elfcpp::R_POWERPC_SECTOFF:
+      Reloc::addr16(view, value, 0);
       break;
 
+    case elfcpp::R_POWERPC_ADDR16_LO:
+    case elfcpp::R_PPC64_TOC16_LO:
     case elfcpp::R_POWERPC_GOT16_LO:
-      Reloc::addr16_lo(view, got_offset, addend);
+    case elfcpp::R_POWERPC_SECTOFF_LO:
+      Reloc::addr16_lo(view, value, 0);
       break;
 
+    case elfcpp::R_POWERPC_ADDR16_HI:
+    case elfcpp::R_PPC64_TOC16_HI:
     case elfcpp::R_POWERPC_GOT16_HI:
-      Reloc::addr16_hi(view, got_offset, addend);
+    case elfcpp::R_POWERPC_SECTOFF_HI:
+      Reloc::addr16_hi(view, value, 0);
       break;
 
+    case elfcpp::R_POWERPC_ADDR16_HA:
+    case elfcpp::R_PPC64_TOC16_HA:
     case elfcpp::R_POWERPC_GOT16_HA:
-      Reloc::addr16_ha(view, got_offset, addend);
-      break;
-
-    case elfcpp::R_PPC64_TOC16:
-      Reloc::addr16(view, got_offset, addend);
+    case elfcpp::R_POWERPC_SECTOFF_HA:
+      Reloc::addr16_ha(view, value, 0);
       break;
 
-    case elfcpp::R_PPC64_TOC16_LO:
-      Reloc::addr16_lo(view, got_offset, addend);
+    case elfcpp::R_PPC_REL16_LO:
+      Reloc::rel16_lo(view, value, 0, address);
       break;
 
-    case elfcpp::R_PPC64_TOC16_HI:
-      Reloc::addr16_hi(view, got_offset, addend);
+    case elfcpp::R_PPC_REL16_HI:
+      Reloc::rel16_hi(view, value, 0, address);
       break;
 
-    case elfcpp::R_PPC64_TOC16_HA:
-      Reloc::addr16_ha(view, got_offset, addend);
+    case elfcpp::R_PPC_REL16_HA:
+      Reloc::rel16_ha(view, value, 0, address);
       break;
 
+    case elfcpp::R_PPC64_ADDR16_DS:
+    case elfcpp::R_PPC64_ADDR16_LO_DS:
     case elfcpp::R_PPC64_TOC16_DS:
     case elfcpp::R_PPC64_TOC16_LO_DS:
-      Reloc::addr16_ds(view, got_offset, addend);
-      break;
-
-    case elfcpp::R_PPC64_TOC:
-      {
-	elfcpp::Elf_types<64>::Elf_Addr value;
-	value = target->toc_section()->address() + toc_base_offset;
-	Relocate_functions<64, false>::rela64(view, value, addend);
-      }
+    case elfcpp::R_PPC64_GOT16_DS:
+    case elfcpp::R_PPC64_GOT16_LO_DS:
+    case elfcpp::R_PPC64_SECTOFF_DS:
+    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+      Reloc::addr16_ds(view, value, 0);
       break;
 
     case elfcpp::R_POWERPC_COPY:
@@ -1980,8 +2500,6 @@ Target_powerpc<size, big_endian>::Reloca
     (gsym == NULL
      ? !parameters->options().output_is_position_independent()
      : gsym->final_value_is_known());
-  const tls::Tls_optimization optimized_type
-      = optimize_tls_reloc(is_final, r_type);
 
   switch (r_type)
     {
@@ -2024,19 +2542,39 @@ Target_powerpc<size, big_endian>::reloca
     reloc_symbol_changes);
 }
 
-// Return the size of a relocation while scanning during a relocatable
-// link.
-
-template<int size, bool big_endian>
-unsigned int
-Target_powerpc<size, big_endian>::Relocatable_size_for_reloc::get_size_for_reloc(
-    unsigned int,
-    Relobj*)
-{
-  // We are always SHT_RELA, so we should never get here.
-  gold_unreachable();
-  return 0;
-}
+class Powerpc_scan_relocatable_reloc
+{
+public:
+  // Return the strategy to use for a local symbol which is not a
+  // section symbol, given the relocation type.
+  inline Relocatable_relocs::Reloc_strategy
+  local_non_section_strategy(unsigned int r_type, Relobj*, unsigned int r_sym)
+  {
+    // We assume that relocation type 0 is NONE.  Targets which are
+    // different must override.
+    if (r_type == 0 && r_sym == 0)
+      return Relocatable_relocs::RELOC_DISCARD;
+    return Relocatable_relocs::RELOC_COPY;
+  }
+
+  // Return the strategy to use for a local symbol which is a section
+  // symbol, given the relocation type.
+  inline Relocatable_relocs::Reloc_strategy
+  local_section_strategy(unsigned int, Relobj*)
+  {
+    return Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA;
+  }
+
+  // Return the strategy to use for a global symbol, given the
+  // relocation type, the object, and the symbol index.
+  inline Relocatable_relocs::Reloc_strategy
+  global_strategy(unsigned int r_type, Relobj*, unsigned int)
+  {
+    if (r_type == elfcpp::R_PPC_PLTREL24)
+      return Relocatable_relocs::RELOC_SPECIAL;
+    return Relocatable_relocs::RELOC_COPY;
+  }
+};
 
 // Scan the relocs during a relocatable link.
 
@@ -2058,11 +2596,8 @@ Target_powerpc<size, big_endian>::scan_r
 {
   gold_assert(sh_type == elfcpp::SHT_RELA);
 
-  typedef gold::Default_scan_relocatable_relocs<elfcpp::SHT_RELA,
-    Relocatable_size_for_reloc> Scan_relocatable_relocs;
-
   gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_RELA,
-      Scan_relocatable_relocs>(
+    Powerpc_scan_relocatable_reloc>(
     symtab,
     layout,
     object,
@@ -2088,26 +2623,142 @@ Target_powerpc<size, big_endian>::reloca
     Output_section* output_section,
     off_t offset_in_output_section,
     const Relocatable_relocs* rr,
-    unsigned char* view,
-    typename elfcpp::Elf_types<size>::Elf_Addr view_address,
-    section_size_type view_size,
+    unsigned char*,
+    typename elfcpp::Elf_types<size>::Elf_Addr,
+    section_size_type,
     unsigned char* reloc_view,
     section_size_type reloc_view_size)
 {
   gold_assert(sh_type == elfcpp::SHT_RELA);
 
-  gold::relocate_for_relocatable<size, big_endian, elfcpp::SHT_RELA>(
-    relinfo,
-    prelocs,
-    reloc_count,
-    output_section,
-    offset_in_output_section,
-    rr,
-    view,
-    view_address,
-    view_size,
-    reloc_view,
-    reloc_view_size);
+  typedef typename elfcpp::Elf_types<size>::Elf_Addr Address;
+  typedef typename Reloc_types<elfcpp::SHT_RELA, size, big_endian>::Reloc
+    Reltype;
+  typedef typename Reloc_types<elfcpp::SHT_RELA, size, big_endian>::Reloc_write
+    Reltype_write;
+  const int reloc_size
+    = Reloc_types<elfcpp::SHT_RELA, size, big_endian>::reloc_size;
+  const Address invalid_address = static_cast<Address>(0) - 1;
+
+  Powerpc_relobj<size, big_endian>* const object
+    = static_cast<Powerpc_relobj<size, big_endian>*>(relinfo->object);
+  const unsigned int local_count = object->local_symbol_count();
+  unsigned int got2_shndx = object->got2_shndx();
+  typename elfcpp::Elf_types<size>::Elf_Swxword got2_addend = 0;
+  if (got2_shndx != 0)
+    got2_addend = object->get_output_section_offset(got2_shndx);
+
+  unsigned char* pwrite = reloc_view;
+
+  for (size_t i = 0; i < reloc_count; ++i, prelocs += reloc_size)
+    {
+      Relocatable_relocs::Reloc_strategy strategy = rr->strategy(i);
+      if (strategy == Relocatable_relocs::RELOC_DISCARD)
+	continue;
+
+      Reltype reloc(prelocs);
+      Reltype_write reloc_write(pwrite);
+
+      typename elfcpp::Elf_types<size>::Elf_WXword r_info = reloc.get_r_info();
+      const unsigned int r_sym = elfcpp::elf_r_sym<size>(r_info);
+      const unsigned int r_type = elfcpp::elf_r_type<size>(r_info);
+
+      // Get the new symbol index.
+
+      unsigned int new_symndx;
+      if (r_sym < local_count)
+	{
+	  switch (strategy)
+	    {
+	    case Relocatable_relocs::RELOC_COPY:
+	    case Relocatable_relocs::RELOC_SPECIAL:
+	      new_symndx = object->symtab_index(r_sym);
+	      gold_assert(new_symndx != -1U);
+	      break;
+
+	    case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA:
+	      {
+		// We are adjusting a section symbol.  We need to find
+		// the symbol table index of the section symbol for
+		// the output section corresponding to input section
+		// in which this symbol is defined.
+		gold_assert(r_sym < local_count);
+		bool is_ordinary;
+		unsigned int shndx =
+		  object->local_symbol_input_shndx(r_sym, &is_ordinary);
+		gold_assert(is_ordinary);
+		Output_section* os = object->output_section(shndx);
+		gold_assert(os != NULL);
+		gold_assert(os->needs_symtab_index());
+		new_symndx = os->symtab_index();
+	      }
+	      break;
+
+	    default:
+	      gold_unreachable();
+	    }
+	}
+      else
+	{
+	  const Symbol* gsym = object->global_symbol(r_sym);
+	  gold_assert(gsym != NULL);
+	  if (gsym->is_forwarder())
+	    gsym = relinfo->symtab->resolve_forwards(gsym);
+
+	  gold_assert(gsym->has_symtab_index());
+	  new_symndx = gsym->symtab_index();
+	}
+
+      // Get the new offset--the location in the output section where
+      // this relocation should be applied.
+
+      Address offset = reloc.get_r_offset();
+      Address new_offset;
+      if (static_cast<Address>(offset_in_output_section) != invalid_address)
+	new_offset = offset + offset_in_output_section;
+      else
+	{
+          section_offset_type sot_offset =
+              convert_types<section_offset_type, Address>(offset);
+	  section_offset_type new_sot_offset =
+              output_section->output_offset(object, relinfo->data_shndx,
+                                            sot_offset);
+	  gold_assert(new_sot_offset != -1);
+          new_offset = new_sot_offset;
+	}
+
+      reloc_write.put_r_offset(new_offset);
+      reloc_write.put_r_info(elfcpp::elf_r_info<size>(new_symndx, r_type));
+
+      // Handle the reloc addend based on the strategy.
+      typename elfcpp::Elf_types<size>::Elf_Swxword addend;
+      addend = Reloc_types<elfcpp::SHT_RELA, size, big_endian>::
+	get_reloc_addend(&reloc);
+
+      if (strategy == Relocatable_relocs::RELOC_COPY)
+	;
+      else if (strategy == Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA)
+	{
+	  const Symbol_value<size>* psymval = object->local_symbol(r_sym);
+
+	  addend = psymval->value(object, addend);
+	}
+      else if (strategy == Relocatable_relocs::RELOC_SPECIAL)
+	{
+	  if (addend >= 32768)
+	    addend += got2_addend;
+	}
+      else
+	gold_unreachable();
+
+      Reloc_types<elfcpp::SHT_RELA, size, big_endian>::
+	set_reloc_addend(&reloc_write, addend);
+
+      pwrite += reloc_size;
+    }
+
+  gold_assert(static_cast<section_size_type>(pwrite - reloc_view)
+	      == reloc_view_size);
 }
 
 // Return the value to use for a dynamic which requires special
@@ -2119,8 +2770,13 @@ template<int size, bool big_endian>
 uint64_t
 Target_powerpc<size, big_endian>::do_dynsym_value(const Symbol* gsym) const
 {
-  gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset());
-  return this->plt_section()->address() + gsym->plt_offset();
+  if (size == 32)
+    {
+      gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset());
+      return this->plt_section()->address() + gsym->plt_offset();
+    }
+  else
+    gold_unreachable();
 }
 
 // The selector for powerpc object files.
Index: gold/po/POTFILES.in
===================================================================
RCS file: /cvs/src/src/gold/po/POTFILES.in,v
retrieving revision 1.24
diff -u -p -r1.24 POTFILES.in
--- gold/po/POTFILES.in	14 Jun 2011 05:11:15 -0000	1.24
+++ gold/po/POTFILES.in	9 Aug 2012 12:12:56 -0000
@@ -35,6 +35,8 @@ fileread.h
 freebsd.h
 gc.cc
 gc.h
+gdb-index.cc
+gdb-index.h
 gold-threads.cc
 gold-threads.h
 gold.cc
@@ -51,6 +53,8 @@ mapfile.cc
 mapfile.h
 merge.cc
 merge.h
+nacl.cc
+nacl.h
 object.cc
 object.h
 options.cc
Index: gold/po/gold.pot
===================================================================
RCS file: /cvs/src/src/gold/po/gold.pot,v
retrieving revision 1.50
diff -u -p -r1.50 gold.pot
--- gold/po/gold.pot	22 Apr 2010 14:37:07 -0000	1.50
+++ gold/po/gold.pot	9 Aug 2012 12:12:56 -0000
@@ -8,166 +8,419 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2010-03-03 15:08+0100\n"
+"POT-Creation-Date: 2012-08-09 21:18+0930\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: archive.cc:119
+#: archive.cc:116
+#, c-format
+msgid "script or expression reference to %s"
+msgstr ""
+
+#: archive.cc:218
 #, c-format
 msgid "%s: no archive symbol table (run ranlib)"
 msgstr ""
 
-#: archive.cc:204
+#: archive.cc:306
 #, c-format
 msgid "%s: bad archive symbol table names"
 msgstr ""
 
-#: archive.cc:236
+#: archive.cc:338
 #, c-format
 msgid "%s: malformed archive header at %zu"
 msgstr ""
 
-#: archive.cc:256
+#: archive.cc:358
 #, c-format
 msgid "%s: malformed archive header size at %zu"
 msgstr ""
 
-#: archive.cc:267
+#: archive.cc:369
 #, c-format
 msgid "%s: malformed archive header name at %zu"
 msgstr ""
 
-#: archive.cc:297
+#: archive.cc:400
 #, c-format
 msgid "%s: bad extended name index at %zu"
 msgstr ""
 
-#: archive.cc:307
+#: archive.cc:410
 #, c-format
 msgid "%s: bad extended name entry at header %zu"
 msgstr ""
 
-#: archive.cc:404
+#: archive.cc:507
 #, c-format
 msgid "%s: short archive header at %zu"
 msgstr ""
 
-#: archive.cc:560
+#: archive.cc:675
 #, c-format
 msgid "%s: member at %zu is not an ELF object"
 msgstr ""
 
-#: archive.cc:879
+#: archive.cc:1020
 #, c-format
 msgid "%s: archive libraries: %u\n"
 msgstr ""
 
-#: archive.cc:881
+#: archive.cc:1022
 #, c-format
 msgid "%s: total archive members: %u\n"
 msgstr ""
 
-#: archive.cc:883
+#: archive.cc:1024
 #, c-format
 msgid "%s: loaded archive members: %u\n"
 msgstr ""
 
-#: arm.cc:1149 i386.cc:536 sparc.cc:1087 x86_64.cc:565
+#: archive.cc:1254
+#, c-format
+msgid "%s: lib groups: %u\n"
+msgstr ""
+
+#: archive.cc:1256
+#, c-format
+msgid "%s: total lib groups members: %u\n"
+msgstr ""
+
+#: archive.cc:1258
+#, c-format
+msgid "%s: loaded lib groups members: %u\n"
+msgstr ""
+
+#: arm-reloc-property.cc:303
+#, c-format
+msgid "invalid reloc %u"
+msgstr ""
+
+#: arm-reloc-property.cc:316
+msgid "reloc "
+msgstr ""
+
+#: arm-reloc-property.cc:316
+msgid "unimplemented reloc "
+msgstr ""
+
+#: arm-reloc-property.cc:319
+msgid "dynamic reloc "
+msgstr ""
+
+#: arm-reloc-property.cc:322
+msgid "private reloc "
+msgstr ""
+
+#: arm-reloc-property.cc:325
+msgid "obsolete reloc "
+msgstr ""
+
+#: arm.cc:1074
+msgid "** ARM cantunwind"
+msgstr ""
+
+#: arm.cc:4023
+#, c-format
+msgid "%s: Thumb BLX instruction targets thumb function '%s'."
+msgstr ""
+
+#: arm.cc:4169
+msgid "conditional branch to PLT in THUMB-2 not supported yet."
+msgstr ""
+
+#: arm.cc:5249
+msgid "PREL31 overflow in EXIDX_CANTUNWIND entry"
+msgstr ""
+
+#. Something is wrong with this section.  Better not touch it.
+#: arm.cc:5495
+#, c-format
+msgid "uneven .ARM.exidx section size in %s section %u"
+msgstr ""
+
+#: arm.cc:5825
+msgid "Found non-EXIDX input sections in EXIDX output section"
+msgstr ""
+
+#: arm.cc:5879 arm.cc:5883
+#, c-format
+msgid ""
+"unwinding may not work because EXIDX input section %u of %s is not in EXIDX "
+"output section"
+msgstr ""
+
+#: arm.cc:6169
+#, c-format
+msgid ""
+"cannot scan executable section %u of %s for Cortex-A8 erratum because it has "
+"no mapping symbols."
+msgstr ""
+
+#: arm.cc:6371 object.cc:784
+#, c-format
+msgid "invalid symbol table name index: %u"
+msgstr ""
+
+#: arm.cc:6379 object.cc:790
+#, c-format
+msgid "symbol table name section has wrong type: %u"
+msgstr ""
+
+#: arm.cc:6629
+#, c-format
+msgid "EXIDX section %s(%u) links to invalid section %u in %s"
+msgstr ""
+
+#: arm.cc:6638
+#, c-format
+msgid "EXIDX sections %s(%u) and %s(%u) both link to text section%s(%u) in %s"
+msgstr ""
+
+#: arm.cc:6652
+#, c-format
+msgid "EXIDX section %s(%u) links to non-allocated section %s(%u)  in %s"
+msgstr ""
+
+#. I would like to make this an error but currently ld just ignores
+#. this.
+#: arm.cc:6662
+#, c-format
+msgid "EXIDX section %s(%u) links to non-executable section %s(%u) in %s"
+msgstr ""
+
+#: arm.cc:6746
+#, c-format
+msgid "SHF_LINK_ORDER not set in EXIDX section %s of %s"
+msgstr ""
+
+#: arm.cc:6779
+#, c-format
+msgid "relocation section %u has invalid info %u"
+msgstr ""
+
+#: arm.cc:6785
+#, c-format
+msgid "section %u has multiple relocation sections %u and %u"
+msgstr ""
+
+#: arm.cc:7145
+#, c-format
+msgid "undefined or discarded local symbol %u from  object %s in GOT"
+msgstr ""
+
+#: arm.cc:7167
+#, c-format
+msgid "undefined or discarded symbol %s in GOT"
+msgstr ""
+
+#: arm.cc:7283 i386.cc:168 sparc.cc:1346 x86_64.cc:257
 msgid "** PLT"
 msgstr ""
 
-#: arm.cc:1364 i386.cc:880 powerpc.cc:1014 sparc.cc:1502 x86_64.cc:955
-#: x86_64.cc:1265
+#: arm.cc:7790 i386.cc:1682 powerpc.cc:1730 sparc.cc:2112 x86_64.cc:2163
+#: x86_64.cc:2569
 #, c-format
 msgid "%s: unsupported reloc %u against local symbol"
 msgstr ""
 
-#: arm.cc:1404 powerpc.cc:1105 sparc.cc:1592 x86_64.cc:992
-msgid "requires unsupported dynamic reloc; recompile with -fPIC"
+#: arm.cc:7834
+#, c-format
+msgid "requires unsupported dynamic reloc %s; recompile with -fPIC"
+msgstr ""
+
+#: arm.cc:7921 i386.cc:1768 x86_64.cc:2350
+#, c-format
+msgid "section symbol %u has bad shndx %u"
 msgstr ""
 
 #. These are relocations which should only be seen by the
 #. dynamic linker, and should never be seen here.
-#: arm.cc:1519 arm.cc:1739 arm.cc:2354 i386.cc:1002 i386.cc:1334
-#: powerpc.cc:1223 powerpc.cc:1432 sparc.cc:1877 sparc.cc:2238 x86_64.cc:1145
-#: x86_64.cc:1453
+#: arm.cc:8030 arm.cc:8463 i386.cc:1837 i386.cc:2286 powerpc.cc:1938
+#: powerpc.cc:2141 sparc.cc:2524 sparc.cc:3001 x86_64.cc:2441 x86_64.cc:2899
 #, c-format
 msgid "%s: unexpected reloc %u in object file"
 msgstr ""
 
-#: arm.cc:1538 i386.cc:1171 powerpc.cc:1242 sparc.cc:1896 x86_64.cc:1279
-#: x86_64.cc:1571
+#: arm.cc:8062 i386.cc:1871 sparc.cc:2422 x86_64.cc:2473
+#, c-format
+msgid "local symbol %u has bad shndx %u"
+msgstr ""
+
+#: arm.cc:8163 i386.cc:2014 powerpc.cc:1957 sparc.cc:2543 x86_64.cc:2585
+#: x86_64.cc:3021
 #, c-format
 msgid "%s: unsupported reloc %u against global symbol %s"
 msgstr ""
 
-#: arm.cc:1804 i386.cc:1542
+#: arm.cc:8621 i386.cc:2496
 #, c-format
 msgid "%s: unsupported RELA reloc section"
 msgstr ""
 
-#: arm.cc:2047
+#: arm.cc:8711
 msgid ""
-"relocation R_ARM_MOVW_ABS_NC cannot be used when makinga shared object; "
-"recompile with -fPIC"
+"unable to provide V4BX reloc interworking fix up; the target profile does "
+"not support BX instruction"
 msgstr ""
 
-#: arm.cc:2056
-msgid ""
-"relocation R_ARM_MOVT_ABS cannot be used when makinga shared object; "
-"recompile with -fPIC"
+#: arm.cc:8842
+#, c-format
+msgid "cannot relocate %s in object file"
+msgstr ""
+
+#: arm.cc:9316 arm.cc:9897
+#, c-format
+msgid "relocation overflow in %s"
+msgstr ""
+
+#: arm.cc:9324 arm.cc:9902
+#, c-format
+msgid "unexpected opcode while processing relocation %s"
+msgstr ""
+
+#: arm.cc:9468 i386.cc:2833 i386.cc:2915 i386.cc:2986 i386.cc:3022
+#: i386.cc:3094 powerpc.cc:2469 sparc.cc:3578 sparc.cc:3769 sparc.cc:3830
+#: sparc.cc:3937 x86_64.cc:3449 x86_64.cc:3549 x86_64.cc:3627 x86_64.cc:3661
+#, c-format
+msgid "unsupported reloc %u"
+msgstr ""
+
+#: arm.cc:9547
+#, c-format
+msgid "%s: unexpected %s in object file"
+msgstr ""
+
+#: arm.cc:9882
+#, c-format
+msgid "cannot handle %s in a relocatable link"
+msgstr ""
+
+#: arm.cc:9986
+#, c-format
+msgid "Source object %s has EABI version %d but output has EABI version %d."
+msgstr ""
+
+#: arm.cc:10067 powerpc.cc:767 target.cc:94
+#, c-format
+msgid "%s: unsupported ELF file type %d"
+msgstr ""
+
+#: arm.cc:10263
+#, c-format
+msgid "%s: unknown CPU architecture"
+msgstr ""
+
+#: arm.cc:10300
+#, c-format
+msgid "%s: conflicting CPU architectures %d/%d"
+msgstr ""
+
+#: arm.cc:10395
+#, c-format
+msgid "%s has both the current and legacy Tag_MPextension_use attributes"
+msgstr ""
+
+#: arm.cc:10423
+#, c-format
+msgid "%s uses VFP register arguments, output does not"
 msgstr ""
 
-#: arm.cc:2067
+#: arm.cc:10569
+#, c-format
+msgid "conflicting architecture profiles %c/%c"
+msgstr ""
+
+#. It's sometimes ok to mix different configs, so this is only
+#. a warning.
+#: arm.cc:10627
+#, c-format
+msgid "%s: conflicting platform configuration"
+msgstr ""
+
+#: arm.cc:10636
+#, c-format
+msgid "%s: conflicting use of R9"
+msgstr ""
+
+#: arm.cc:10649
+#, c-format
+msgid "%s: SB relative addressing conflicts with use of R9"
+msgstr ""
+
+#: arm.cc:10664
+#, c-format
 msgid ""
-"relocation R_ARM_THM_MOVW_ABS_NC cannot be used whenmaking a shared object; "
-"recompile with -fPIC"
+"%s uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of "
+"wchar_t values across objects may fail"
 msgstr ""
 
-#: arm.cc:2077
+#: arm.cc:10690
+#, c-format
 msgid ""
-"relocation R_ARM_THM_MOVT_ABS cannot be used whenmaking a shared object; "
-"recompile with -fPIC"
+"%s uses %s enums yet the output is to use %s enums; use of enum values "
+"across objects may fail"
 msgstr ""
 
-#: arm.cc:2141
-msgid "cannot find origin of R_ARM_BASE_PREL"
+#: arm.cc:10706
+#, c-format
+msgid "%s uses iWMMXt register arguments, output does not"
 msgstr ""
 
-#: arm.cc:2169
-msgid "cannot find origin of R_ARM_BASE_ABS"
+#: arm.cc:10727
+#, c-format
+msgid "fp16 format mismatch between %s and output"
 msgstr ""
 
-#: arm.cc:2230 i386.cc:1820 i386.cc:2521 powerpc.cc:1798 sparc.cc:2711
-#: x86_64.cc:1935 x86_64.cc:2518
+#: arm.cc:10748
 #, c-format
-msgid "unexpected reloc %u in object file"
+msgid "DIV usage mismatch between %s and output"
 msgstr ""
 
-#: arm.cc:2236 i386.cc:1852 i386.cc:1931 i386.cc:1983 i386.cc:2014
-#: i386.cc:2076 powerpc.cc:1804 sparc.cc:2717 sparc.cc:2900 sparc.cc:2961
-#: sparc.cc:3068 x86_64.cc:1956 x86_64.cc:2039 x86_64.cc:2094 x86_64.cc:2119
+#: arm.cc:10767
 #, c-format
-msgid "unsupported reloc %u"
+msgid "%s has has both the current and legacy Tag_MPextension_use attributes"
 msgstr ""
 
-#: arm.cc:2248
+#: arm.cc:10813 arm.cc:10906
 #, c-format
-msgid "relocation overflow in relocation %u"
+msgid "%s: unknown mandatory EABI object attribute %d"
 msgstr ""
 
-#: arm.cc:2256
+#: arm.cc:10817 arm.cc:10911
 #, c-format
-msgid "unexpected opcode while processing relocation %u"
+msgid "%s: unknown EABI object attribute %d"
 msgstr ""
 
-#: arm.cc:2359 i386.cc:2535
+#: arm.cc:11262
 #, c-format
-msgid "unsupported reloc %u in object file"
+msgid "cannot handle branch to local %u in a merged section %s"
+msgstr ""
+
+#: arm.cc:11342 target-reloc.h:377
+msgid "relocation refers to discarded section"
+msgstr ""
+
+#. We cannot handle this now.
+#: arm.cc:11506
+#, c-format
+msgid "multiple SHT_ARM_EXIDX sections %s and %s in a non-relocatable link"
+msgstr ""
+
+#: attributes.cc:410
+#, c-format
+msgid "%s: must be processed by '%s' toolchain"
+msgstr ""
+
+#: attributes.cc:418
+#, c-format
+msgid "%s: object tag '%d, %s' is incompatible with tag '%d, %s'"
 msgstr ""
 
 #: binary.cc:129
@@ -175,211 +428,242 @@ msgstr ""
 msgid "cannot open %s: %s:"
 msgstr ""
 
-#: compressed_output.cc:128
+#: common.cc:352 output.cc:2368 output.cc:2477
+#, c-format
+msgid "out of patch space in section %s; relink with --incremental-full"
+msgstr ""
+
+#: compressed_output.cc:225
 msgid "not compressing section data: zlib error"
 msgstr ""
 
-#: cref.cc:244
+#: cref.cc:384
 #, c-format
 msgid "cannot open symbol count file %s: %s"
 msgstr ""
 
-#: descriptors.cc:116
+#: cref.cc:398
+#, c-format
+msgid ""
+"\n"
+"Cross Reference Table\n"
+"\n"
+msgstr ""
+
+#: cref.cc:399
+msgid "Symbol"
+msgstr ""
+
+#: cref.cc:401
+msgid "File"
+msgstr ""
+
+#: descriptors.cc:125
 #, c-format
 msgid "file %s was removed during the link"
 msgstr ""
 
-#: descriptors.cc:169
+#: descriptors.cc:177
 msgid "out of file descriptors and couldn't close any"
 msgstr ""
 
-#: descriptors.cc:190 descriptors.cc:226
+#: descriptors.cc:198 descriptors.cc:234
 #, c-format
 msgid "while closing %s: %s"
 msgstr ""
 
-#: dirsearch.cc:71
+#: dirsearch.cc:73
 #, c-format
 msgid "%s: can not read directory: %s"
 msgstr ""
 
-#: dwarf_reader.cc:53 dwarf_reader.cc:84
-msgid "Unusually large LEB128 decoded, debug information may be corrupted"
+#: dwarf_reader.cc:433
+#, c-format
+msgid ""
+"%s: DWARF info may be corrupt; offsets in a range list entry are in "
+"different sections"
+msgstr ""
+
+#: dwarf_reader.cc:1120
+#, c-format
+msgid "%s: corrupt debug info in %s"
 msgstr ""
 
-#: dynobj.cc:164
+#: dynobj.cc:176
 #, c-format
 msgid "unexpected duplicate type %u section: %u, %u"
 msgstr ""
 
-#: dynobj.cc:200
+#: dynobj.cc:231
 #, c-format
 msgid "unexpected link in section %u header: %u != %u"
 msgstr ""
 
-#: dynobj.cc:236
+#: dynobj.cc:267
 #, c-format
 msgid "DYNAMIC section %u link out of range: %u"
 msgstr ""
 
-#: dynobj.cc:244
+#: dynobj.cc:275
 #, c-format
 msgid "DYNAMIC section %u link %u is not a strtab"
 msgstr ""
 
-#: dynobj.cc:273
+#: dynobj.cc:304
 #, c-format
 msgid "DT_SONAME value out of range: %lld >= %lld"
 msgstr ""
 
-#: dynobj.cc:285
+#: dynobj.cc:316
 #, c-format
 msgid "DT_NEEDED value out of range: %lld >= %lld"
 msgstr ""
 
-#: dynobj.cc:298
+#: dynobj.cc:329
 msgid "missing DT_NULL in dynamic segment"
 msgstr ""
 
-#: dynobj.cc:344
+#: dynobj.cc:382
 #, c-format
 msgid "invalid dynamic symbol table name index: %u"
 msgstr ""
 
-#: dynobj.cc:351
+#: dynobj.cc:389
 #, c-format
 msgid "dynamic symbol table name section has wrong type: %u"
 msgstr ""
 
-#: dynobj.cc:438 object.cc:463 object.cc:1106
+#: dynobj.cc:476 object.cc:656 object.cc:1401
 #, c-format
 msgid "bad section name offset for section %u: %lu"
 msgstr ""
 
-#: dynobj.cc:468
+#: dynobj.cc:506
 #, c-format
 msgid "duplicate definition for version %u"
 msgstr ""
 
-#: dynobj.cc:497
+#: dynobj.cc:535
 #, c-format
 msgid "unexpected verdef version %u"
 msgstr ""
 
-#: dynobj.cc:513
+#: dynobj.cc:551
 #, c-format
 msgid "verdef vd_cnt field too small: %u"
 msgstr ""
 
-#: dynobj.cc:521
+#: dynobj.cc:559
 #, c-format
 msgid "verdef vd_aux field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:532
+#: dynobj.cc:570
 #, c-format
 msgid "verdaux vda_name field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:542
+#: dynobj.cc:580
 #, c-format
 msgid "verdef vd_next field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:576
+#: dynobj.cc:614
 #, c-format
 msgid "unexpected verneed version %u"
 msgstr ""
 
-#: dynobj.cc:585
+#: dynobj.cc:623
 #, c-format
 msgid "verneed vn_aux field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:599
+#: dynobj.cc:637
 #, c-format
 msgid "vernaux vna_name field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:610
+#: dynobj.cc:648
 #, c-format
 msgid "verneed vna_next field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:621
+#: dynobj.cc:659
 #, c-format
 msgid "verneed vn_next field out of range: %u"
 msgstr ""
 
-#: dynobj.cc:670
+#: dynobj.cc:708
 msgid "size of dynamic symbols is not multiple of symbol size"
 msgstr ""
 
-#: dynobj.cc:1435
+#: dynobj.cc:1524
 #, c-format
 msgid "symbol %s has undefined version %s"
 msgstr ""
 
-#: ehframe.h:82
+#: ehframe.cc:378
+msgid "overflow in PLT unwind data; unwinding through PLT may fail"
+msgstr ""
+
+#: ehframe.h:78
 msgid "** eh_frame_hdr"
 msgstr ""
 
-#: ehframe.h:353
+#: ehframe.h:391
 msgid "** eh_frame"
 msgstr ""
 
-#: errors.cc:81
+#: errors.cc:81 errors.cc:92
 #, c-format
 msgid "%s: fatal error: "
 msgstr ""
 
-#: errors.cc:92
+#: errors.cc:103 errors.cc:139
 #, c-format
 msgid "%s: error: "
 msgstr ""
 
-#: errors.cc:104
+#: errors.cc:115 errors.cc:155
 #, c-format
 msgid "%s: warning: "
 msgstr ""
 
-#: errors.cc:128
-#, c-format
-msgid "%s: %s: error: "
+#: errors.cc:179
+msgid "warning"
 msgstr ""
 
-#: errors.cc:144
-#, c-format
-msgid "%s: %s: warning: "
+#: errors.cc:184
+msgid "error"
 msgstr ""
 
-#: errors.cc:167
+#: errors.cc:190
 #, c-format
-msgid "%s: %s: error: undefined reference to '%s'\n"
+msgid "%s: %s: undefined reference to '%s'\n"
 msgstr ""
 
-#: errors.cc:172
+#: errors.cc:194
 #, c-format
-msgid "%s: %s: error: undefined reference to '%s', version '%s'\n"
+msgid "%s: %s: undefined reference to '%s', version '%s'\n"
 msgstr ""
 
-#: errors.cc:182
+#: errors.cc:203
 #, c-format
 msgid "%s: "
 msgstr ""
 
-#: expression.cc:172
+#: expression.cc:192
 #, c-format
 msgid "undefined symbol '%s' referenced in expression"
 msgstr ""
 
-#: expression.cc:209
+#: expression.cc:230
 msgid "invalid reference to dot symbol outside of SECTIONS clause"
 msgstr ""
 
 #. Handle unary operators.  We use a preprocessor macro as a hack to
 #. capture the C operator.
-#: expression.cc:278
+#: expression.cc:302
 msgid "unary "
 msgstr ""
 
@@ -391,125 +675,149 @@ msgstr ""
 #. if the right operand is zero.  WARN means that we should warn if
 #. used on section relative values in a relocatable link.  We always
 #. warn if used on values in different sections in a relocatable link.
-#: expression.cc:400
+#: expression.cc:446
 msgid "binary "
 msgstr ""
 
-#: expression.cc:404
+#: expression.cc:450
 msgid " by zero"
 msgstr ""
 
-#: expression.cc:575
+#: expression.cc:636
 msgid "max applied to section relative value"
 msgstr ""
 
-#: expression.cc:610
+#: expression.cc:687
 msgid "min applied to section relative value"
 msgstr ""
 
-#: expression.cc:740
+#: expression.cc:828
 msgid "aligning to section relative value"
 msgstr ""
 
-#: expression.cc:895
+#: expression.cc:993
 #, c-format
 msgid "unknown constant %s"
 msgstr ""
 
-#: expression.cc:1126
-msgid "SEGMENT_START not implemented"
-msgstr ""
-
-#: expression.cc:1135
-msgid "ORIGIN not implemented"
-msgstr ""
-
-#: expression.cc:1141
-msgid "LENGTH not implemented"
-msgstr ""
-
-#: fileread.cc:65
+#: fileread.cc:140
 #, c-format
 msgid "munmap failed: %s"
 msgstr ""
 
-#: fileread.cc:129
+#: fileread.cc:208
 #, c-format
 msgid "%s: fstat failed: %s"
 msgstr ""
 
-#: fileread.cc:169
+#: fileread.cc:249
 #, c-format
 msgid "could not reopen file %s"
 msgstr ""
 
-#: fileread.cc:302
+#: fileread.cc:398
 #, c-format
 msgid "%s: pread failed: %s"
 msgstr ""
 
-#: fileread.cc:308
+#: fileread.cc:404
 #, c-format
 msgid "%s: file too short: read only %lld of %lld bytes at %lld"
 msgstr ""
 
-#: fileread.cc:372
+#: fileread.cc:527
 #, c-format
 msgid ""
 "%s: attempt to map %lld bytes at offset %lld exceeds size of file; the file "
 "may be corrupt"
 msgstr ""
 
-#: fileread.cc:402
-#, c-format
-msgid "%s: mmap offset %lld size %lld failed: %s"
-msgstr ""
-
-#: fileread.cc:548
+#: fileread.cc:667
 #, c-format
 msgid "%s: lseek failed: %s"
 msgstr ""
 
-#: fileread.cc:554
+#: fileread.cc:673
 #, c-format
 msgid "%s: readv failed: %s"
 msgstr ""
 
-#: fileread.cc:557
+#: fileread.cc:676
 #, c-format
 msgid "%s: file too short: read only %zd of %zd bytes at %lld"
 msgstr ""
 
-#: fileread.cc:706
+#: fileread.cc:843
 #, c-format
 msgid "%s: total bytes mapped for read: %llu\n"
 msgstr ""
 
-#: fileread.cc:708
+#: fileread.cc:845
 #, c-format
 msgid "%s: maximum bytes mapped for read at one time: %llu\n"
 msgstr ""
 
-#: fileread.cc:791
+#: fileread.cc:928
 #, c-format
 msgid "%s: stat failed: %s"
 msgstr ""
 
-#: fileread.cc:849
+#: fileread.cc:1025
 #, c-format
 msgid "cannot find %s%s"
 msgstr ""
 
-#: fileread.cc:880
+#: fileread.cc:1050
 #, c-format
 msgid "cannot find %s"
 msgstr ""
 
-#: fileread.cc:904
+#: fileread.cc:1089
 #, c-format
 msgid "cannot open %s: %s"
 msgstr ""
 
+#: gdb-index.cc:364
+#, c-format
+msgid "%s: --gdb-index currently supports only C and C++ languages"
+msgstr ""
+
+#. The top level DIE should be one of the above.
+#: gdb-index.cc:385
+#, c-format
+msgid "%s: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit"
+msgstr ""
+
+#: gdb-index.cc:838
+#, c-format
+msgid ""
+"%s: DWARF info may be corrupt; low_pc and high_pc are in different sections"
+msgstr ""
+
+#: gdb-index.cc:936
+#, c-format
+msgid "%s: DWARF CUs: %u\n"
+msgstr ""
+
+#: gdb-index.cc:938
+#, c-format
+msgid "%s: DWARF CUs without pubnames/pubtypes: %u\n"
+msgstr ""
+
+#: gdb-index.cc:940
+#, c-format
+msgid "%s: DWARF TUs: %u\n"
+msgstr ""
+
+#: gdb-index.cc:942
+#, c-format
+msgid "%s: DWARF TUs without pubnames/pubtypes: %u\n"
+msgstr ""
+
+#: gdb-index.h:126
+msgid "** gdb_index"
+msgstr ""
+
 #: gold-threads.cc:103
 #, c-format
 msgid "pthead_mutextattr_init failed: %s"
@@ -535,12 +843,12 @@ msgstr ""
 msgid "pthread_mutex_destroy failed: %s"
 msgstr ""
 
-#: gold-threads.cc:131 gold-threads.cc:382
+#: gold-threads.cc:131 gold-threads.cc:393
 #, c-format
 msgid "pthread_mutex_lock failed: %s"
 msgstr ""
 
-#: gold-threads.cc:139 gold-threads.cc:394
+#: gold-threads.cc:139 gold-threads.cc:407
 #, c-format
 msgid "pthread_mutex_unlock failed: %s"
 msgstr ""
@@ -570,160 +878,277 @@ msgstr ""
 msgid "pthread_cond_broadcast failed: %s"
 msgstr ""
 
-#: gold-threads.cc:388
+#: gold-threads.cc:400
 #, c-format
 msgid "pthread_once failed: %s"
 msgstr ""
 
-#: gold.cc:91
+#: gold.cc:101
 #, c-format
 msgid "%s: internal error in %s, at %s:%d\n"
 msgstr ""
 
-#: gold.cc:173
+#: gold.cc:191
 msgid "no input files"
 msgstr ""
 
-#: gold.cc:226
+#: gold.cc:221
+msgid "linking with --incremental-full"
+msgstr ""
+
+#: gold.cc:223
+msgid "restart link with --incremental-full"
+msgstr ""
+
+#: gold.cc:285
 msgid "cannot mix -r with --gc-sections or --icf"
 msgstr ""
 
-#: gold.cc:407
+#: gold.cc:612
 #, c-format
 msgid "cannot mix -static with dynamic object %s"
 msgstr ""
 
-#: gold.cc:411
+#: gold.cc:616
 #, c-format
 msgid "cannot mix -r with dynamic object %s"
 msgstr ""
 
-#: gold.cc:415
+#: gold.cc:620
 #, c-format
 msgid "cannot use non-ELF output format with dynamic object %s"
 msgstr ""
 
-#: gold.cc:427
+#: gold.cc:632
 #, c-format
 msgid "cannot mix split-stack '%s' and non-split-stack '%s' when using -r"
 msgstr ""
 
 #. FIXME: This needs to specify the location somehow.
-#: i386.cc:232 i386.cc:1669 sparc.cc:234 sparc.cc:2395 x86_64.cc:237
-#: x86_64.cc:1732
+#: i386.cc:600 i386.cc:2648 sparc.cc:309 sparc.cc:3177 x86_64.cc:745
+#: x86_64.cc:3216
 msgid "missing expected TLS relocation"
 msgstr ""
 
-#: i386.cc:944 x86_64.cc:1068
+#: i386.cc:1696 sparc.cc:2224 x86_64.cc:2256
 #, c-format
-msgid "section symbol %u has bad shndx %u"
+msgid "%s: unsupported TLS reloc %u for IFUNC symbol"
 msgstr ""
 
-#: i386.cc:1036 i386.cc:1060 sparc.cc:1777 x86_64.cc:1176 x86_64.cc:1204
+#: i386.cc:2801 i386.cc:3550 powerpc.cc:2463 sparc.cc:3572 x86_64.cc:3428
+#: x86_64.cc:4158
 #, c-format
-msgid "local symbol %u has bad shndx %u"
+msgid "unexpected reloc %u in object file"
 msgstr ""
 
-#: i386.cc:1991
+#: i386.cc:2994
 msgid "both SUN and GNU model TLS relocations"
 msgstr ""
 
-#: i386.cc:2730 x86_64.cc:2719
+#: i386.cc:3564
+#, c-format
+msgid "unsupported reloc %u in object file"
+msgstr ""
+
+#: i386.cc:3794 x86_64.cc:4412
 #, c-format
 msgid "failed to match split-stack sequence at section %u offset %0zx"
 msgstr ""
 
-#: icf.cc:616
+#: icf.cc:749
 #, c-format
 msgid "%s: ICF Converged after %u iteration(s)"
 msgstr ""
 
-#: icf.cc:619
+#: icf.cc:752
 #, c-format
 msgid "%s: ICF stopped after %u iteration(s)"
 msgstr ""
 
-#: icf.cc:633
+#: icf.cc:766
 #, c-format
 msgid "Could not find symbol %s to unfold\n"
 msgstr ""
 
-#: incremental.cc:242
+#: incremental.cc:80
+msgid "** incremental_inputs"
+msgstr ""
+
+#: incremental.cc:145
 #, c-format
 msgid "the link might take longer: cannot perform incremental link: %s"
 msgstr ""
 
-#: incremental.cc:302
+#: incremental.cc:411
 msgid "no incremental data from previous build"
 msgstr ""
 
-#: incremental.cc:309 incremental.cc:332
-msgid "invalid incremental build data"
-msgstr ""
-
-#: incremental.cc:321
+#: incremental.cc:417
 msgid "different version of incremental build data"
 msgstr ""
 
-#: incremental.cc:338
+#: incremental.cc:429
 msgid "command line changed"
 msgstr ""
 
-#: incremental.cc:362
+#: incremental.cc:456
+#, c-format
+msgid "%s: script file changed"
+msgstr ""
+
+#: incremental.cc:859
 #, c-format
 msgid "unsupported ELF machine number %d"
 msgstr ""
 
-#: incremental.cc:387
+#: incremental.cc:867 object.cc:2998
+#, c-format
+msgid "%s: incompatible target"
+msgstr ""
+
+#: incremental.cc:889
 msgid "output is not an ELF file."
 msgstr ""
 
-#: incremental.cc:410
+#: incremental.cc:912
 msgid "unsupported file: 32-bit, big-endian"
 msgstr ""
 
-#: incremental.cc:419
+#: incremental.cc:921
 msgid "unsupported file: 32-bit, little-endian"
 msgstr ""
 
-#: incremental.cc:431
+#: incremental.cc:933
 msgid "unsupported file: 64-bit, big-endian"
 msgstr ""
 
-#: incremental.cc:440
+#: incremental.cc:942
 msgid "unsupported file: 64-bit, little-endian"
 msgstr ""
 
-#: layout.cc:1887
+#: incremental.cc:2078
+msgid "COMDAT group has no signature"
+msgstr ""
+
+#: incremental.cc:2084
+#, c-format
+msgid "COMDAT group %s included twice in incremental link"
+msgstr ""
+
+#: int_encoding.cc:50 int_encoding.cc:83
+msgid "Unusually large LEB128 decoded, debug information may be corrupted"
+msgstr ""
+
+#: layout.cc:225
+#, c-format
+msgid "%s: total free lists: %u\n"
+msgstr ""
+
+#: layout.cc:227
+#, c-format
+msgid "%s: total free list nodes: %u\n"
+msgstr ""
+
+#: layout.cc:229
+#, c-format
+msgid "%s: calls to Free_list::remove: %u\n"
+msgstr ""
+
+#: layout.cc:231 layout.cc:235
+#, c-format
+msgid "%s: nodes visited: %u\n"
+msgstr ""
+
+#: layout.cc:233
+#, c-format
+msgid "%s: calls to Free_list::allocate: %u\n"
+msgstr ""
+
+#: layout.cc:852
+#, c-format
+msgid ""
+"Unable to create output section '%s' because it is not allowed by the "
+"SECTIONS clause of the linker script"
+msgstr ""
+
+#: layout.cc:1810
+msgid ""
+"multiple '.interp' sections in input files may cause confusing PT_INTERP "
+"segment"
+msgstr ""
+
+#: layout.cc:1874
+#, c-format
+msgid "%s: missing .note.GNU-stack section implies executable stack"
+msgstr ""
+
+#: layout.cc:1886
+#, c-format
+msgid "%s: requires executable stack"
+msgstr ""
+
+#: layout.cc:2358
+#, c-format
+msgid "unable to open --section-ordering-file file %s: %s"
+msgstr ""
+
+#: layout.cc:2792
 #, c-format
 msgid "--build-id=uuid failed: could not open /dev/urandom: %s"
 msgstr ""
 
-#: layout.cc:1894
+#: layout.cc:2799
 #, c-format
 msgid "/dev/urandom: read failed: %s"
 msgstr ""
 
-#: layout.cc:1896
+#: layout.cc:2801
 #, c-format
 msgid "/dev/urandom: expected %zu bytes, got %zd bytes"
 msgstr ""
 
-#: layout.cc:1918
+#: layout.cc:2823
 #, c-format
 msgid "--build-id argument '%s' not a valid hex number"
 msgstr ""
 
-#: layout.cc:1924
+#: layout.cc:2829
 #, c-format
 msgid "unrecognized --build-id argument '%s'"
 msgstr ""
 
-#: layout.cc:2337
+#: layout.cc:3356
 #, c-format
 msgid "load segment overlap [0x%llx -> 0x%llx] and [0x%llx -> 0x%llx]"
 msgstr ""
 
+#: layout.cc:3512 output.cc:4396
+#, c-format
+msgid "out of patch space for section %s; relink with --incremental-full"
+msgstr ""
+
+#: layout.cc:3521 output.cc:4404
+#, c-format
+msgid "%s: section changed size; relink with --incremental-full"
+msgstr ""
+
+#: layout.cc:3778
+msgid "out of patch space for symbol table; relink with --incremental-full"
+msgstr ""
+
+#: layout.cc:3849
+msgid ""
+"out of patch space for section header table; relink with --incremental-full"
+msgstr ""
+
+#: layout.cc:4568
+msgid "read-only segment has dynamic relocations"
+msgstr ""
+
+#: layout.cc:4571
+msgid "shared library text segment is not shareable"
+msgstr ""
+
 #: mapfile.cc:70
 #, c-format
 msgid "cannot open map file %s: %s"
@@ -763,7 +1188,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: mapfile.cc:361
+#: mapfile.cc:367
 #, c-format
 msgid ""
 "\n"
@@ -771,157 +1196,157 @@ msgid ""
 "\n"
 msgstr ""
 
-#: merge.cc:455
+#: merge.cc:493
 #, c-format
 msgid "%s: %s merged constants size: %lu; input: %zu; output: %zu\n"
 msgstr ""
 
-#: merge.cc:478
+#: merge.cc:520
 msgid "mergeable string section length not multiple of character size"
 msgstr ""
 
-#: merge.cc:494
+#: merge.cc:529
 #, c-format
 msgid "%s: last entry in mergeable string section '%s' not null terminated"
 msgstr ""
 
-#: merge.cc:613
+#: merge.cc:701
+#, c-format
+msgid "%s: %s input bytes: %zu\n"
+msgstr ""
+
+#: merge.cc:703
 #, c-format
-msgid "%s: %s input: %zu\n"
+msgid "%s: %s input strings: %zu\n"
 msgstr ""
 
-#: merge.h:300
+#: merge.h:366
 msgid "** merge constants"
 msgstr ""
 
-#: merge.h:422
+#: merge.h:496
 msgid "** merge strings"
 msgstr ""
 
-#: object.cc:75
+#: nacl.cc:42 object.cc:173 object.cc:3046 output.cc:5026
+#, c-format
+msgid "%s: %s"
+msgstr ""
+
+#: object.cc:100
 msgid "missing SHT_SYMTAB_SHNDX section"
 msgstr ""
 
-#: object.cc:119
+#: object.cc:144
 #, c-format
 msgid "symbol %u out of range for SHT_SYMTAB_SHNDX section"
 msgstr ""
 
-#: object.cc:126
+#: object.cc:151
 #, c-format
 msgid "extended index for symbol %u out of range: %u"
 msgstr ""
 
-#: object.cc:148 object.cc:2331 output.cc:4052
-#, c-format
-msgid "%s: %s"
-msgstr ""
-
-#: object.cc:190
+#: object.cc:206
 #, c-format
 msgid "section name section has wrong type: %u"
 msgstr ""
 
-#: object.cc:546
-#, c-format
-msgid "invalid symbol table name index: %u"
-msgstr ""
-
-#: object.cc:552
-#, c-format
-msgid "symbol table name section has wrong type: %u"
-msgstr ""
-
-#: object.cc:641
+#: object.cc:880
 #, c-format
 msgid "section group %u info %u out of range"
 msgstr ""
 
-#: object.cc:660
+#: object.cc:899
 #, c-format
 msgid "symbol %u name offset %u out of range"
 msgstr ""
 
-#: object.cc:678
+#: object.cc:917
 #, c-format
 msgid "symbol %u invalid section index %u"
 msgstr ""
 
-#: object.cc:723
+#: object.cc:969
 #, c-format
 msgid "section %u in section group %u out of range"
 msgstr ""
 
-#: object.cc:731
+#: object.cc:977
 #, c-format
 msgid "invalid section group %u refers to earlier section %u"
 msgstr ""
 
-#: object.cc:1037 reloc.cc:271 reloc.cc:838
+#: object.cc:1328 reloc.cc:290 reloc.cc:939
 #, c-format
 msgid "relocation section %u has bad info %u"
 msgstr ""
 
-#: object.cc:1231
+#: object.cc:1557
 #, c-format
 msgid "%s: removing unused section from '%s' in file '%s'"
 msgstr ""
 
-#: object.cc:1257
+#: object.cc:1583
 #, c-format
 msgid "%s: ICF folding section '%s' in file '%s'into '%s' in file '%s'"
 msgstr ""
 
-#: object.cc:1454
+#: object.cc:1862
 msgid "size of symbols is not multiple of symbol size"
 msgstr ""
 
-#: object.cc:1563
+#: object.cc:2090
 #, c-format
 msgid "local symbol %u section name out of range: %u >= %u"
 msgstr ""
 
-#: object.cc:1652
+#: object.cc:2180
 #, c-format
 msgid "unknown section index %u for local symbol %u"
 msgstr ""
 
-#: object.cc:1661
+#: object.cc:2190
 #, c-format
 msgid "local symbol %u section index %u out of range"
 msgstr ""
 
-#: object.cc:2169
+#: object.cc:2759 reloc.cc:870
+#, c-format
+msgid "could not decompress section %s"
+msgstr ""
+
+#: object.cc:2875
 #, c-format
 msgid "%s is not supported but is required for %s in %s"
 msgstr ""
 
-#: object.cc:2273
+#: object.cc:2952
 #, c-format
-msgid "%s: unsupported ELF machine number %d"
+msgid ":function %s"
 msgstr ""
 
-#: object.cc:2283
+#: object.cc:2988
 #, c-format
-msgid "%s: incompatible target"
+msgid "%s: unsupported ELF machine number %d"
 msgstr ""
 
-#: object.cc:2347 plugin.cc:1019
+#: object.cc:3062 plugin.cc:1707
 #, c-format
 msgid "%s: not configured to support 32-bit big-endian object"
 msgstr ""
 
-#: object.cc:2363 plugin.cc:1028
+#: object.cc:3078 plugin.cc:1716
 #, c-format
 msgid "%s: not configured to support 32-bit little-endian object"
 msgstr ""
 
-#: object.cc:2382 plugin.cc:1040
+#: object.cc:3097 plugin.cc:1728
 #, c-format
 msgid "%s: not configured to support 64-bit big-endian object"
 msgstr ""
 
-#: object.cc:2398 plugin.cc:1049
+#: object.cc:3113 plugin.cc:1737
 #, c-format
 msgid "%s: not configured to support 64-bit little-endian object"
 msgstr ""
@@ -940,1286 +1365,1844 @@ msgstr ""
 msgid "%s: supported targets:"
 msgstr ""
 
-#: options.cc:176
+#: options.cc:173
+#, c-format
+msgid "%s: supported emulations:"
+msgstr ""
+
+#: options.cc:185
 #, c-format
 msgid "Report bugs to %s\n"
 msgstr ""
 
-#: options.cc:193 options.cc:203 options.cc:213
+#: options.cc:202 options.cc:212 options.cc:222
 #, c-format
 msgid "%s: invalid option value (expected an integer): %s"
 msgstr ""
 
-#: options.cc:223
+#: options.cc:232 options.cc:243
 #, c-format
 msgid "%s: invalid option value (expected a floating point number): %s"
 msgstr ""
 
-#: options.cc:232
+#: options.cc:252
 #, c-format
 msgid "%s: must take a non-empty argument"
 msgstr ""
 
-#: options.cc:273
+#: options.cc:293
 #, c-format
 msgid "%s: must take one of the following arguments: %s"
 msgstr ""
 
-#: options.cc:300
+#: options.cc:324
 #, c-format
 msgid "  Supported targets:\n"
 msgstr ""
 
-#: options.cc:409
+#: options.cc:332
+#, c-format
+msgid "  Supported emulations:\n"
+msgstr ""
+
+#: options.cc:475
+msgid "invalid argument to --section-start; must be SECTION=ADDRESS"
+msgstr ""
+
+#: options.cc:488
+msgid "--section-start address missing"
+msgstr ""
+
+#: options.cc:497
+#, c-format
+msgid "--section-start argument %s is not a valid hex number"
+msgstr ""
+
+#: options.cc:534
 #, c-format
 msgid "unable to parse script file %s"
 msgstr ""
 
-#: options.cc:417
+#: options.cc:542
 #, c-format
 msgid "unable to parse version script file %s"
 msgstr ""
 
-#: options.cc:425
+#: options.cc:550
 #, c-format
 msgid "unable to parse dynamic-list script file %s"
 msgstr ""
 
-#: options.cc:522
+#: options.cc:661
 #, c-format
 msgid ""
 "format '%s' not supported; treating as elf (supported formats: elf, binary)"
 msgstr ""
 
-#: options.cc:538
+#: options.cc:703
 #, c-format
 msgid "%s: use the --help option for usage information\n"
 msgstr ""
 
-#: options.cc:547
+#: options.cc:712
 #, c-format
 msgid "%s: %s: %s\n"
 msgstr ""
 
-#: options.cc:651
+#: options.cc:816
 msgid "unexpected argument"
 msgstr ""
 
-#: options.cc:664 options.cc:725
+#: options.cc:829 options.cc:890
 msgid "missing argument"
 msgstr ""
 
-#: options.cc:736
+#: options.cc:901
 msgid "unknown -z option"
 msgstr ""
 
-#: options.cc:935
+#: options.cc:1112
 #, c-format
 msgid "ignoring --threads: %s was compiled without thread support"
 msgstr ""
 
-#: options.cc:942
+#: options.cc:1119
 #, c-format
 msgid "ignoring --thread-count: %s was compiled without thread support"
 msgstr ""
 
-#: options.cc:981
+#: options.cc:1173
 #, c-format
 msgid "unable to open -retain-symbols-file file %s: %s"
 msgstr ""
 
-#: options.cc:1003
+#: options.cc:1203
 msgid "-shared and -static are incompatible"
 msgstr ""
 
-#: options.cc:1005
+#: options.cc:1205
 msgid "-shared and -pie are incompatible"
 msgstr ""
 
-#: options.cc:1008
+#: options.cc:1207
+msgid "-pie and -static are incompatible"
+msgstr ""
+
+#: options.cc:1210
 msgid "-shared and -r are incompatible"
 msgstr ""
 
-#: options.cc:1010
+#: options.cc:1212
 msgid "-pie and -r are incompatible"
 msgstr ""
 
-#: options.cc:1014
+#: options.cc:1217
+msgid "-F/--filter may not used without -shared"
+msgstr ""
+
+#: options.cc:1219
+msgid "-f/--auxiliary may not be used without -shared"
+msgstr ""
+
+#: options.cc:1224
 msgid "-retain-symbols-file does not yet work with -r"
 msgstr ""
 
-#: options.cc:1020
+#: options.cc:1230
 msgid "binary output format not compatible with -shared or -pie or -r"
 msgstr ""
 
-#: options.cc:1026
+#: options.cc:1236
 #, c-format
 msgid "--hash-bucket-empty-fraction value %g out of range [0.0, 1.0)"
 msgstr ""
 
-#: options.cc:1031
+#: options.cc:1241
 msgid ""
 "Options --incremental-changed, --incremental-unchanged, --incremental-"
 "unknown require the use of --incremental"
 msgstr ""
 
-#: options.cc:1097
+#: options.cc:1251
+msgid "incremental linking is not compatible with -r"
+msgstr ""
+
+#: options.cc:1253
+msgid "incremental linking is not compatible with --emit-relocs"
+msgstr ""
+
+#: options.cc:1256
+msgid "incremental linking is not compatible with --plugin"
+msgstr ""
+
+#: options.cc:1259
+msgid "ignoring --gc-sections for an incremental link"
+msgstr ""
+
+#: options.cc:1264
+msgid "ignoring --icf for an incremental link"
+msgstr ""
+
+#: options.cc:1269
+msgid "ignoring --compress-debug-sections for an incremental link"
+msgstr ""
+
+#: options.cc:1345
 msgid "May not nest groups"
 msgstr ""
 
-#: options.cc:1109
+#: options.cc:1347
+msgid "may not nest groups in libraries"
+msgstr ""
+
+#: options.cc:1359
 msgid "Group end without group start"
 msgstr ""
 
+#: options.cc:1369
+msgid "may not nest libraries"
+msgstr ""
+
+#: options.cc:1371
+msgid "may not nest libraries in groups"
+msgstr ""
+
+#: options.cc:1383
+msgid "lib end without lib start"
+msgstr ""
+
 #. I guess it's neither a long option nor a short option.
-#: options.cc:1174
+#: options.cc:1448
 msgid "unknown option"
 msgstr ""
 
-#: options.cc:1201
+#: options.cc:1475
 #, c-format
 msgid "%s: missing group end\n"
 msgstr ""
 
-#: options.h:571
+#: options.h:597
 msgid "Report usage information"
 msgstr ""
 
-#: options.h:573
+#: options.h:599
 msgid "Report version information"
 msgstr ""
 
-#: options.h:575
+#: options.h:601
 msgid "Report version and target information"
 msgstr ""
 
-#: options.h:584 options.h:635
+#: options.h:610 options.h:676
 msgid "Not supported"
 msgstr ""
 
-#: options.h:585 options.h:636
+#: options.h:611 options.h:677
 msgid "Do not copy DT_NEEDED tags from shared libraries"
 msgstr ""
 
-#: options.h:588
+#: options.h:614 options.h:1208
+msgid "Allow multiple definitions of symbols"
+msgstr ""
+
+#: options.h:615
+msgid "Do not allow multiple definitions"
+msgstr ""
+
+#: options.h:618
 msgid "Allow unresolved references in shared libraries"
 msgstr ""
 
-#: options.h:589
+#: options.h:619
 msgid "Do not allow unresolved references in shared libraries"
 msgstr ""
 
-#: options.h:592
+#: options.h:622
 msgid "Only set DT_NEEDED for shared libraries if used"
 msgstr ""
 
-#: options.h:593
+#: options.h:623
 msgid "Always DT_NEEDED for shared libraries"
 msgstr ""
 
-#: options.h:600
+#: options.h:626 options.h:795 options.h:1120 options.h:1130
+msgid "Ignored"
+msgstr ""
+
+#: options.h:626
+msgid "[ignored]"
+msgstr ""
+
+#: options.h:634
 msgid "Set input format"
 msgstr ""
 
-#: options.h:603
+#: options.h:637
 msgid "-l searches for shared libraries"
 msgstr ""
 
-#: options.h:605
+#: options.h:639
 msgid "-l does not search for shared libraries"
 msgstr ""
 
-#: options.h:609
+#: options.h:642
+msgid "alias for -Bdynamic"
+msgstr ""
+
+#: options.h:644
+msgid "alias for -Bstatic"
+msgstr ""
+
+#: options.h:647
+msgid "Use group name lookup rules for shared library"
+msgstr ""
+
+#: options.h:650
 msgid "Bind defined symbols locally"
 msgstr ""
 
-#: options.h:612
+#: options.h:653
 msgid "Bind defined function symbols locally"
 msgstr ""
 
-#: options.h:615
+#: options.h:656
 msgid "Generate build ID note"
 msgstr ""
 
-#: options.h:616 options.h:655
+#: options.h:657 options.h:704
 msgid "[=STYLE]"
 msgstr ""
 
-#: options.h:619
+#: options.h:660
 msgid "Check segment addresses for overlaps (default)"
 msgstr ""
 
-#: options.h:620
+#: options.h:661
 msgid "Do not check segment addresses for overlaps"
 msgstr ""
 
-#: options.h:624 options.h:629
+#: options.h:665 options.h:670
 msgid "Compress .debug_* sections in the output file"
 msgstr ""
 
-#: options.h:630
+#: options.h:671
 msgid "[none]"
 msgstr ""
 
-#: options.h:639
+#: options.h:680
+msgid "Output cross reference table"
+msgstr ""
+
+#: options.h:681
+msgid "Do not output cross reference table"
+msgstr ""
+
+#: options.h:684
+msgid "Use DT_INIT_ARRAY for all constructors (default)"
+msgstr ""
+
+#: options.h:685
+msgid "Handle constructors as directed by compiler"
+msgstr ""
+
+#: options.h:688
 msgid "Define common symbols"
 msgstr ""
 
-#: options.h:640
+#: options.h:689
 msgid "Do not define common symbols"
 msgstr ""
 
-#: options.h:642 options.h:644
+#: options.h:691 options.h:693
 msgid "Alias for -d"
 msgstr ""
 
-#: options.h:647
+#: options.h:696
 msgid "Turn on debugging"
 msgstr ""
 
-#: options.h:648
+#: options.h:697
 msgid "[all,files,script,task][,...]"
 msgstr ""
 
-#: options.h:651
+#: options.h:700
 msgid "Define a symbol"
 msgstr ""
 
-#: options.h:651
+#: options.h:700
 msgid "SYMBOL=EXPRESSION"
 msgstr ""
 
-#: options.h:654
+#: options.h:703
 msgid "Demangle C++ symbols in log messages"
 msgstr ""
 
-#: options.h:658
+#: options.h:707
 msgid "Do not demangle C++ symbols in log messages"
 msgstr ""
 
-#: options.h:662
-msgid "Try to detect violations of the One Definition Rule"
+#: options.h:711
+msgid "Look for violations of the C++ One Definition Rule"
+msgstr ""
+
+#: options.h:712
+msgid "Do not look for violations of the C++ One Definition Rule"
 msgstr ""
 
-#: options.h:666
+#: options.h:715
+msgid "Delete all local symbols"
+msgstr ""
+
+#: options.h:717
 msgid "Delete all temporary local symbols"
 msgstr ""
 
-#: options.h:669
+#: options.h:720
 msgid "Add data symbols to dynamic symbols"
 msgstr ""
 
-#: options.h:672
+#: options.h:723
 msgid "Add C++ operator new/delete to dynamic symbols"
 msgstr ""
 
-#: options.h:675
+#: options.h:726
 msgid "Add C++ typeinfo to dynamic symbols"
 msgstr ""
 
-#: options.h:678
+#: options.h:729
 msgid "Read a list of dynamic symbols"
 msgstr ""
 
-#: options.h:678 options.h:732 options.h:766 options.h:893 options.h:921
+#: options.h:729 options.h:837 options.h:860 options.h:919 options.h:976
+#: options.h:1078 options.h:1113
 msgid "FILE"
 msgstr ""
 
-#: options.h:681
+#: options.h:732
 msgid "Set program start address"
 msgstr ""
 
-#: options.h:681 options.h:908 options.h:910 options.h:912
+#: options.h:732 options.h:1093 options.h:1095 options.h:1097
 msgid "ADDRESS"
 msgstr ""
 
-#: options.h:684
+#: options.h:735
 msgid "Exclude libraries from automatic export"
 msgstr ""
 
-#: options.h:688
+#: options.h:739
 msgid "Export all dynamic symbols"
 msgstr ""
 
-#: options.h:689
+#: options.h:740
 msgid "Do not export all dynamic symbols (default)"
 msgstr ""
 
-#: options.h:692
+#: options.h:743
+msgid "Export SYMBOL to dynamic symbol table"
+msgstr ""
+
+#: options.h:743 options.h:771 options.h:857 options.h:1058 options.h:1100
+#: options.h:1157 options.h:1160
+msgid "SYMBOL"
+msgstr ""
+
+#: options.h:746
+msgid "Link big-endian objects."
+msgstr ""
+
+#: options.h:749
+msgid "Link little-endian objects."
+msgstr ""
+
+#: options.h:752
 msgid "Create exception frame header"
 msgstr ""
 
-#: options.h:695
+#: options.h:755
+msgid "(ARM only) Do not warn about objects with incompatible enum sizes"
+msgstr ""
+
+#: options.h:759
+msgid "Auxiliary filter for shared object symbol table"
+msgstr ""
+
+#: options.h:760 options.h:764
+msgid "SHLIB"
+msgstr ""
+
+#: options.h:763
+msgid "Filter for shared object symbol table"
+msgstr ""
+
+#: options.h:767
 msgid "Treat warnings as errors"
 msgstr ""
 
-#: options.h:696
+#: options.h:768
 msgid "Do not treat warnings as errors"
 msgstr ""
 
-#: options.h:699
+#: options.h:771
 msgid "Call SYMBOL at unload-time"
 msgstr ""
 
-#: options.h:699 options.h:729 options.h:873 options.h:915 options.h:936
-#: options.h:939
-msgid "SYMBOL"
+#: options.h:774
+msgid "(ARM only) Fix binaries for Cortex-A8 erratum."
+msgstr ""
+
+#: options.h:775
+msgid "(ARM only) Do not fix binaries for Cortex-A8 erratum."
+msgstr ""
+
+#: options.h:778
+msgid "(ARM only) Fix binaries for ARM1176 erratum."
+msgstr ""
+
+#: options.h:779
+msgid "(ARM only) Do not fix binaries for ARM1176 erratum."
 msgstr ""
 
-#: options.h:702
+#: options.h:782
+msgid "(ARM only) Merge exidx entries in debuginfo."
+msgstr ""
+
+#: options.h:783
+msgid "(ARM only) Do not merge exidx entries in debuginfo."
+msgstr ""
+
+#: options.h:786
+msgid "(ARM only) Rewrite BX rn as MOV pc, rn for ARMv4"
+msgstr ""
+
+#: options.h:790
+msgid "(ARM only) Rewrite BX rn branch to ARMv4 interworking veneer"
+msgstr ""
+
+#: options.h:798
+msgid "Generate .gdb_index section"
+msgstr ""
+
+#: options.h:799
+msgid "Do not generate .gdb_index section"
+msgstr ""
+
+#: options.h:802
+msgid "Enable STB_GNU_UNIQUE symbol binding (default)"
+msgstr ""
+
+#: options.h:803
+msgid "Disable STB_GNU_UNIQUE symbol binding"
+msgstr ""
+
+#: options.h:806
 msgid "Set shared library name"
 msgstr ""
 
-#: options.h:702 options.h:792
+#: options.h:806 options.h:959 options.h:993
 msgid "FILENAME"
 msgstr ""
 
-#: options.h:705
+#: options.h:809
 msgid "Min fraction of empty buckets in dynamic hash"
 msgstr ""
 
-#: options.h:706
+#: options.h:810
 msgid "FRACTION"
 msgstr ""
 
-#: options.h:709
+#: options.h:813
 msgid "Dynamic hash style"
 msgstr ""
 
-#: options.h:709
+#: options.h:813
 msgid "[sysv,gnu,both]"
 msgstr ""
 
-#: options.h:713
+#: options.h:817
 msgid "Set dynamic linker path"
 msgstr ""
 
-#: options.h:713
+#: options.h:817
 msgid "PROGRAM"
 msgstr ""
 
-#: options.h:716
-msgid "Work in progress; do not use"
+#: options.h:820
+msgid ""
+"Do an incremental link if possible; otherwise, do a full link and prepare "
+"output for incremental linking"
+msgstr ""
+
+#: options.h:825
+msgid "Do a full link (default)"
+msgstr ""
+
+#: options.h:828
+msgid "Do a full link and prepare output for incremental linking"
+msgstr ""
+
+#: options.h:832
+msgid "Do an incremental link; exit if not possible"
+msgstr ""
+
+#: options.h:835
+msgid "Set base file for incremental linking (default is output file)"
+msgstr ""
+
+#: options.h:840
+msgid "Assume files changed"
+msgstr ""
+
+#: options.h:843
+msgid "Assume files didn't change"
+msgstr ""
+
+#: options.h:846
+msgid "Use timestamps to check files (default)"
+msgstr ""
+
+#: options.h:849
+msgid "Assume startup files unchanged (files preceding this option)"
+msgstr ""
+
+#: options.h:853
+msgid "Amount of extra space to allocate for patches"
+msgstr ""
+
+#: options.h:854
+msgid "PERCENT"
+msgstr ""
+
+#: options.h:857
+msgid "Call SYMBOL at load-time"
+msgstr ""
+
+#: options.h:860
+msgid "Read only symbol values from FILE"
 msgstr ""
 
-#: options.h:717
-msgid "Do a full build"
+#: options.h:864
+msgid "Map whole files to memory (default on 64-bit hosts)"
 msgstr ""
 
-#: options.h:720
-msgid "Assume files changed"
+#: options.h:865
+msgid "Map relevant file parts to memory (default on 32-bit hosts)"
 msgstr ""
 
-#: options.h:723
-msgid "Assume files didn't change"
+#: options.h:868
+msgid "Keep files mapped across passes (default)"
 msgstr ""
 
-#: options.h:726
-msgid "Use timestamps to check files (default)"
+#: options.h:869
+msgid "Release mapped files after each pass"
 msgstr ""
 
-#: options.h:729
-msgid "Call SYMBOL at load-time"
+#: options.h:872
+msgid "Generate unwind information for PLT (default)"
 msgstr ""
 
-#: options.h:732
-msgid "Read only symbol values from FILE"
+#: options.h:873
+msgid "Do not generate unwind information for PLT"
 msgstr ""
 
-#: options.h:735
+#: options.h:876
 msgid "Search for library LIBNAME"
 msgstr ""
 
-#: options.h:735
+#: options.h:876
 msgid "LIBNAME"
 msgstr ""
 
-#: options.h:738
+#: options.h:879
 msgid "Add directory to search path"
 msgstr ""
 
-#: options.h:738 options.h:813 options.h:816 options.h:820 options.h:887
+#: options.h:879 options.h:982 options.h:985 options.h:989 options.h:1072
 msgid "DIR"
 msgstr ""
 
-#: options.h:741
-msgid "Ignored for compatibility"
+#: options.h:882
+msgid " Only search directories specified on the command line."
+msgstr ""
+
+#: options.h:886
+msgid " Put read-only non-executable sections in their own segment"
+msgstr ""
+
+#: options.h:890
+msgid "Set GNU linker emulation; obsolete"
 msgstr ""
 
-#: options.h:741
+#: options.h:890
 msgid "EMULATION"
 msgstr ""
 
-#: options.h:744
+#: options.h:893
+msgid "Map the output file for writing (default)."
+msgstr ""
+
+#: options.h:894
+msgid "Do not map the output file for writing."
+msgstr ""
+
+#: options.h:897
 msgid "Write map file on standard output"
 msgstr ""
 
-#: options.h:745
+#: options.h:898
 msgid "Write map file"
 msgstr ""
 
-#: options.h:746
+#: options.h:899
 msgid "MAPFILENAME"
 msgstr ""
 
-#: options.h:749
+#: options.h:902
 msgid "Do not page align data"
 msgstr ""
 
-#: options.h:751
+#: options.h:904
 msgid "Do not page align data, do not make text readonly"
 msgstr ""
 
-#: options.h:752
+#: options.h:905
 msgid "Page align data, make text readonly"
 msgstr ""
 
-#: options.h:755
+#: options.h:908
 msgid "Enable use of DT_RUNPATH and DT_FLAGS"
 msgstr ""
 
-#: options.h:756
+#: options.h:909
 msgid "Disable use of DT_RUNPATH and DT_FLAGS"
 msgstr ""
 
-#: options.h:759
+#: options.h:912
 msgid "Create an output file even if errors occur"
 msgstr ""
 
-#: options.h:762 options.h:958
+#: options.h:915 options.h:1189
 msgid "Report undefined symbols (even with --shared)"
 msgstr ""
 
-#: options.h:766
+#: options.h:919
 msgid "Set output file name"
 msgstr ""
 
-#: options.h:769
+#: options.h:922
 msgid "Optimize output file size"
 msgstr ""
 
-#: options.h:769
+#: options.h:922
 msgid "LEVEL"
 msgstr ""
 
-#: options.h:772
+#: options.h:925
 msgid "Set output format"
 msgstr ""
 
-#: options.h:772
+#: options.h:925
 msgid "[binary]"
 msgstr ""
 
-#: options.h:775 options.h:777
+#: options.h:928 options.h:937
+msgid "(ARM only) Ignore for backward compatibility"
+msgstr ""
+
+#: options.h:931 options.h:933
 msgid "Create a position independent executable"
 msgstr ""
 
-#: options.h:782
+#: options.h:941
 msgid "Load a plugin library"
 msgstr ""
 
-#: options.h:782
+#: options.h:941
 msgid "PLUGIN"
 msgstr ""
 
-#: options.h:784
+#: options.h:943
 msgid "Pass an option to the plugin"
 msgstr ""
 
-#: options.h:784
+#: options.h:943
 msgid "OPTION"
 msgstr ""
 
-#: options.h:788
+#: options.h:947
+msgid "Use posix_fallocate to reserve space in the output file (default)."
+msgstr ""
+
+#: options.h:949
+msgid "Use fallocate or ftruncate to reserve space."
+msgstr ""
+
+#: options.h:952
 msgid "Preread archive symbols when multi-threaded"
 msgstr ""
 
-#: options.h:791
+#: options.h:955
+msgid "Print default output format"
+msgstr ""
+
+#: options.h:958
 msgid "Print symbols defined and used for each input"
 msgstr ""
 
-#: options.h:795
+#: options.h:962
 msgid "Ignored for SVR4 compatibility"
 msgstr ""
 
-#: options.h:798
+#: options.h:965
 msgid "Generate relocations in output"
 msgstr ""
 
-#: options.h:801
+#: options.h:968
 msgid "Generate relocatable output"
 msgstr ""
 
-#: options.h:804
-msgid "Relax branches on certain targets"
+#: options.h:970
+msgid "Synonym for -r"
 msgstr ""
 
-#: options.h:807
-msgid "keep only symbols listed in this file"
+#: options.h:973
+msgid "Relax branches on certain targets"
 msgstr ""
 
-#: options.h:807
-msgid "[file]"
+#: options.h:976
+msgid "keep only symbols listed in this file"
 msgstr ""
 
-#: options.h:813 options.h:816
+#: options.h:982 options.h:985
 msgid "Add DIR to runtime search path"
 msgstr ""
 
-#: options.h:819
+#: options.h:988
 msgid "Add DIR to link time shared library search path"
 msgstr ""
 
-#: options.h:823
+#: options.h:992
+msgid "Layout sections in the order specified."
+msgstr ""
+
+#: options.h:996
+msgid "Set address of section"
+msgstr ""
+
+#: options.h:996
+msgid "SECTION=ADDRESS"
+msgstr ""
+
+#: options.h:999
+msgid "Sort common symbols by alignment"
+msgstr ""
+
+#: options.h:1000
+msgid "[={ascending,descending}]"
+msgstr ""
+
+#: options.h:1003
+msgid "Dynamic tag slots to reserve (default 5)"
+msgstr ""
+
+#: options.h:1004 options.h:1051 options.h:1084 options.h:1086 options.h:1088
+#: options.h:1090
+msgid "COUNT"
+msgstr ""
+
+#: options.h:1007
 msgid "Strip all symbols"
 msgstr ""
 
-#: options.h:825
+#: options.h:1009
 msgid "Strip debugging information"
 msgstr ""
 
-#: options.h:827
+#: options.h:1011
 msgid "Emit only debug line number information"
 msgstr ""
 
-#: options.h:829
-msgid "Strip debug symbols that are unused by gdb (at least versions <= 6.7)"
+#: options.h:1013
+msgid "Strip debug symbols that are unused by gdb (at least versions <= 7.4)"
 msgstr ""
 
-#: options.h:832
+#: options.h:1016
 msgid "Strip LTO intermediate code sections"
 msgstr ""
 
-#: options.h:835
+#: options.h:1019
 msgid ""
 "(ARM only) The maximum distance from instructions in a group of sections to "
 "their stubs.  Negative values mean stubs are always after the group. 1 means "
 "using default size.\n"
 msgstr ""
 
-#: options.h:838 options.h:852 options.h:956 options.h:975
+#: options.h:1022 options.h:1036 options.h:1187 options.h:1206
 msgid "SIZE"
 msgstr ""
 
-#: options.h:841
+#: options.h:1025
 msgid ""
 "Use less memory and more disk I/O (included only for compatibility with GNU "
 "ld)"
 msgstr ""
 
-#: options.h:845 options.h:848
+#: options.h:1029 options.h:1032
 msgid "Generate shared library"
 msgstr ""
 
-#: options.h:851
+#: options.h:1035
 msgid "Stack size when -fsplit-stack function calls non-split"
 msgstr ""
 
-#: options.h:857
+#: options.h:1041
 msgid "Do not link against shared libraries"
 msgstr ""
 
-#: options.h:860
-msgid "Identical Code Folding. '--icf=safe' folds only ctors and dtors."
+#: options.h:1044
+msgid ""
+"Identical Code Folding. '--icf=safe' Folds ctors, dtors and functions whose "
+"pointers are definitely not taken."
 msgstr ""
 
-#: options.h:866
+#: options.h:1051
 msgid "Number of iterations of ICF (default 2)"
 msgstr ""
 
-#: options.h:866 options.h:899 options.h:901 options.h:903 options.h:905
-msgid "COUNT"
-msgstr ""
-
-#: options.h:869
+#: options.h:1054
 msgid "List folded identical sections on stderr"
 msgstr ""
 
-#: options.h:870
+#: options.h:1055
 msgid "Do not list folded identical sections"
 msgstr ""
 
-#: options.h:873
+#: options.h:1058
 msgid "Do not fold this symbol during ICF"
 msgstr ""
 
-#: options.h:876
+#: options.h:1061
 msgid "Remove unused sections"
 msgstr ""
 
-#: options.h:877
+#: options.h:1062
 msgid "Don't remove unused sections (default)"
 msgstr ""
 
-#: options.h:880
+#: options.h:1065
 msgid "List removed unused sections on stderr"
 msgstr ""
 
-#: options.h:881
+#: options.h:1066
 msgid "Do not list removed unused sections"
 msgstr ""
 
-#: options.h:884
+#: options.h:1069
 msgid "Print resource usage statistics"
 msgstr ""
 
-#: options.h:887
+#: options.h:1072
 msgid "Set target system root directory"
 msgstr ""
 
-#: options.h:890
+#: options.h:1075
 msgid "Print the name of each input file"
 msgstr ""
 
-#: options.h:893
+#: options.h:1078
 msgid "Read linker script"
 msgstr ""
 
-#: options.h:896
+#: options.h:1081
 msgid "Run the linker multi-threaded"
 msgstr ""
 
-#: options.h:897
+#: options.h:1082
 msgid "Do not run the linker multi-threaded"
 msgstr ""
 
-#: options.h:899
+#: options.h:1084
 msgid "Number of threads to use"
 msgstr ""
 
-#: options.h:901
+#: options.h:1086
 msgid "Number of threads to use in initial pass"
 msgstr ""
 
-#: options.h:903
+#: options.h:1088
 msgid "Number of threads to use in middle pass"
 msgstr ""
 
-#: options.h:905
+#: options.h:1090
 msgid "Number of threads to use in final pass"
 msgstr ""
 
-#: options.h:908
+#: options.h:1093
 msgid "Set the address of the bss segment"
 msgstr ""
 
-#: options.h:910
+#: options.h:1095
 msgid "Set the address of the data segment"
 msgstr ""
 
-#: options.h:912
+#: options.h:1097
 msgid "Set the address of the text segment"
 msgstr ""
 
-#: options.h:915
+#: options.h:1100
 msgid "Create undefined reference to SYMBOL"
 msgstr ""
 
-#: options.h:918
+#: options.h:1103
+msgid "How to handle unresolved symbols"
+msgstr ""
+
+#: options.h:1110
 msgid "Synonym for --debug=files"
 msgstr ""
 
-#: options.h:921
+#: options.h:1113
 msgid "Read version script"
 msgstr ""
 
-#: options.h:924
+#: options.h:1116
 msgid "Warn about duplicate common symbols"
 msgstr ""
 
-#: options.h:925
+#: options.h:1117
 msgid "Do not warn about duplicate common symbols (default)"
 msgstr ""
 
-#: options.h:928
+#: options.h:1123
+msgid "Warn if the stack is executable"
+msgstr ""
+
+#: options.h:1124
+msgid "Do not warn if the stack is executable (default)"
+msgstr ""
+
+#: options.h:1127
+msgid "Don't warn about mismatched input files"
+msgstr ""
+
+#: options.h:1133
 msgid "Warn when skipping an incompatible library"
 msgstr ""
 
-#: options.h:929
+#: options.h:1134
 msgid "Don't warn when skipping an incompatible library"
 msgstr ""
 
-#: options.h:932
+#: options.h:1137
+msgid "Warn if text segment is not shareable"
+msgstr ""
+
+#: options.h:1138
+msgid "Do not warn if text segment is not shareable (default)"
+msgstr ""
+
+#: options.h:1141
+msgid "Report unresolved symbols as warnings"
+msgstr ""
+
+#: options.h:1145
+msgid "Report unresolved symbols as errors"
+msgstr ""
+
+#: options.h:1149
+msgid "(ARM only) Do not warn about objects with incompatible wchar_t sizes"
+msgstr ""
+
+#: options.h:1153
 msgid "Include all archive contents"
 msgstr ""
 
-#: options.h:933
+#: options.h:1154
 msgid "Include only needed archive contents"
 msgstr ""
 
-#: options.h:936
+#: options.h:1157
 msgid "Use wrapper functions for SYMBOL"
 msgstr ""
 
-#: options.h:939
+#: options.h:1160
 msgid "Trace references to symbol"
 msgstr ""
 
-#: options.h:942
+#: options.h:1163
+msgid "Allow unused version in script (default)"
+msgstr ""
+
+#: options.h:1164
+msgid "Do not allow unused version in script"
+msgstr ""
+
+#: options.h:1167
 msgid "Default search path for Solaris compatibility"
 msgstr ""
 
-#: options.h:943
+#: options.h:1168
 msgid "PATH"
 msgstr ""
 
-#: options.h:946
+#: options.h:1171
 msgid "Start a library search group"
 msgstr ""
 
-#: options.h:948
+#: options.h:1173
 msgid "End a library search group"
 msgstr ""
 
-#: options.h:953
+#: options.h:1177
+msgid "Start a library"
+msgstr ""
+
+#: options.h:1179
+msgid "End a library "
+msgstr ""
+
+#: options.h:1184
 msgid "Sort dynamic relocs"
 msgstr ""
 
-#: options.h:954
+#: options.h:1185
 msgid "Do not sort dynamic relocs"
 msgstr ""
 
-#: options.h:956
+#: options.h:1187
 msgid "Set common page size to SIZE"
 msgstr ""
 
-#: options.h:961
+#: options.h:1192
 msgid "Mark output as requiring executable stack"
 msgstr ""
 
-#: options.h:963
+#: options.h:1194
 msgid "Mark DSO to be initialized first at runtime"
 msgstr ""
 
-#: options.h:966
+#: options.h:1197
 msgid "Mark object to interpose all DSOs but executable"
 msgstr ""
 
-#: options.h:969
+#: options.h:1200
 msgid "Mark object for lazy runtime binding (default)"
 msgstr ""
 
-#: options.h:972
+#: options.h:1203
 msgid "Mark object requiring immediate process"
 msgstr ""
 
-#: options.h:975
+#: options.h:1206
 msgid "Set maximum page size to SIZE"
 msgstr ""
 
-#: options.h:978
+#: options.h:1214
 msgid "Do not create copy relocs"
 msgstr ""
 
-#: options.h:980
+#: options.h:1216
 msgid "Mark object not to use default search paths"
 msgstr ""
 
-#: options.h:983
+#: options.h:1219
 msgid "Mark DSO non-deletable at runtime"
 msgstr ""
 
-#: options.h:986
+#: options.h:1222
 msgid "Mark DSO not available to dlopen"
 msgstr ""
 
-#: options.h:989
+#: options.h:1225
 msgid "Mark DSO not available to dldump"
 msgstr ""
 
-#: options.h:992
+#: options.h:1228
 msgid "Mark output as not requiring executable stack"
 msgstr ""
 
-#: options.h:994
+#: options.h:1230
 msgid "Mark object for immediate function binding"
 msgstr ""
 
-#: options.h:997
+#: options.h:1233
 msgid "Mark DSO to indicate that needs immediate $ORIGIN processing at runtime"
 msgstr ""
 
-#: options.h:1000
+#: options.h:1236
 msgid "Where possible mark variables read-only after relocation"
 msgstr ""
 
-#: options.h:1001
+#: options.h:1237
 msgid "Don't mark variables read-only after relocation"
 msgstr ""
 
-#: output.cc:1132
+#: options.h:1239
+msgid "Do not permit relocations in read-only segments"
+msgstr ""
+
+#: options.h:1240 options.h:1242
+msgid "Permit relocations in read-only segments (default)"
+msgstr ""
+
+#: output.cc:1343
 msgid "section group retained but group element discarded"
 msgstr ""
 
-#: output.cc:1860
+#: output.cc:1664 output.cc:1694
+msgid "out of patch space (GOT); relink with --incremental-full"
+msgstr ""
+
+#: output.cc:2308
 #, c-format
 msgid "invalid alignment %lu for section \"%s\""
 msgstr ""
 
-#: output.cc:3573
+#: output.cc:4437
 #, c-format
 msgid "dot moves backward in linker script from 0x%llx to 0x%llx"
 msgstr ""
 
-#: output.cc:3576
+#: output.cc:4440
 #, c-format
 msgid "address of section '%s' moves backward from 0x%llx to 0x%llx"
 msgstr ""
 
-#: output.cc:3755
+#: output.cc:4806
+#, c-format
+msgid "%s: incremental base and output file name are the same"
+msgstr ""
+
+#: output.cc:4813
 #, c-format
-msgid "nobits section %s may not precede progbits section %s in same segment"
+msgid "%s: stat: %s"
 msgstr ""
 
-#: output.cc:3907 output.cc:3975
+#: output.cc:4818
+#, c-format
+msgid "%s: incremental base file is empty"
+msgstr ""
+
+#: output.cc:4830 output.cc:4928
 #, c-format
 msgid "%s: open: %s"
 msgstr ""
 
-#: output.cc:3996
+#: output.cc:4847
+#, c-format
+msgid "%s: read failed: %s"
+msgstr ""
+
+#: output.cc:4852
+#, c-format
+msgid "%s: file too short: read only %lld of %lld bytes"
+msgstr ""
+
+#: output.cc:4952
 #, c-format
 msgid "%s: mremap: %s"
 msgstr ""
 
-#: output.cc:4005
+#: output.cc:4971
 #, c-format
 msgid "%s: mmap: %s"
 msgstr ""
 
-#: output.cc:4085
+#: output.cc:5063
 #, c-format
 msgid "%s: mmap: failed to allocate %lu bytes for output file: %s"
 msgstr ""
 
-#: output.cc:4096
+#: output.cc:5081
 #, c-format
 msgid "%s: munmap: %s"
 msgstr ""
 
-#: output.cc:4115
+#: output.cc:5101
 #, c-format
 msgid "%s: write: unexpected 0 return-value"
 msgstr ""
 
-#: output.cc:4117
+#: output.cc:5103
 #, c-format
 msgid "%s: write: %s"
 msgstr ""
 
-#: output.cc:4132
+#: output.cc:5118
 #, c-format
 msgid "%s: close: %s"
 msgstr ""
 
-#: output.h:520
+#: output.h:492
 msgid "** section headers"
 msgstr ""
 
-#: output.h:565
+#: output.h:542
 msgid "** segment headers"
 msgstr ""
 
-#: output.h:613
+#: output.h:589
 msgid "** file header"
 msgstr ""
 
-#: output.h:833
+#: output.h:815
 msgid "** fill"
 msgstr ""
 
-#: output.h:987
+#: output.h:981
 msgid "** string table"
 msgstr ""
 
-#: output.h:1300
+#: output.h:1501
 msgid "** dynamic relocs"
 msgstr ""
 
-#: output.h:1301 output.h:1637
+#: output.h:1502 output.h:2111
 msgid "** relocs"
 msgstr ""
 
-#: output.h:1662
+#: output.h:2136
 msgid "** group"
 msgstr ""
 
-#: output.h:1774
+#: output.h:2277
 msgid "** GOT"
 msgstr ""
 
-#: output.h:1916
+#: output.h:2451
 msgid "** dynamic"
 msgstr ""
 
-#: output.h:2039
+#: output.h:2588
 msgid "** symtab xindex"
 msgstr ""
 
-#: parameters.cc:172
+#: parameters.cc:218
+msgid "input file does not match -EB/EL option"
+msgstr ""
+
+#: parameters.cc:330 target-select.cc:199
 #, c-format
 msgid "unrecognized output format %s"
 msgstr ""
 
-#: plugin.cc:106
+#: parameters.cc:343
+#, c-format
+msgid "unrecognized emulation %s"
+msgstr ""
+
+#: parameters.cc:366
+msgid "no supported target for -EB/-EL option"
+msgstr ""
+
+#: plugin.cc:138
 #, c-format
-msgid "%s: could not load plugin library"
+msgid "%s: could not load plugin library: %s"
 msgstr ""
 
-#: plugin.cc:116
+#: plugin.cc:147
 #, c-format
 msgid "%s: could not find onload entry point"
 msgstr ""
 
-#: plugin.cc:426
-msgid ""
-"Input files added by plug-ins in --incremental mode not supported yet.\n"
+#: plugin.cc:795
+msgid "input files added by plug-ins in --incremental mode not supported yet"
+msgstr ""
+
+#: powerpc.cc:1355
+#, c-format
+msgid "%s: linkage table error against `%s'"
 msgstr ""
 
-#: powerpc.cc:1502 sparc.cc:2307 x86_64.cc:1632
+#: powerpc.cc:1821 sparc.cc:2207
+msgid "requires unsupported dynamic reloc; recompile with -fPIC"
+msgstr ""
+
+#: powerpc.cc:2208 sparc.cc:3068 x86_64.cc:3082
 #, c-format
 msgid "%s: unsupported REL reloc section"
 msgstr ""
 
-#: readsyms.cc:191
+#: readsyms.cc:285
 #, c-format
 msgid "%s: file is empty"
 msgstr ""
 
 #. Here we have to handle any other input file types we need.
-#: readsyms.cc:575
+#: readsyms.cc:920
 #, c-format
 msgid "%s: not an object or archive"
 msgstr ""
 
-#: reduced_debug_output.cc:236
+#: reduced_debug_output.cc:187
 msgid ""
 "Debug abbreviations extend beyond .debug_abbrev section; failed to reduce "
 "debug abbreviations"
 msgstr ""
 
-#: reduced_debug_output.cc:322
+#: reduced_debug_output.cc:273
 msgid "Extremely large compile unit in debug info; failed to reduce debug info"
 msgstr ""
 
-#: reduced_debug_output.cc:330
+#: reduced_debug_output.cc:281
 msgid ""
 "Debug info extends beyond .debug_info section;failed to reduce debug info"
 msgstr ""
 
-#: reduced_debug_output.cc:350 reduced_debug_output.cc:392
+#: reduced_debug_output.cc:301 reduced_debug_output.cc:343
 msgid "Invalid DIE in debug info; failed to reduce debug info"
 msgstr ""
 
-#: reduced_debug_output.cc:373
+#: reduced_debug_output.cc:324
 msgid ""
 "Debug info extends beyond .debug_info section; failed to reduce debug info"
 msgstr ""
 
-#: reloc.cc:297 reloc.cc:858
+#: reloc.cc:317 reloc.cc:959
 #, c-format
 msgid "relocation section %u uses unexpected symbol table %u"
 msgstr ""
 
-#: reloc.cc:312 reloc.cc:875
+#: reloc.cc:335 reloc.cc:976
 #, c-format
 msgid "unexpected entsize for reloc section %u: %lu != %u"
 msgstr ""
 
-#: reloc.cc:321 reloc.cc:884
+#: reloc.cc:344 reloc.cc:985
 #, c-format
 msgid "reloc section %u size %lu uneven"
 msgstr ""
 
-#: reloc.cc:1203
+#: reloc.cc:1431
 #, c-format
 msgid "could not convert call to '%s' to '%s'"
 msgstr ""
 
-#: reloc.cc:1343
+#: reloc.cc:1591
 #, c-format
 msgid "reloc section size %zu is not a multiple of reloc size %d\n"
 msgstr ""
 
 #. We should only see externally visible symbols in the symbol
 #. table.
-#: resolve.cc:191
+#: resolve.cc:192
 msgid "invalid STB_LOCAL symbol in external symbols"
 msgstr ""
 
 #. Any target which wants to handle STB_LOOS, etc., needs to
 #. define a resolve method.
-#: resolve.cc:197
-msgid "unsupported symbol binding"
+#: resolve.cc:198
+#, c-format
+msgid "unsupported symbol binding %d"
 msgstr ""
 
 #. A dynamic object cannot reference a hidden or internal symbol
 #. defined in another object.
-#: resolve.cc:266
+#: resolve.cc:282
 #, c-format
 msgid "%s symbol '%s' in %s is referenced by DSO %s"
 msgstr ""
 
-#: resolve.cc:326
+#: resolve.cc:399
 #, c-format
 msgid "common of '%s' overriding smaller common"
 msgstr ""
 
-#: resolve.cc:331
+#: resolve.cc:404
 #, c-format
 msgid "common of '%s' overidden by larger common"
 msgstr ""
 
-#: resolve.cc:336
+#: resolve.cc:409
 #, c-format
 msgid "multiple common of '%s'"
 msgstr ""
 
-#: resolve.cc:442
+#: resolve.cc:452
+#, c-format
+msgid "symbol '%s' used as both __thread and non-__thread"
+msgstr ""
+
+#: resolve.cc:495
 #, c-format
 msgid "multiple definition of '%s'"
 msgstr ""
 
-#: resolve.cc:481
+#: resolve.cc:534
 #, c-format
 msgid "definition of '%s' overriding common"
 msgstr ""
 
-#: resolve.cc:516
+#: resolve.cc:569
 #, c-format
 msgid "definition of '%s' overriding dynamic common definition"
 msgstr ""
 
-#: resolve.cc:636
+#: resolve.cc:719
 #, c-format
 msgid "common '%s' overridden by previous definition"
 msgstr ""
 
-#: resolve.cc:766 resolve.cc:778
+#: resolve.cc:854
+msgid "COPY reloc"
+msgstr ""
+
+#: resolve.cc:858 resolve.cc:881
 msgid "command line"
 msgstr ""
 
-#: script-sections.cc:690
+#: resolve.cc:861
+msgid "linker script"
+msgstr ""
+
+#: resolve.cc:865
+msgid "linker defined"
+msgstr ""
+
+#: script-sections.cc:105
+#, c-format
+msgid "section %s overflows end of region %s"
+msgstr ""
+
+#: script-sections.cc:646
+msgid "Attempt to set a memory region for a non-output section"
+msgstr ""
+
+#: script-sections.cc:952 script-sections.cc:3552
 msgid "dot may not move backward"
 msgstr ""
 
-#: script-sections.cc:757
+#: script-sections.cc:1019
 msgid "** expression"
 msgstr ""
 
-#: script-sections.cc:941
+#: script-sections.cc:1204
 msgid "fill value is not absolute"
 msgstr ""
 
-#: script-sections.cc:1913
+#: script-sections.cc:2333
 #, c-format
 msgid "alignment of section %s is not absolute"
 msgstr ""
 
-#: script-sections.cc:1957
+#: script-sections.cc:2434
 #, c-format
 msgid "subalign of section %s is not absolute"
 msgstr ""
 
-#: script-sections.cc:1972
+#: script-sections.cc:2449
 #, c-format
 msgid "fill of section %s is not absolute"
 msgstr ""
 
-#: script-sections.cc:2048
+#: script-sections.cc:2562
 msgid "SPECIAL constraints are not implemented"
 msgstr ""
 
-#: script-sections.cc:2090
+#: script-sections.cc:2604
 msgid "mismatched definition for constrained sections"
 msgstr ""
 
-#: script-sections.cc:2634
+#: script-sections.cc:3065
+#, c-format
+msgid "region '%.*s' already defined"
+msgstr ""
+
+#: script-sections.cc:3291
 msgid "DATA_SEGMENT_ALIGN may only appear once in a linker script"
 msgstr ""
 
-#: script-sections.cc:2649
+#: script-sections.cc:3306
 msgid "DATA_SEGMENT_RELRO_END may only appear once in a linker script"
 msgstr ""
 
-#: script-sections.cc:2654
+#: script-sections.cc:3311
 msgid "DATA_SEGMENT_RELRO_END must follow DATA_SEGMENT_ALIGN"
 msgstr ""
 
-#: script-sections.cc:2826
+#: script-sections.cc:3488
 msgid "no matching section constraint"
 msgstr ""
 
-#: script-sections.cc:3151
+#: script-sections.cc:3883
+msgid ""
+"creating a segment to contain the file and program headers outside of any "
+"MEMORY region"
+msgstr ""
+
+#: script-sections.cc:3932
 msgid "TLS sections are not adjacent"
 msgstr ""
 
-#: script-sections.cc:3280
-msgid "allocated section not in any segment"
+#: script-sections.cc:4079
+#, c-format
+msgid "allocated section %s not in any segment"
 msgstr ""
 
-#: script-sections.cc:3309
+#: script-sections.cc:4125
 #, c-format
 msgid "no segment %s"
 msgstr ""
 
-#: script-sections.cc:3323
+#: script-sections.cc:4138
 msgid "section in two PT_LOAD segments"
 msgstr ""
 
-#: script-sections.cc:3330
+#: script-sections.cc:4145
 msgid "allocated section not in any PT_LOAD segment"
 msgstr ""
 
-#: script-sections.cc:3358
+#: script-sections.cc:4174
 msgid "may only specify load address for PT_LOAD segment"
 msgstr ""
 
-#: script-sections.cc:3382
+#: script-sections.cc:4200
 #, c-format
 msgid "PHDRS load address overrides section %s load address"
 msgstr ""
 
 #. We could support this if we wanted to.
-#: script-sections.cc:3393
+#: script-sections.cc:4211
 msgid "using only one of FILEHDR and PHDRS is not currently supported"
 msgstr ""
 
-#: script-sections.cc:3408
+#: script-sections.cc:4226
 msgid ""
 "sections loaded on first page without room for file and program headers are "
 "not supported"
 msgstr ""
 
-#: script-sections.cc:3414
+#: script-sections.cc:4232
 msgid ""
 "using FILEHDR and PHDRS on more than one PT_LOAD segment is not currently "
 "supported"
 msgstr ""
 
-#: script.cc:1072
+#: script.cc:1132
 msgid "invalid use of PROVIDE for dot symbol"
 msgstr ""
 
-#: script.cc:2132
+#: script.cc:1508
+#, c-format
+msgid "%s: SECTIONS seen after other input files; try -T/--script"
+msgstr ""
+
+#. We have a match for both the global and local entries for a
+#. version tag.  That's got to be wrong.
+#: script.cc:2212
+#, c-format
+msgid ""
+"'%s' appears as both a global and a local symbol for version '%s' in script"
+msgstr ""
+
+#: script.cc:2239
+#, c-format
+msgid "wildcard match appears in both version '%s' and '%s' in script"
+msgstr ""
+
+#: script.cc:2244
+#, c-format
+msgid ""
+"wildcard match appears as both global and local in version '%s' in script"
+msgstr ""
+
+#: script.cc:2329
+#, c-format
+msgid ""
+"using '%s' as version for '%s' which is also named in version '%s' in script"
+msgstr ""
+
+#: script.cc:2427
+#, c-format
+msgid "version script assignment of %s to symbol %s failed: symbol not defined"
+msgstr ""
+
+#: script.cc:2623
 #, c-format
 msgid "%s:%d:%d: %s"
 msgstr ""
 
+#: script.cc:2689
+msgid "library name must be prefixed with -l"
+msgstr ""
+
 #. There are some options that we could handle here--e.g.,
 #. -lLIBRARY.  Should we bother?
-#: script.cc:2297
+#: script.cc:2816
 #, c-format
 msgid ""
 "%s:%d:%d: ignoring command OPTION; OPTION is only valid for scripts "
 "specified via -T/--script"
 msgstr ""
 
-#: script.cc:2362
+#: script.cc:2881
 #, c-format
 msgid ""
 "%s:%d:%d: ignoring SEARCH_DIR; SEARCH_DIR is only valid for scripts "
 "specified via -T/--script"
 msgstr ""
 
-#: script.cc:2606 script.cc:2620
+#: script.cc:2909
+#, c-format
+msgid "%s:%d:%d: invalid use of VERSION in input file"
+msgstr ""
+
+#: script.cc:3025
+#, c-format
+msgid "unrecognized version script language '%s'"
+msgstr ""
+
+#: script.cc:3144 script.cc:3158
 #, c-format
 msgid "%s:%d:%d: DATA_SEGMENT_ALIGN not in SECTIONS clause"
 msgstr ""
 
-#: script.cc:2739
+#: script.cc:3277
 msgid "unknown PHDR type (try integer)"
 msgstr ""
 
-#: stringpool.cc:528
+#: script.cc:3296
+#, c-format
+msgid "%s:%d:%d: MEMORY region '%.*s' referred to outside of SECTIONS clause"
+msgstr ""
+
+#: script.cc:3307
+#, c-format
+msgid "%s:%d:%d: MEMORY region '%.*s' not declared"
+msgstr ""
+
+#: script.cc:3352
+msgid "unknown MEMORY attribute"
+msgstr ""
+
+#: script.cc:3382
+#, c-format
+msgid "undefined memory region '%s' referenced in ORIGIN expression"
+msgstr ""
+
+#: script.cc:3401
+#, c-format
+msgid "undefined memory region '%s' referenced in LENGTH expression"
+msgstr ""
+
+#: sparc.cc:4315
+#, c-format
+msgid "%s: little endian elf flag set on BE object"
+msgstr ""
+
+#: sparc.cc:4318
+#, c-format
+msgid "%s: little endian elf flag clear on LE object"
+msgstr ""
+
+#: stringpool.cc:503
 #, c-format
 msgid "%s: %s entries: %zu; buckets: %zu\n"
 msgstr ""
 
-#: stringpool.cc:532
+#: stringpool.cc:507
 #, c-format
 msgid "%s: %s entries: %zu\n"
 msgstr ""
 
-#: stringpool.cc:535
+#: stringpool.cc:510
 #, c-format
 msgid "%s: %s Stringdata structures: %zu\n"
 msgstr ""
 
-#: symtab.cc:857
+#: symtab.cc:374
+#, c-format
+msgid "Cannot export local symbol '%s'"
+msgstr ""
+
+#: symtab.cc:923
 #, c-format
 msgid "%s: reference to %s"
 msgstr ""
 
-#: symtab.cc:859
+#: symtab.cc:925
 #, c-format
 msgid "%s: definition of %s"
 msgstr ""
 
-#: symtab.cc:1052
+#: symtab.cc:1123
 #, c-format
 msgid "bad global symbol name offset %u at %zu"
 msgstr ""
 
-#: symtab.cc:1278
+#: symtab.cc:1376
 msgid "--just-symbols does not make sense with a shared object"
 msgstr ""
 
-#: symtab.cc:1284
+#: symtab.cc:1387
 msgid "too few symbol versions"
 msgstr ""
 
-#: symtab.cc:1333
+#: symtab.cc:1436
 #, c-format
 msgid "bad symbol name offset %u at %zu"
 msgstr ""
 
-#: symtab.cc:1396
+#: symtab.cc:1499
 #, c-format
 msgid "versym for symbol %zu out of range: %u"
 msgstr ""
 
-#: symtab.cc:1404
+#: symtab.cc:1507
 #, c-format
 msgid "versym for symbol %zu has no name: %u"
 msgstr ""
 
-#: symtab.cc:2549 symtab.cc:2681
+#: symtab.cc:2733 symtab.cc:2872
 #, c-format
 msgid "%s: unsupported symbol section 0x%x"
 msgstr ""
 
-#: symtab.cc:2933
+#: symtab.cc:3137
 #, c-format
 msgid "%s: symbol table entries: %zu; buckets: %zu\n"
 msgstr ""
 
-#: symtab.cc:2936
+#: symtab.cc:3140
 #, c-format
 msgid "%s: symbol table entries: %zu\n"
 msgstr ""
 
-#: symtab.cc:3007
+#: symtab.cc:3290
 #, c-format
 msgid ""
 "while linking %s: symbol '%s' defined in multiple places (possible ODR "
 "violation):"
 msgstr ""
 
-#: target-reloc.h:259
-msgid "relocation refers to discarded comdat section"
+#: symtab.cc:3299 symtab.cc:3302
+#, c-format
+msgid "  %s from %s\n"
+msgstr ""
+
+#: target-reloc.h:157
+msgid "internal"
 msgstr ""
 
-#: target-reloc.h:298
+#: target-reloc.h:160
+msgid "hidden"
+msgstr ""
+
+#: target-reloc.h:163
+msgid "protected"
+msgstr ""
+
+#: target-reloc.h:168
 #, c-format
-msgid "reloc has bad offset %zu"
+msgid "%s symbol '%s' is not defined locally"
 msgstr ""
 
-#: target.cc:90
+#: target-reloc.h:393
 #, c-format
-msgid "%s: unsupported ELF file type %d"
+msgid "reloc has bad offset %zu"
 msgstr ""
 
-#: target.cc:157
+#: target.cc:170
 #, c-format
 msgid "linker does not include stack split support required by %s"
 msgstr ""
@@ -2233,12 +3216,12 @@ msgid "TLS relocation against invalid in
 msgstr ""
 
 #. This output is intended to follow the GNU standards.
-#: version.cc:65
+#: version.cc:66
 #, c-format
-msgid "Copyright 2008 Free Software Foundation, Inc.\n"
+msgid "Copyright 2011 Free Software Foundation, Inc.\n"
 msgstr ""
 
-#: version.cc:66
+#: version.cc:67
 #, c-format
 msgid ""
 "This program is free software; you may redistribute it under the terms of\n"
@@ -2252,12 +3235,38 @@ msgstr ""
 msgid "%s failed: %s"
 msgstr ""
 
-#: x86_64.cc:2184
+#: x86_64.cc:1243
+msgid "out of patch space (PLT); relink with --incremental-full"
+msgstr ""
+
+#: x86_64.cc:1867
+msgid "TLS_DESC not yet supported for incremental linking"
+msgstr ""
+
+#: x86_64.cc:2215
+msgid ""
+"requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile "
+"with -fPIC"
+msgstr ""
+
+#: x86_64.cc:2218
+#, c-format
+msgid ""
+"requires dynamic %s reloc against '%s' which may overflow at runtime; "
+"recompile with -fPIC"
+msgstr ""
+
+#: x86_64.cc:2234
+#, c-format
+msgid "requires unsupported dynamic reloc %u; recompile with -fPIC"
+msgstr ""
+
+#: x86_64.cc:3739
 #, c-format
 msgid "unsupported reloc type %u"
 msgstr ""
 
-#: x86_64.cc:2524
+#: x86_64.cc:4164
 #, c-format
 msgid "unsupported reloc %u against local symbol"
 msgstr ""

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