This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] elf32-sh.c R_SH_DIR8WPN relocs
- To: <dj at redhat dot com>
- Subject: Re: [patch] elf32-sh.c R_SH_DIR8WPN relocs
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Mon, 12 Mar 2001 22:16:08 -0500 (EST)
- cc: <binutils at sources dot redhat dot com>
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