Skip to content

Commit

Permalink
MIPS/GAS/test: Fix an n32 `.reginfo' size test failure
Browse files Browse the repository at this point in the history
Correct a commit 2d6dda7 ("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.
  • Loading branch information
Maciej W. Rozycki committed Feb 12, 2018
1 parent d2159fd commit 12a4356
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gas/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-02-12 Maciej W. Rozycki <[email protected]>

* testsuite/gas/mips/reginfo-2-n32.d: Add `--no-pad-sections' to
`as' flags.

2018-02-12 Henry Wong <[email protected]>

* testsuite/gas/mips/r6.d: Update for "sigrie" encoding fix.
Expand Down
2 changes: 1 addition & 1 deletion gas/testsuite/gas/mips/reginfo-2-n32.d
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 12a4356

Please sign in to comment.