8sa1-binutils-gdb/binutils/testsuite/binutils-all/mips
Maciej W. Rozycki e5713223cb MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count'
Revert parts of commit fee24f1c5b ("objdump improvements for mips
elf64"), <https://sourceware.org/ml/binutils/2003-03/msg00108.html>, and
make the `->reloc_count' member of `struct bfd_section' hold the actual
number of internal relocations stored in its `->relocation' vector.  To
do so adjust `mips_elf64_slurp_one_reloc_table' to set `->reloc_count'
to the actual number of internal relocations retrieved and discard
`mips_elf64_canonicalize_reloc', `mips_elf64_canonicalize_dynamic_reloc'
and their corresponding target macros.  Contrary to the description of
`mips_elf64_slurp_one_reloc_table', adjusted appropriately, this makes
generic relocation processing code happy and satisfies the "merge notes
section" binutils test case.

Add extra binutils test cases to expand the coverage of the generic
"merge notes section" test case, now passing with the n64 ABI, across
the MIPS o32, n32 and n64 ABIs regardless of the default ABI selected in
target configuration, and also to verify correctness of the relocations
produced.  Conversely, do not provide any additional test cases for the
original issue addressed with the commit referred:

- objdump would display only 1/3 of the total number of relocations,
  because it used the external relocation count, but each external
  relocation is brought in as 3 internal relocations.

as n64 ABI relocation processing with `objdump -r' and `objdump -R' is
already widely covered across the GAS and LD test suites.

	bfd/
	* elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
	and function.
	(mips_elf64_canonicalize_dynamic_reloc): Likewise.
	(mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
	actual number of internal relocations retrieved.  Adjust
	function description.
	(bfd_elf64_canonicalize_reloc): Remove macro.
	(bfd_elf64_canonicalize_dynamic_reloc): Likewise.

	binutils/
	* testsuite/binutils-all/mips/mips-note-2.d: New test.
	* testsuite/binutils-all/mips/mips-note-2r.d: New test.
	* testsuite/binutils-all/mips/mips-note-2-n32.d: New test.
	* testsuite/binutils-all/mips/mips-note-2-n64.d: New test.
	* testsuite/binutils-all/mips/mips-note-2r-n32.d: New test.
	* testsuite/binutils-all/mips/mips-note-2r-n64.d: New test.
	* testsuite/binutils-all/mips/mips.exp: Define `has_newabi'.
	Run the new tests.
2017-05-20 00:31:39 +01:00
..
mips16-alias.d MIPS16/opcodes: Annotate instruction aliases 2017-04-25 11:55:34 +01:00
mips16-alias.s MIPS16/opcodes: Annotate instruction aliases 2017-04-25 11:55:34 +01:00
mips16-extend-insn.d MIPS16/opcodes: Make the handling of BREAK and SDBBP consistent 2017-05-12 01:12:10 +01:00
mips16-extend-insn.s MIPS16: Handle non-extensible instructions correctly 2016-12-23 19:33:45 +00:00
mips16-extend-noinsn.d MIPS16: Switch to 32-bit opcode table interpretation 2016-12-20 11:56:32 +00:00
mips16-extend-noinsn.s MIPS16/opcodes: Reformat raw EXTEND and undecoded output 2016-12-09 23:18:06 +00:00
mips16-noalias.d MIPS16/opcodes: Annotate instruction aliases 2017-04-25 11:55:34 +01:00
mips16-pcrel.d MIPS16/opcodes: Fix PC-relative operation delay-slot adjustment 2016-12-08 23:30:57 +00:00
mips16-pcrel.s MIPS16/opcodes: Fix PC-relative operation delay-slot adjustment 2016-12-08 23:30:57 +00:00
mips16-undecoded.d MIPS16e2: Add new MIPS16e2 ASE binutils and GAS tests 2017-05-15 13:57:11 +01:00
mips16-undecoded.s MIPS16e2: Add new MIPS16e2 ASE binutils and GAS tests 2017-05-15 13:57:11 +01:00
mips16e2-extend-insn.d MIPS16e2: Add new MIPS16e2 ASE binutils and GAS tests 2017-05-15 13:57:11 +01:00
mips16e2-undecoded.d MIPS16e2: Add new MIPS16e2 ASE binutils and GAS tests 2017-05-15 13:57:11 +01:00
mips-ase-1.d MIPS/opcodes: Also set disassembler's ASE flags from ELF structures 2016-12-14 22:12:21 +00:00
mips-ase-1.s MIPS/opcodes: Also set disassembler's ASE flags from ELF structures 2016-12-14 22:12:21 +00:00
mips-ase-2.d MIPS/opcodes: Also set disassembler's ASE flags from ELF structures 2016-12-14 22:12:21 +00:00
mips-ase-2.s MIPS/opcodes: Also set disassembler's ASE flags from ELF structures 2016-12-14 22:12:21 +00:00
mips-ase-3.d MIPS/opcodes: Also set disassembler's ASE flags from ELF structures 2016-12-14 22:12:21 +00:00
mips-note-2-n32.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips-note-2-n64.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips-note-2.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips-note-2r-n32.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips-note-2r-n64.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips-note-2r.d MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mips.exp MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' 2017-05-20 00:31:39 +01:00
mixed-micromips.d
mixed-micromips.s
mixed-mips16-micromips.d MIPS/opcodes: Correct mixed MIPS16 and microMIPS disassembly 2016-05-18 13:07:24 +01:00
mixed-mips16-micromips.s MIPS/opcodes: Correct mixed MIPS16 and microMIPS disassembly 2016-05-18 13:07:24 +01:00
mixed-mips16.d
mixed-mips16.s