]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS/BFD: Correctly report unsupported `.reginfo' section size
authorMaciej W. Rozycki <macro@mips.com>
Mon, 5 Feb 2018 14:00:21 +0000 (14:00 +0000)
committerMaciej W. Rozycki <macro@mips.com>
Mon, 5 Feb 2018 14:00:21 +0000 (14:00 +0000)
commit2d6dda71611ba6cc16fe2bd21ac816d5f7d1e74d
tree64d139184ccc165a25a68a53f01467a1a127ebd9
parent7550610057c51d47e3815ef93893d4f4faa7e03d
MIPS/BFD: Correctly report unsupported `.reginfo' section size

Report an error when an unsupported `.reginfo' section size is found in
`_bfd_mips_elf_section_processing', removing an assertion that triggers
at elfxx-mips.c:7105 in GAS when assembling input like:

.section .reginfo
.word 0xdeadbeef

and in `objcopy --rename-section' when renaming an incorrectly sized
section to `.reginfo'.

bfd/
* elfxx-mips.c (_bfd_mips_elf_section_processing): For
SHT_MIPS_REGINFO sections don't assert the correct size and
report an error instead.

binutils/
* testsuite/binutils-all/mips/mips-reginfo.d: New test.
* testsuite/binutils-all/mips/mips-reginfo-n32.d: New test.
* testsuite/binutils-all/mips/mips-reginfo.s: New test source.
* testsuite/binutils-all/mips/mips.exp: Run the new tests.

gas/
* testsuite/gas/mips/reginfo-2.d: New test.
* testsuite/gas/mips/reginfo-2-n32.d: New test.
* testsuite/gas/mips/reginfo-2.l: New test stderr output.
* testsuite/gas/mips/reginfo-2.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.
13 files changed:
bfd/ChangeLog
bfd/elfxx-mips.c
binutils/ChangeLog
binutils/testsuite/binutils-all/mips/mips-reginfo-n32.d [new file with mode: 0644]
binutils/testsuite/binutils-all/mips/mips-reginfo.d [new file with mode: 0644]
binutils/testsuite/binutils-all/mips/mips-reginfo.s [new file with mode: 0644]
binutils/testsuite/binutils-all/mips/mips.exp
gas/ChangeLog
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/reginfo-2-n32.d [new file with mode: 0644]
gas/testsuite/gas/mips/reginfo-2.d [new file with mode: 0644]
gas/testsuite/gas/mips/reginfo-2.l [new file with mode: 0644]
gas/testsuite/gas/mips/reginfo-2.s [new file with mode: 0644]