This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] elf32-sh.c R_SH_DIR8WPN relocs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]