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]
Other format: [Raw text]

[PATCH RFA] Re: Merging ELF ASE flags when linking


At Fri, 26 Jul 2002 17:37:11 +0000 (UTC), "Richard Sandiford" wrote:
> The patch below was originally posted by cgd last year:
> 
>     <http://sources.redhat.com/ml/binutils/2001-11/msg00113.html>
> 
> and is needed to link mips16 code with normal-mode code.
> It fixes the attached test case and causes no regressions on
> mips-elf.  OK to install?
> 
> (OK for 2.13.1?)

I just looked this over again, and noticed that you didn't do anything
similar to the last chunk of the patch quoted (i.e., the part that
adds a gas testsuite entry to make sure that the flag is actually set
when assembling code).  Further, it looks like in your test you only
test link compatibility, not that the flag is set at the end of the
process.

Any reason you think the flag _shouldn't_ be checked in both places?

How about the following?  (The icky regexps are so that it'll pass
regardless of the default ISA or ASEs for the target.)

passes gas,ld checks for mips-elf, mips64-elf, mipsisa32-elf,
mipsisa64-elf, from host x86-linux.


cgd
===================================================================
[ gas/testsuite/ChangeLog ]
2002-07-26  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/elf_ase_mips16.d: New file to test ELF MIPS16 ASE marking.
	* gas/mips/elf_ase_mips16.s: Likewise.
	* gas/mips/mips.exp: Run the new test.

[ ld/testsuite/ChangeLog ]
2002-07-26  Chris Demetriou  <cgd@broadcom.com>

	* ld-mips-elf/mips16-1.d: Check that ASE flag is actually set.

Index: gas/testsuite/gas/mips/elf_ase_mips16.d
===================================================================
RCS file: gas/testsuite/gas/mips/elf_ase_mips16.d
diff -N gas/testsuite/gas/mips/elf_ase_mips16.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/mips/elf_ase_mips16.d	26 Jul 2002 22:08:44 -0000
@@ -0,0 +1,8 @@
+# name: ELF MIPS16 ASE markings
+# source: elf_ase_mips16.s
+# objdump: -p
+# as: -mips16
+
+.*:.*file format.*mips.*
+private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*
+
Index: gas/testsuite/gas/mips/elf_ase_mips16.s
===================================================================
RCS file: gas/testsuite/gas/mips/elf_ase_mips16.s
diff -N gas/testsuite/gas/mips/elf_ase_mips16.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/mips/elf_ase_mips16.s	26 Jul 2002 22:08:44 -0000
@@ -0,0 +1,3 @@
+# Test of MIPS16 ASE file markings.
+
+	# no actual contents necessary!
Index: gas/testsuite/gas/mips/mips.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mips/mips.exp,v
retrieving revision 1.37
diff -u -p -r1.37 mips.exp
--- gas/testsuite/gas/mips/mips.exp	14 Jun 2002 14:08:54 -0000	1.37
+++ gas/testsuite/gas/mips/mips.exp	26 Jul 2002 22:08:44 -0000
@@ -180,6 +180,9 @@ if { [istarget mips*-*-*] } then {
 	run_dump_test "elf_e_flags3"
 	run_dump_test "elf_e_flags4"
 
+	# Verify that ASE markings are handled properly.
+	if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
+
  	run_dump_test "mips-gp32-fp32-pic"
  	run_dump_test "mips-gp32-fp64-pic"
  	run_dump_test "mips-gp64-fp32-pic"
Index: ld/testsuite/ld-mips-elf/mips16-1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/mips16-1.d,v
retrieving revision 1.1
diff -u -p -r1.1 mips16-1.d
--- ld/testsuite/ld-mips-elf/mips16-1.d	26 Jul 2002 18:56:25 -0000	1.1
+++ ld/testsuite/ld-mips-elf/mips16-1.d	26 Jul 2002 22:08:53 -0000
@@ -1,5 +1,9 @@
 #source: mips16-1a.s -no-mips16
 #source: mips16-1b.s -mips16
 #ld: -r
-#objdump: -d
+#objdump: -pd
+
+.*:.*file format.*mips.*
+private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*
+
 #pass


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