[patch] [rfa] elf32-sh.c: Fix for relaxation testcases
Hans-Peter Nilsson
hp@bitrange.com
Sun Oct 29 09:13:00 GMT 2000
This is a fix for sh-elf for "SH simple relaxing" and "SH relaxing to
S-records", which were broken. I believe catching deleted relocs being
best done this way instead of a specific "if" test before the switch, as
with the sanity-checks and checks for relax-specific relocs.
Ok to commit?
2000-10-29 Hans-Peter Nilsson <hp@bitrange.com>
* elf32-sh.c (sh_elf_relocate_section): Add case for R_SH_NONE.
Index: elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.21
diff -p -c -r1.21 elf32-sh.c
*** elf32-sh.c 2000/09/18 16:19:15 1.21
--- elf32-sh.c 2000/10/29 17:04:32
*************** sh_elf_relocate_section (output_bfd, inf
*** 3038,3043 ****
--- 3038,3049 ----
relocation -= 4;
goto final_link_relocate;
+ case R_SH_NONE:
+ /* This is a reloc deleted at relaxation. Do nothing; proceed
+ with the next reloc. */
+ continue;
+ break;
+
default:
bfd_set_error (bfd_error_bad_value);
return false;
brgds, H-P
More information about the Binutils
mailing list