* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
[deliverable/binutils-gdb.git] / bfd / elf32-m68k.c
index 7fcaf6a5889c78c75e7a209c762ec6907ee4b8da..1fb684472f0d25b847e9a8c8ab6dc86057dff288 100644 (file)
@@ -407,10 +407,13 @@ elf32_m68k_print_private_bfd_data (abfd, ptr)
   /* Ignore init flag - it may not be set, despite the flags field containing valid data.  */
 
   /* xgettext:c-format */
-  fprintf (file, _ ("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+  fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
 
   if (elf_elfheader (abfd)->e_flags & EF_CPU32)
-    fprintf (file, _ (" [cpu32]"));
+    fprintf (file, _(" [cpu32]"));
+
+  if (elf_elfheader (abfd)->e_flags & EF_M68000)
+    fprintf (file, _ (" [m68000]"));
 
   fputc ('\n', file);
 
@@ -1651,20 +1654,20 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
                }
 
              skip = false;
+             relocate = false;
 
              outrel.r_offset =
                _bfd_elf_section_offset (output_bfd, info, input_section,
                                         rel->r_offset);
              if (outrel.r_offset == (bfd_vma) -1)
                skip = true;
+             else if (outrel.r_offset == (bfd_vma) -2)
+               skip = true, relocate = true;
              outrel.r_offset += (input_section->output_section->vma
                                  + input_section->output_offset);
 
              if (skip)
-               {
-                 memset (&outrel, 0, sizeof outrel);
-                 relocate = false;
-               }
+               memset (&outrel, 0, sizeof outrel);
              /* h->dynindx may be -1 if the symbol was marked to
                  become local.  */
              else if (h != NULL
@@ -1673,7 +1676,6 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
                               & ELF_LINK_HASH_DEF_REGULAR) == 0))
                {
                  BFD_ASSERT (h->dynindx != -1);
-                 relocate = false;
                  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
                  outrel.r_addend = relocation + rel->r_addend;
                }
@@ -1714,7 +1716,6 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
                          BFD_ASSERT (indx > 0);
                        }
 
-                     relocate = false;
                      outrel.r_info = ELF32_R_INFO (indx, r_type);
                      outrel.r_addend = relocation + rel->r_addend;
                    }
This page took 0.039341 seconds and 4 git commands to generate.