diff options
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 2042c34..af8dd67 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -2034,7 +2034,7 @@ sh_elf_relax_section (abfd, sec, link_info, again) *again = FALSE; - if (link_info->relocateable + if (link_info->relocatable || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) return TRUE; @@ -4650,9 +4650,9 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section, (info, _("Unexpected STO_SH5_ISA32 on local symbol is not handled"), input_bfd, input_section, rel->r_offset)); - if (info->relocateable) + if (info->relocatable) { - /* This is a relocateable link. We don't have to change + /* This is a relocatable link. We don't have to change anything, unless the reloc is against a section symbol, in which case we have to adjust according to where the section symbol winds up in the output section. */ @@ -4721,8 +4721,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section, { /* Section symbol are never (?) placed in the hash table, so we can just ignore hash relocations when creating a - relocateable object file. */ - if (info->relocateable) + relocatable object file. */ + if (info->relocatable) continue; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; @@ -5718,12 +5718,12 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section, static bfd_byte * sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order, - data, relocateable, symbols) + data, relocatable, symbols) bfd *output_bfd; struct bfd_link_info *link_info; struct bfd_link_order *link_order; bfd_byte *data; - bfd_boolean relocateable; + bfd_boolean relocatable; asymbol **symbols; { Elf_Internal_Shdr *symtab_hdr; @@ -5735,11 +5735,11 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order, /* We only need to handle the case of relaxing, or of having a particular set of section contents, specially. */ - if (relocateable + if (relocatable || elf_section_data (input_section)->this_hdr.contents == NULL) return bfd_generic_get_relocated_section_contents (output_bfd, link_info, link_order, data, - relocateable, + relocatable, symbols); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; @@ -6211,7 +6211,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs) srelgot = NULL; sreloc = NULL; - if (info->relocateable) + if (info->relocatable) return TRUE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; |