* elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
[deliverable/binutils-gdb.git] / bfd / elf32-sh.c
index 39fb14c6a1a7c4dc6a5a01198f711da4ef688af7..b509536e47693eb6cbc13380c345032be40c5e80 100644 (file)
@@ -57,7 +57,7 @@ static bfd_byte *sh_elf_get_relocated_section_contents
   (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
    bfd_boolean, asymbol **);
 static void sh_elf_copy_indirect_symbol
-  (struct elf_backend_data *, struct elf_link_hash_entry *,
+  (const struct elf_backend_data *, struct elf_link_hash_entry *,
    struct elf_link_hash_entry *);
 static int sh_elf_optimized_tls_reloc
   (struct bfd_link_info *, int, int);
@@ -3692,7 +3692,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   struct elf_sh_link_hash_table *htab;
   flagword flags, pltflags;
   register asection *s;
-  struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   int ptralign = 0;
 
   switch (bed->s->arch_size)
@@ -4764,7 +4764,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared
+         else if (! info->executable
                   && ! info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
@@ -4773,7 +4773,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
              if (! ((*info->callbacks->undefined_symbol)
                     (info, h->root.root.string, input_bfd,
                      input_section, rel->r_offset,
-                     (!info->shared || info->no_undefined
+                     (info->executable || info->no_undefined
                       || ELF_ST_VISIBILITY (h->other)))))
                return FALSE;
              relocation = 0;
@@ -6011,7 +6011,7 @@ sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-sh_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+sh_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
                             struct elf_link_hash_entry *dir,
                             struct elf_link_hash_entry *ind)
 {
@@ -6497,8 +6497,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
                                                          sreloc, 2))
                        return FALSE;
                    }
-                 if (sec->flags & SEC_READONLY)
-                   info->flags |= DF_TEXTREL;
                  elf_section_data (sec)->sreloc = sreloc;
                }
 
This page took 0.025548 seconds and 4 git commands to generate.