[PATCH] SHmedia ld testsuite

kaz Kojima kkojima@rr.iij4u.or.jp
Mon Oct 13 02:07:00 GMT 2003


Hi,

Currently ld tests for sh64-elf and sh64*-*-netbsd* are fairly
broken.  The attached patch is the revised version of

<URL:http://sources.redhat.com/ml/binutils/2003-07/msg00608.html>
<URL:http://sources.redhat.com/ml/binutils/2003-07/msg00611.html>

and fixes almost failures.  I'd like to check it in shortly
because it seems there were no objections for the above patches.
I've compressed the ld part of the patch because of its length.
That part is essentially same as the above two old patches and
I don't want to send 100k bytes of formal renumbering and so on.
Only bfd part is attached as a plain text. I've adjusted it so to
match the recent change of SH ELF relocation numbers. I've tested
it with gas and ld testsuite on sh64-elf and sh64-unknown-netbsdelf
only.  Comments by SHmedia experts are welcome.

Regards,
	kaz
--
2003-10-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
[bfd/ChangeLog]
	* elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
	renumbering of some relocation numbers.

[ld/ChangeLog]
	* emulparams/shelf32_nbsd.sh (OTHER_SECTIONS): Redefine.

[ld/testsuite/ChangeLog]
	* ld-sh/rd-sh.exp (LDFLAGS): Define appropriately for each
	sh64/sh5 targets.
	* ld-sh/sh.exp: Don't do relaxing test for sh64*-*-* and
	sh5*-*-* targets.
	* ld-sh/sh64/relax.exp (emul32): Set to shelf32_nbsd for netbsd.
	* ld-sh/sh64/relfail.exp: Set parameters for netbsd.
	* ld-sh/sh64/sh64.exp: Skip this for netbsd.  Trim the section
	numbers for crangerel1 and crengerel2 tests.
	* ld-sh/sh64/abi32.sd: Update.
	* ld-sh/sh64/abi32.xd: Likewise.
	* ld-sh/sh64/abi64.sd: Likewise.
	* ld-sh/sh64/abi64.xd: Likewise.
	* ld-sh/sh64/abixx-noexp.sd: Likewise.
	* ld-sh/sh64/cmpct1.sd: Likewise.
	* ld-sh/sh64/cmpct1.xd: Likewise.
	* ld-sh/sh64/crange1.rd: Likewise.
	* ld-sh/sh64/crange2.rd: Likewise.
	* ld-sh/sh64/crange3-cmpct.rd: Likewise.
	* ld-sh/sh64/crange3-media.rd: Likewise.
	* ld-sh/sh64/crange3.rd: Likewise.
	* ld-sh/sh64/crangerel1.rd: Likewise.
	* ld-sh/sh64/crangerel2.rd: Likewise.
	* ld-sh/sh64/dlsection.sd: Likewise.
	* ld-sh/sh64/endian.sbd: Likewise.
	* ld-sh/sh64/endian.sld: Likewise.
	* ld-sh/sh64/gotplt.d: Likewise.
	* ld-sh/sh64/init-cmpct.d: Likewise.
	* ld-sh/sh64/init-media.d: Likewise. 
	* ld-sh/sh64/init.s: Align functions.
	* ld-sh/sh64/init64.d: Update.
	* ld-sh/sh64/mix1-noexp.sd: Likewise.
	* ld-sh/sh64/mix1.sd: Likewise.
	* ld-sh/sh64/mix1.xd: Likewise.
	* ld-sh/sh64/mix2-noexp.sd: Likewise.
	* ld-sh/sh64/mix2.sd: Likewise.
	* ld-sh/sh64/mix2.xd:Likewise.
	* ld-sh/sh64/rel32.xd: Likewise.
	* ld-sh/sh64/rel64.xd: Likewise.
	* ld-sh/sh64/reldl32.rd: Likewise.
	* ld-sh/sh64/reldl64.rd: Likewise.
	* ld-sh/sh64/shdl32.xd: Update.
	* ld-sh/sh64/shdl64.sd: Likewise.
	* ld-sh/sh64/shdl64.xd: Likewise.
	* ld-sh/shared-1.d: Add -z nocombreloc to ld option.  Update.
	* ld-sh/sub2l-1.d: Make file format match with elf32-sh.*.
	* ld-sh/weak1.d: Likewise.

[bfd]

diff -u3prN ORIG/src/bfd/elf64-sh64.c TMP/src/bfd/elf64-sh64.c
--- ORIG/src/bfd/elf64-sh64.c	Wed Sep 24 14:48:18 2003
+++ TMP/src/bfd/elf64-sh64.c	Sun Oct 12 21:43:35 2003
@@ -1532,8 +1532,10 @@ sh_elf64_relocate_section (bfd *output_b
 	  || (r_type >= (int) R_SH_FIRST_INVALID_RELOC
 	      && r_type <= (int) R_SH_LAST_INVALID_RELOC)
 	  || (r_type >= (int) R_SH_DIR8WPN
-	      && r_type <= (int) R_SH_LAST_INVALID_RELOC_2)
-	  || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_3
+	      && r_type <= (int) R_SH_LAST_INVALID_RELOC)
+	  || (r_type >= (int) R_SH_GNU_VTINHERIT
+	      && r_type <= (int) R_SH_PSHL)
+	  || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_2
 	      && r_type <= R_SH_GOTPLT32)
 	  || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_4
 	      && r_type <= (int) R_SH_LAST_INVALID_RELOC_4))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z64.gz
Type: application/octet-stream
Size: 16189 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20031013/98f4b96a/attachment.obj>


More information about the Binutils mailing list