Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-i370.c
index ab685515b6dd36fe532715239c6f4ac900e214b2..f8e825fba549edc39b33aa20c3b49621c2c2c2b2 100644 (file)
@@ -1,5 +1,5 @@
 /* i370-specific support for 32-bit ELF
-   Copyright (C) 1994-2016 Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas for i370 linas@linas.org
 
@@ -303,6 +303,7 @@ i370_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_I370_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: unrecognised I370 reloc number: %d"),
                          abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
@@ -330,8 +331,9 @@ i370_elf_set_private_flags (bfd *abfd, flagword flags)
    object file when linking.  */
 
 static bfd_boolean
-i370_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+i370_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
 
@@ -353,7 +355,8 @@ i370_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   else                                 /* Incompatible flags.  */
     {
       _bfd_error_handler
-       ("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
+       /* xgettext:c-format */
+       (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
         ibfd, (long) new_flags, (long) old_flags);
 
       bfd_set_error (bfd_error_bad_value);
@@ -881,7 +884,7 @@ i370_elf_finish_dynamic_sections (bfd *output_bfd,
 {
   asection *sdyn;
   bfd *dynobj = elf_hash_table (info)->dynobj;
-  asection *sgot = bfd_get_linker_section (dynobj, ".got");
+  asection *sgot = elf_hash_table (info)->sgot;
 
 #ifdef DEBUG
   fprintf (stderr, "i370_elf_finish_dynamic_sections called\n");
@@ -894,7 +897,7 @@ i370_elf_finish_dynamic_sections (bfd *output_bfd,
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_linker_section (dynobj, ".plt");
+      splt = elf_hash_table (info)->splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
@@ -902,35 +905,39 @@ i370_elf_finish_dynamic_sections (bfd *output_bfd,
       for (; dyncon < dynconend; dyncon++)
        {
          Elf_Internal_Dyn dyn;
-         const char *name;
+         asection *s;
          bfd_boolean size;
 
          bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
 
          switch (dyn.d_tag)
            {
-           case DT_PLTGOT:   name = ".plt";      size = FALSE; break;
-           case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE;  break;
-           case DT_JMPREL:   name = ".rela.plt"; size = FALSE; break;
-           default:          name = NULL;        size = FALSE; break;
+           case DT_PLTGOT:
+             s = elf_hash_table (info)->splt;
+             size = FALSE;
+             break;
+           case DT_PLTRELSZ:
+             s = elf_hash_table (info)->srelplt;
+             size = TRUE;
+             break;
+           case DT_JMPREL:
+             s = elf_hash_table (info)->srelplt;
+             size = FALSE;
+             break;
+           default:
+             continue;
            }
 
-         if (name != NULL)
+         if (s == NULL)
+           dyn.d_un.d_val = 0;
+         else
            {
-             asection *s;
-
-             s = bfd_get_linker_section (dynobj, name);
-             if (s == NULL)
-               dyn.d_un.d_val = 0;
+             if (!size)
+               dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
              else
-               {
-                 if (! size)
-                   dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
-                 else
-                   dyn.d_un.d_val = s->size;
-               }
-             bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+               dyn.d_un.d_val = s->size;
            }
+         bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
        }
     }
 
@@ -1074,7 +1081,8 @@ i370_elf_relocate_section (bfd *output_bfd,
       if ((unsigned) r_type >= (unsigned) R_I370_max
          || !i370_elf_howto_table[(int)r_type])
        {
-         _bfd_error_handler ("%B: unknown relocation type %d",
+         /* xgettext:c-format */
+         _bfd_error_handler (_("%B: unknown relocation type %d"),
                              input_bfd, (int) r_type);
 
          bfd_set_error (bfd_error_bad_value);
@@ -1157,7 +1165,7 @@ i370_elf_relocate_section (bfd *output_bfd,
        {
        default:
          _bfd_error_handler
-           ("%B: unknown relocation type %d for symbol %s",
+           (_("%B: unknown relocation type %d for symbol %s"),
             input_bfd, (int) r_type, sym_name);
 
          bfd_set_error (bfd_error_bad_value);
@@ -1298,7 +1306,8 @@ i370_elf_relocate_section (bfd *output_bfd,
        case (int) R_I370_COPY:
        case (int) R_I370_RELATIVE:
          _bfd_error_handler
-           ("%B: Relocation %s is not yet supported for symbol %s.",
+           /* xgettext:c-format */
+           (_("%B: Relocation %s is not yet supported for symbol %s."),
             input_bfd,
             i370_elf_howto_table[(int) r_type]->name,
             sym_name);
This page took 0.025583 seconds and 4 git commands to generate.