* Makefile.am: Run "make dep-am".
[deliverable/binutils-gdb.git] / bfd / elf32-sh.c
index 150d912b3ccb1b69870f154572477458b5b3b513..d8d4a6aab4d10803bed7c2775dadb264b132c468 100644 (file)
@@ -85,6 +85,9 @@ static boolean sh_elf_gc_sweep_hook
           const Elf_Internal_Rela *));
 static enum elf_reloc_type_class sh_elf_reloc_type_class
   PARAMS ((const Elf_Internal_Rela *));
+#ifdef INCLUDE_SHMEDIA
+inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
+#endif
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
@@ -2066,7 +2069,8 @@ sh_elf_relax_section (abfd, sec, link_info, again)
          shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelfn->r_info) : 0);
          bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
 
-         if (isym.st_shndx != _bfd_elf_section_from_bfd_section (abfd, sec))
+         if (isym.st_shndx
+             != (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
            {
              ((*_bfd_error_handler)
               (_("%s: 0x%lx: warning: symbol in unexpected section"),
@@ -2807,10 +2811,10 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
 
 static boolean
 sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      asection *sec;
      Elf_Internal_Rela *internal_relocs;
-     bfd_byte *contents;
+     bfd_byte *contents ATTRIBUTE_UNUSED;
      boolean *pswapped;
 {
   Elf_Internal_Rela *irel, *irelend;
@@ -4415,24 +4419,23 @@ sh_elf_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);
              else if (r_type == R_SH_REL32)
                {
                  BFD_ASSERT (h != NULL && h->dynindx != -1);
-                 relocate = false;
                  outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_REL32);
                  outrel.r_addend
                    = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -4455,7 +4458,6 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                  else
                    {
                      BFD_ASSERT (h->dynindx != -1);
-                     relocate = false;
                      outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_DIR32);
                      outrel.r_addend
                        = relocation + bfd_get_32 (input_bfd,
This page took 0.02594 seconds and 4 git commands to generate.