[rfa] ARM dangerous relocations are ... dangerous
Nick Clifton
nickc@redhat.com
Fri Nov 3 14:51:00 GMT 2006
Hi Daniel,
> 2006-11-01 Daniel Jacobowitz <dan@codesourcery.com>
>
> * elf32-arm.c (find_thumb_glue): Add ERROR_MESSAGE argument; set it
> on error.
> (find_arm_glue): Likewise.
> (elf32_thumb_to_arm_stub, elf32_arm_create_thumb_stub)
> (elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate): Add
> ERROR_MESSAGE argument and pass it through.
> (elf32_arm_to_thumb_export_stub): Update.
> (elf32_arm_relocate_section): Use ERROR_MESSAGE and reloc_dangerous.
Approved - please apply, although...
> @@ -3362,6 +3363,7 @@ elf32_arm_to_thumb_export_stub (struct e
> struct elf32_arm_link_hash_table * globals;
> asection *sec;
> bfd_vma val;
> + char *error_message;
>
> eh = elf32_arm_hash_entry(h);
> /* Allocate stubs for exported Thumb functions on v4t. */
> @@ -3384,7 +3386,8 @@ elf32_arm_to_thumb_export_stub (struct e
> + sec->output_section->vma;
> myh = elf32_arm_create_thumb_stub (info, h->root.root.string,
> h->root.u.def.section->owner,
> - globals->obfd, sec, val, s);
> + globals->obfd, sec, val, s,
> + &error_message);
> BFD_ASSERT (myh);
> return TRUE;
> }
This feels wrong to me, since error_message is never really used in the
function. Maybe the BFD_ASSERT ought to be changed to check the return
value and use the error message if myh is NULL ?
Cheers
Nick
More information about the Binutils
mailing list