Fix seg-fault running strip on a corrupt binary.
[deliverable/binutils-gdb.git] / bfd / elfxx-tilegx.c
index 419ca2fdc569ddd61de6d3813f8a309d2224c9a2..9cd71b64650b59be7be1c3d304ae0dcf4e1cb930 100644 (file)
@@ -1439,8 +1439,7 @@ tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* This function may be called more than once.  */
-  s = bfd_get_linker_section (abfd, ".got");
-  if (s != NULL)
+  if (htab->sgot != NULL)
     return TRUE;
 
   flags = bed->dynamic_sec_flags;
@@ -1725,6 +1724,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
        {
+         /* xgettext:c-format */
          _bfd_error_handler (_("%B: bad symbol index: %d"),
                              abfd, r_symndx);
          return FALSE;
@@ -1833,6 +1833,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
                 else
                   {
                    _bfd_error_handler
+                     /* xgettext:c-format */
                       (_("%B: `%s' accessed both as normal and thread local symbol"),
                        abfd, h ? h->root.root.string : "<local>");
                     return FALSE;
@@ -3171,6 +3172,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
        {
           /* Not clear if we need to check here, but just be paranoid. */
          _bfd_error_handler
+           /* xgettext:c-format */
            (_("%B: unrecognized relocation (0x%x) in section `%A'"),
             input_bfd, r_type, input_section);
          bfd_set_error (bfd_error_bad_value);
@@ -3979,6 +3981,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          && _bfd_elf_section_offset (output_bfd, info, input_section,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
+         /* xgettext:c-format */
          (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
@@ -4426,14 +4429,16 @@ tilegx_additional_program_headers (bfd *abfd,
 
 
 bfd_boolean
-_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+_bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   const char *targ1 = bfd_get_target (ibfd);
   const char *targ2 = bfd_get_target (obfd);
 
   if (strcmp (targ1, targ2) != 0)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("%B: Cannot link together %s and %s objects."),
         ibfd, targ1, targ2);
       bfd_set_error (bfd_error_bad_value);
This page took 0.023884 seconds and 4 git commands to generate.