0x0c00f240, /* movw ip, #0xNNNN */
0x0c00f2c0, /* movt ip, #0xNNNN */
0xf8dc44fc, /* add ip, pc */
- 0xe7fdf000 /* ldr.w pc, [ip] */
- /* b .-2 */
+ 0xe7fcf000 /* ldr.w pc, [ip] */
+ /* b .-4 */
};
/* The format of the first entry in the procedure linkage table
stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
info = (struct bfd_link_info *) in_arg;
+ /* Fail if the target section could not be assigned to an output
+ section. The user should fix his linker script. */
+ if (stub_entry->target_section->output_section == NULL
+ && info->non_contiguous_regions)
+ info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ "Retry without --enable-non-contiguous-regions.\n"),
+ stub_entry->target_section);
+
globals = elf32_arm_hash_table (info);
if (globals == NULL)
return FALSE;
ret = FALSE;
}
-free_sym_buf:
+ free_sym_buf:
free (sympp);
return ret;
}
free (internal_relocs);
/* Fall through. */
error_ret_free_local:
- if (local_syms != NULL
- && (symtab_hdr->contents
- != (unsigned char *) local_syms))
+ if (symtab_hdr->contents != (unsigned char *) local_syms)
free (local_syms);
return FALSE;
}
}
}
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
contents = NULL;
- if (internal_relocs != NULL
- && elf_section_data (sec)->relocs != internal_relocs)
+ if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
internal_relocs = NULL;
}
return TRUE;
-error_return:
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ error_return:
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
- if (internal_relocs != NULL
- && elf_section_data (sec)->relocs != internal_relocs)
+ if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
return FALSE;
}
}
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
contents = NULL;
}
return TRUE;
-error_return:
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ error_return:
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
return FALSE;
}
}
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
contents = NULL;
}
return TRUE;
-error_return:
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
+ error_return:
+ if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
return FALSE;
rel.r_info = ELF32_R_INFO (dynindx, R_ARM_JUMP_SLOT);
initial_got_entry = (splt->output_section->vma
+ splt->output_offset);
+
+ /* PR ld/16017
+ When thumb only we need to set the LSB for any address that
+ will be used with an interworking branch instruction. */
+ if (using_thumb_only (htab))
+ initial_got_entry |= 1;
}
}
}
static bfd_boolean
-elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr * hdr)
+elf32_arm_section_flags (const Elf_Internal_Shdr *hdr)
{
if (hdr->sh_flags & SHF_ARM_PURECODE)
- *flags |= SEC_ELF_PURECODE;
+ hdr->bfd_section->flags |= SEC_ELF_PURECODE;
return TRUE;
}