[binutils-gdb] MIPS/GAS/test: Fix an n32 `.reginfo' size test failure

Maciej W.Rozycki macro@sourceware.org
Mon Feb 12 16:04:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=12a43565addfdf720b3ba8cc45eab6daf66f85dd

commit 12a43565addfdf720b3ba8cc45eab6daf66f85dd
Author: Maciej W. Rozycki <macro@mips.com>
Date:   Mon Feb 12 16:04:05 2018 +0000

    MIPS/GAS/test: Fix an n32 `.reginfo' size test failure
    
    Correct a commit 2d6dda71611b ("MIPS/BFD: Correctly report unsupported
    `.reginfo' section size") issue and avoid a GAS test failure:
    
    regexp_diff match failure
    regexp "^.*: Incorrect `\.reginfo' section size; expected 24, got 28$"
    line   "../as-new: dump.o: Incorrect `.reginfo' section size; expected 24, got 32"
    FAIL: MIPS assembled .reginfo section size (n32)
    
    on MIPS targets other than bare-metal ones.  The reason for this failure
    is section padding to alignment, done in `size_seg'.  For n32 `.reginfo'
    the section alignment is set to 3, and therefore the section is padded
    to a multiple of 8, except for bare-metal targets, for which padding is
    unconditionally disabled in `md_section_align'.
    
    Use `--no-pad-sections' then to disable padding for all targets, so that
    the size of `.reginfo' is always the same, matching the message pattern.
    
    	gas/
    	* testsuite/gas/mips/reginfo-2-n32.d: Add `--no-pad-sections' to
    	`as' flags.

Diff:
---
 gas/ChangeLog                          | 5 +++++
 gas/testsuite/gas/mips/reginfo-2-n32.d | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index dfb5edf..5c8ffd1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-12  Maciej W. Rozycki  <macro@mips.com>
+
+	* testsuite/gas/mips/reginfo-2-n32.d: Add `--no-pad-sections' to
+	`as' flags.
+
 2018-02-12  Henry Wong <henry@stuffedcow.net>
 
 	* testsuite/gas/mips/r6.d: Update for "sigrie" encoding fix.
diff --git a/gas/testsuite/gas/mips/reginfo-2-n32.d b/gas/testsuite/gas/mips/reginfo-2-n32.d
index ec1f9e3..572c076 100644
--- a/gas/testsuite/gas/mips/reginfo-2-n32.d
+++ b/gas/testsuite/gas/mips/reginfo-2-n32.d
@@ -1,4 +1,4 @@
 #name: MIPS assembled .reginfo section size (n32)
-#as: -n32 -mips3
+#as: -n32 -mips3 --no-pad-sections
 #source: reginfo-2.s
 #error-output: reginfo-2.l



More information about the Binutils-cvs mailing list