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

Message ID alpine.DEB.2.00.1802121521480.3553@tp.orcam.me.uk
State New
Headers show
Series
  • [committed] MIPS/GAS/test: Fix an n32 `.reginfo' size test failure
Related show

Commit Message

Maciej W. Rozycki Feb. 12, 2018, 4:05 p.m.
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.
---
 gas/testsuite/gas/mips/reginfo-2-n32.d |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

binutils-mips-gas-section-processing-reginfo-test-fix.diff

Patch

Index: binutils/gas/testsuite/gas/mips/reginfo-2-n32.d
===================================================================
--- binutils.orig/gas/testsuite/gas/mips/reginfo-2-n32.d	2018-02-05 14:45:53.000000000 +0000
+++ binutils/gas/testsuite/gas/mips/reginfo-2-n32.d	2018-02-10 07:34:00.892094789 +0000
@@ -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