X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-csky.c;h=06ea26632d147fc01aaf7387cb8f98417bc7d575;hb=e04f33c09f85b936d544c78b1fa6b1134dfbcecd;hp=04214f28ea5d606e1390e11401e17e623f95743a;hpb=b3adc24a0713411ab38a21dc894dd40dbc5c8f4f;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c index 04214f28ea..06ea26632d 100644 --- a/bfd/elf32-csky.c +++ b/bfd/elf32-csky.c @@ -1500,7 +1500,7 @@ static struct bfd_link_hash_table * csky_elf_link_hash_table_create (bfd *abfd) { struct csky_elf_link_hash_table *ret; - bfd_size_type amt = sizeof (struct csky_elf_link_hash_table); + size_t amt = sizeof (struct csky_elf_link_hash_table); ret = (struct csky_elf_link_hash_table*) bfd_zmalloc (amt); if (ret == NULL) @@ -2712,7 +2712,7 @@ csky_elf_check_relocs (bfd * abfd, p = *head; if (p == NULL || p->sec != sec) { - bfd_size_type amt = sizeof *p; + size_t amt = sizeof *p; p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) @@ -3413,7 +3413,7 @@ elf32_csky_size_stubs (bfd *output_bfd, if (r_type >= (unsigned int) R_CKCORE_MAX) { bfd_set_error (bfd_error_bad_value); -error_ret_free_internal: + error_ret_free_internal: if (elf_section_data (section)->relocs == NULL) free (internal_relocs); goto error_ret_free_local; @@ -3592,7 +3592,7 @@ error_ret_free_internal: } return TRUE; -error_ret_free_local: + error_ret_free_local: return FALSE; } @@ -3621,6 +3621,14 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, stub_entry = (struct elf32_csky_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 = csky_elf_hash_table (info); if (globals == NULL) return FALSE; @@ -3770,7 +3778,7 @@ elf32_csky_setup_section_lists (bfd *output_bfd, unsigned int top_id, top_index; asection *section; asection **input_list, **list; - bfd_size_type amt; + size_t amt; struct csky_elf_link_hash_table *htab = csky_elf_hash_table (info); if (!htab)