[patch] elf32-sh.c R_SH_DIR8WPN relocs
Hans-Peter Nilsson
hp@bitrange.com
Mon Mar 12 19:16:00 GMT 2001
Hi, DJ.
> 2001-03-12 DJ Delorie <dj@redhat.com>
>
> * elf32-sh.c (sh_elf_relocate_section): Only relocation
> R_SH_DIR8WP* relocs if they're against external symbols, else
> they're just for relaxing. Validate the reloc values.
Ok, with these changes:
! switch ((int)r_type)
^ Remove cast. You might need to provide a default
rule to pacify gcc. I was about to say "insert a space for proper
formatting" when I noticed that the containing switch does not use a cast
and that there's no real need to have one.
! bfd_set_error (bfd_error_bad_value);
You should emit an error message too, near this, saying something like
"unaligned branch target for relax-support relocation".
brgds, H-P
More information about the Binutils
mailing list