Commit Graph

620 Commits

Author SHA1 Message Date
Jose E. Marchesi aca4efc7a4 binutils: add support for eBPF
This patch adds support for ELF64 eBPF to readelf, and fixes a `nm'
test to run properly in bpf-*-* targets.

binutils/ChangeLog:

2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* readelf.c: Include elf/bpf.h.
	(guess_is_rela): Hanle EM_BPF.
	(dump_relocations): Likewise.
	(is_32bit_abs_reloc): Likewise.
	* testsuite/binutils-all/nm.exp: Add bpf-*-* to the list of
	ELF targets.
2019-05-23 19:34:21 +02:00
Tamar Christina fab7c86ea4 AArch64: Add SVE DWARF registers
The SVE DRAWF register names are missing from binutils, this may cause objdump
and readelf to ignore certain DRAWF output as the registers are unknown (most
notably CIEs).

This patch adds the registers in accordance to the "DWARF for ARM(r) 64-bit
Architecture (AARch64) with SVE support" documentation [1].

[1] https://developer.arm.com/docs/100985/latest/dwarf-for-the-arm-64-bit-architecture-aarch64-with-sve-support

binutils/ChangeLog:

	* dwarf.c (dwarf_regnames_aarch64): Add SVE registers.
	* testsuite/binutils-all/aarch64/sve-dwarf-registers.d: New test.
	* testsuite/binutils-all/aarch64/sve-dwarf-registers.s: New test.
2019-05-21 11:05:22 +01:00
Faraz Shahbazker d87343802b [MIPS] PR gas/14798: Limit IRIX5 specific default typing to IRIX targets
On IRIX 5, every global symbol that is not explicitly labelled as
being a function is assumed to be an object.  There is no reason
why IRIX behaviour should extend to all MIPS targets, so limit this
to only IRIX targets.

gas/
	PR 14798
	* config/tc-mips.c (s_mips_globl): Only treat symbols that are
	not explicitly labelled as BSF_OBJECTs for IRIX targets.
	* testsuite/gas/mips/pr14798.s: New test source.
	* testsuite/gas/mips/pr14798-irix.d: New test.
	* testsuite/gas/mips/pr14798.d: Likewise.
	* testsuite/gas/mips/mips.exp: Run the new tests.

binutils/
	PR 14798
	* testsuite/binutils-all/readelf.ss-mips: Update reference output.
	* testsuite/binutils-all/readelf.ss-tmips: Likewise.

ld/
	PR 14798
	* testsuite/ld-mips-elf/reloc-6a.s: Specify .text section for
	global code symbols.
	* testsuite/ld-mips-elf/reloc-6b.s: Likewise.
2019-05-20 11:08:23 -07:00
Nick Clifton c2509a1cc8 Add missing verilogtest.s file. 2019-05-14 16:16:56 +01:00
Jamey Hicks 37d0d09177 Add new option to objcopy: --verilog-data-width. Use this option to set the size of byte bundles generated in verilog format files.
PR 19921
binutils* objcopy.c: Add new option --verilog-data-width.  Use it to set
	the value of VerilogDataWidth.
	* doc/binutils.texi: Document the new option.
	* testsuite/binutils-all/objcopy.exp: Run tests of new option.
	* testsuite/binutils-all/verilog-1.hex: New file.
	* testsuite/binutils-all/verilog-2.hex: New file.
	* testsuite/binutils-all/verilog-4.hex: New file.
	* testsuite/binutils-all/verilog-8.hex: New file.
	* NEWS: Mention the new feature.

bfd	* verilog.c: (VerilogDataWidth): New variable.
	(verilog_write_record): Emit bytes in VerilogDataWidth bundles.
2019-05-14 10:42:25 +01:00
Alan Modra 391bf8918b Re: Sign-extend start and stop address inputs to objdump
git commit 2379f9c475 introduced an rx-elf test failure.  This fixes it.

	* testsuite/binutils-all/objdump.exp (test_objdump_disas_limited),
	(test_objdump_content_limited): Add text arg, use in place of .text.
	(bintest_signed.o): Call get_standard_section_names for name of
	text section.
2019-05-10 23:32:21 +09:30
Faraz Shahbazker 2379f9c475 Sign-extend start and stop address inputs to objdump
For targets that treat addresses as signed (MIPS/SH64), user-specified
start/stop address limits cannot be compared directly to section VMAs.
We must sign-extend user-specified 32-bit address limits which have
bit 31 set for such targets.

binutils/
	* objdump.c (sign_extend_address): New function.
	(dump_bfd): Sign-extend user-specified start/stop addresses
	for targets that need it.
	* testsuite/binutils-all/objdump.exp: Add tests for objdump
	with start and stop addresses in higher address ranges.
2019-05-08 09:07:35 -07:00
Matthew Malcomson 2ecde2b632 Fix spelling mistakes in binutils testsuite.
* testsuite/binutils-all/objdump.exp: Correct executable
	spelling.
	* testsuite/binutils-all/compress.exp: Likewise.
2019-05-01 16:52:51 +01:00
Nick Clifton 25a0274483 Change nm so that when it is running in POSIX compatible mode, it does not prefix symbol values with 0.
PR 24507
	* nm.c: (print_format): New variable.
	(value_format_32bit, value_format_64bit): Delete.
	(set_print_radix): Remove code to alter value_format strings.
	(set_output_format): Record chosen format in print_format.
	(get_print_format): New function - constructs a printf formatting
	string according to the requirements of size, radix, and output
	format.
	(print_value): Use get_print_format.
	* testsuite/binutils-all/nm.exp: Add tests of "nm --format=posix"
	and "nm -t d".
2019-05-01 14:43:06 +01:00
Alan Modra a0fb961508 ns32k testsuite tidy
Some of these tests were excluded for ns32k-netbsd, exclude for all
ns32k instead.

binutils/
	* testsuite/binutils-all/copy-2.d: Don't run for ns32k-*-*.
	* testsuite/binutils-all/copy-3.d: Likewise.
gas/
	* testsuite/gas/all/gas.exp: Remove ns32k xfails.
	* testsuite/gas/all/weakref1u.d: Don't run for ns32k-*-*.
ld/
	* testsuite/ld-scripts/pr20302.d: Don't run for ns32k-*-*.
	* testsuite/ld-scripts/section-match-1.d: Likewise.
	* testsuite/ld-undefined/require-defined.exp: Likewise.
2019-04-16 19:59:55 +09:30
H.J. Lu 462cac5884 x86: Define GNU_PROPERTY_X86_ISA_1_AVX512_BF16
Update assembler and readelf to support

 #define GNU_PROPERTY_X86_ISA_1_AVX512_BF16  (1U << 24)

for AVX512_BF16.

binutils/

	* readelf.c (decode_x86_isa): Handle
	GNU_PROPERTY_X86_ISA_1_AVX512_BF16.
	* testsuite/binutils-all/i386/pr21231b.d: Updated.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.

gas/

	* config/tc-i386.c (output_insn): Support
	GNU_PROPERTY_X86_ISA_1_AVX512_BF16.
	* testsuite/gas/i386/property-2.s: Add AVX512_BF16 test.
	* testsuite/gas/i386/property-2.d: Updated.
	* testsuite/gas/i386/x86-64-property-2.d: Likewise.

include/

	* elf/common.h (GNU_PROPERTY_X86_ISA_1_AVX512_BF16): New.
2019-04-08 17:04:16 -07:00
H.J. Lu 82b5359312 Count i386-moss as ELF
* testsuite/binutils-all/nm.exp: Count i386-moss as ELF.
2019-04-08 11:34:32 -07:00
Tamar Christina 05805feba2 AArch64/Arm: Update testcases fixing endiannes and linux targets
This fixes the testcases that are failing due to my recent patch.
It turns out that the start address across baremetal and linux builds
isn't entirely predictable without a linker script.  Since the address
themselves are not the important thing I am ignoring them now.

Secondly I was encoding data using .word using non 0 values, however
because .word is subjected to endiannes these non-zero values under
big-endian happen to fall into the encoding space of instructions which
changes the disassembly.  Using 0 fixes this problem and the purpose of
the test still holds, though objdump will dump ... for data only sections,
which is ok as the data/insn mixed sections will test the patch.

The ARM Attributes sections is not important and is ignored.

binutils/ChangeLog:

	* testsuite/binutils-all/aarch64/in-order.d: Likewise.
	* testsuite/binutils-all/aarch64/out-of-order-all.d: Likewise.
	* testsuite/binutils-all/aarch64/out-of-order.d: Likewise.
	* testsuite/binutils-all/aarch64/out-of-order.s: Likewise.
	* testsuite/binutils-all/arm/in-order-all.d: Likewise.
	* testsuite/binutils-all/arm/in-order.d: Likewise.
	* testsuite/binutils-all/arm/out-of-order-all.d: Likewise.
	* testsuite/binutils-all/arm/out-of-order.d: Likewise.
	* testsuite/binutils-all/arm/out-of-order.s: Likewise.
2019-03-26 16:47:14 +00:00
Tamar Christina 796d6298bb Arm: Fix Arm disassembler mapping symbol search.
Similar to the AArch64 patches the Arm disassembler has the same issues with
out of order sections but also a few short comings.

For one thing there are multiple code blocks to determine mapping symbols, and
they all work slightly different, and neither fully correct.  The first thing
this patch does is centralise the mapping symbols search into one function
mapping_symbol_for_insn.  This function is then updated to perform a search in
a similar way as AArch64.

Their used to be a value has_mapping_symbols which was used to determine the
default disassembly for objects that have no mapping symbols.  The problem with
the approach was that it was determining this value in the same loop that needed
it, which is why this field could take on the states -1, 0, 1 where -1 means
"don't know".  However this means that until you actually find a mapping symbol
or reach the end of the disassembly glob, you don't know if you did the right
action or not, and if you didn't you can't correct it anymore.

This is why the two jump-reloc-veneers-* testcases end up disassembling some
insn as data when they shouldn't.

Out of order here refers to an object file where sections are not listed in a
monotonic increasing VMA order.

The ELF ABI for Arm [1] specifies the following for mapping symbols:

  1) A text section must always have a corresponding mapping symbol at it's
     start.
  2) Data sections do not require any mapping symbols.
  3) The range of a mapping symbol extends from the address it starts on up to
     the next mapping symbol (exclusive) or section end (inclusive).

However there is no defined order between a symbol and it's corresponding
mapping symbol in the symbol table.  This means that while in general we look
up for a corresponding mapping symbol, we have to make at least one check of
the symbol below the address being disassembled.

When disassembling different PCs within the same section, the search for mapping
symbol can be cached somewhat.  We know that the mapping symbol corresponding to
the current PC is either the previous one used, or one at the same address as
the current PC.

However this optimization and mapping symbol search must stop as soon as we
reach the end or start of the section.  Furthermore if we're only disassembling
a part of a section, the search is a allowed to search further than the current
chunk, but is not allowed to search past it (The mapping symbol if there, must
be at the same address, so in practice we usually stop at PC+4).

lastly, since only data sections don't require a mapping symbol the default
mapping type should be DATA and not INSN as previously defined, however if the
binary has had all its symbols stripped than this isn't very useful.  To fix
this we determine the default based on the section flags.  This will allow the
disassembler to be more useful on stripped binaries.  If there is no section
than we assume you to be disassembling INSN.

[1] https://developer.arm.com/docs/ihi0044/latest/elf-for-the-arm-architecture-abi-2018q4-documentation#aaelf32-table4-7

binutils/ChangeLog:

	* testsuite/binutils-all/arm/in-order-all.d: New test.
	* testsuite/binutils-all/arm/in-order.d: New test.
	* testsuite/binutils-all/arm/objdump.exp: Support .d tests.
	* testsuite/binutils-all/arm/out-of-order-all.d: New test.
	* testsuite/binutils-all/arm/out-of-order.T: New test.
	* testsuite/binutils-all/arm/out-of-order.d: New test.
	* testsuite/binutils-all/arm/out-of-order.s: New test.

ld/ChangeLog:

	* testsuite/ld-arm/jump-reloc-veneers-cond-long.d: Update disassembly.
	* testsuite/ld-arm/jump-reloc-veneers-long.d: Update disassembly.

opcodes/ChangeLog:

	* arm-dis.c (struct arm_private_data): Remove has_mapping_symbols.
	(mapping_symbol_for_insn): Implement new algorithm.
	(print_insn): Remove duplicate code.
2019-03-25 15:05:53 +00:00
Tamar Christina 60df3720d7 AArch64: Have -D override mapping symbol as documented.
The documentation for -D says that on Arm platforms -D should disassemble
data as instructions.

"If the target is an ARM architecture this switch also has the effect of
forcing the disassembler to decode pieces of data found in code sections
as if they were instructions. "

This makes it do as it says on the tincan so it's more consistent with
aarch32.  The usecase here is for baremetal developers who have created
their instructions using .word directives instead if .insn.

Though for Linux users I do find this behavior somewhat non-optimal.
Perhaps there should be a new flag that just disassembles the values
following the actual mapping symbol?

binutils/ChangeLog:

	* testsuite/binutils-all/aarch64/in-order-all.d: New test.
	* testsuite/binutils-all/aarch64/out-of-order-all.d: New test.
	* testsuite/binutils-all/aarch64/out-of-order.d:

opcodes/ChangeLog:

	* aarch64-dis.c (print_insn_aarch64):
	Implement override.
2019-03-25 15:05:53 +00:00
Tamar Christina 5145776164 AArch64: Fix AArch64 disassembler mapping symbol search
My previous patch for AArch64 was not enough to catch all the cases where
disassembling an out-of-order section could go wrong.  It had missed the case
DATA sections could be incorrectly disassembled as TEXT.

Out of order here refers to an object file where sections are not listed in a
monotonic increasing VMA order.

The ELF ABI for AArch64 [1] specifies the following for mapping symbols:

  1) A text section must always have a corresponding mapping symbol at it's
     start.
  2) Data sections do not require any mapping symbols.
  3) The range of a mapping symbol extends from the address it starts on up to
     the next mapping symbol (exclusive) or section end (inclusive).

However there is no defined order between a symbol and it's corresponding
mapping symbol in the symbol table.  This means that while in general we look
up for a corresponding mapping symbol, we have to make at least one check of
the symbol below the address being disassembled.

When disassembling different PCs within the same section, the search for mapping
symbol can be cached somewhat.  We know that the mapping symbol corresponding to
the current PC is either the previous one used, or one at the same address as
the current PC.

However this optimization and mapping symbol search must stop as soon as we
reach the end or start of the section.  Furthermore if we're only disassembling
a part of a section, the search is a allowed to search further than the current
chunk, but is not allowed to search past it (The mapping symbol if there, must
be at the same address, so in practice we usually stop at PC+4).

lastly, since only data sections don't require a mapping symbol the default
mapping type should be DATA and not INSN as previously defined, however if the
binary has had all its symbols stripped than this isn't very useful.  To fix this
we determine the default based on the section flags.  This will allow the
disassembler to be more useful on stripped binaries.  If there is no section than
we assume you to be disassembling INSN.

[1] https://developer.arm.com/docs/ihi0056/latest/elf-for-the-arm-64-bit-architecture-aarch64-abi-2018q4#aaelf64-section4-5-4

binutils/ChangeLog:

	* testsuite/binutils-all/aarch64/in-order.d: New test.
	* testsuite/binutils-all/aarch64/out-of-order.d: Disassemble data as
	well.

opcodes/ChangeLog:

	* aarch64-dis.c (print_insn_aarch64): Update the mapping symbol search
	order.
2019-03-25 15:05:53 +00:00
Tamar Christina 53b2f36bf6 AArch64: Fix disassembler bug with out-of-order sections
The AArch64 disassembler has an optimization that it uses to reduce the amount
it has to search for mapping symbols during disassembly.  This optimization
assumes that sections are listed in the section header in monotonic increasing
VMAs.  However this is not a requirement for the ELF specification.

Because of this when such "out of order" sections occur the disassembler would
pick the wrong mapping symbol to disassemble the section with.

This fixes it by explicitly passing along the stop offset for the current
disassembly glob and when this changes compared to the previous one we've seen
the optimization won't be performed.  In effect this restarts the search from
a well defined starting point.  Usually the symbol's address.

The existing stop_vma can't be used for this as it is allowed to be unset and
setting this unconditionally would change the semantics of this field.

binutils/ChangeLog:

	* objdump.c (disassemble_bytes): Pass stop_offset.
	* testsuite/binutils-all/aarch64/out-of-order.T: New test.
	* testsuite/binutils-all/aarch64/out-of-order.d: New test.
	* testsuite/binutils-all/aarch64/out-of-order.s: New test.

include/ChangeLog:

	* dis-asm.h (struct disassemble_info): Add stop_offset.

opcodes/ChangeLog:

	* aarch64-dis.c (last_stop_offset): New.
	(print_insn_aarch64): Use stop_offset.
2019-03-25 15:05:53 +00:00
Matthew Malcomson 093f70ccd3 Allow multiple tests to be run on systems with older versions of TCL installed.
PR 24287
	* testsuite/lib/binutils-common.exp (run_dump_test): Replace a use
	of "lmap" with a "foreach" loop.
2019-03-05 10:09:50 +00:00
Matthew Malcomson 52d6f3ee94 Testsuite: Allow multiple lines of "as" in testsuite.
Committed on behalf of Matthew Malcomson.

This allows checking the command line parsing more easily than before by
allowing many command line invokations from the same .d file.

Each line is used as a set of flags, and the tests are ran against the output
of the assembler with each set.
Each line of assembler is treated as another set of tests (as if the test file
were copied to another with a different #as: line).

This patch includes some example uses where multiple testcases can be merged
into one file using this new functionality.

binutils/ChangeLog:

	* testsuite/lib/binutils-common.exp: Allow multiple "as" lines.

gas/ChangeLog:

	* testsuite/gas/aarch64/dotproduct.d: Use multiple "as" lines.
	* testsuite/gas/aarch64/dotproduct_armv8_4.d: Remove.
	* testsuite/gas/aarch64/dotproduct_armv8_4.s: Remove.
	* testsuite/gas/aarch64/illegal-dotproduct.d: Use multiple "as"
	lines.
	* testsuite/gas/aarch64/ldst-rcpc-armv8_2.d: Remove.
	* testsuite/gas/aarch64/ldst-rcpc.d: Use multiple "as" lines.
2019-02-27 13:16:14 +00:00
Nick Clifton 39f0547e55 Extend objdump's --dwarf=follow-links option so that separate debug info files will also be affected by other dump function, and symbol tables from separate debug info files will be used when disassembling the main file.
* objdump.c (sym_ok): New function.
	(find_symbol_for_address): Use new function.
	(disassemble_section): Compare sections by name, not pointer.
	(dump_dwarf): Move code to initialise byte_get pointer and iterate
	over separate debug files from here to ...
	(dump_bfd): ... here.  Add parameter indicating that a separate
	debug info file is being dumped.  For main file, pull in the
	symbol tables from all separate debug info files.
	(display_object): Update call to dump_bfd.
	* doc/binutils.texi: Document extened behaviour of the
	--dwarf=follow-links option.
	* NEWS: Mention this new feature.
	* testsuite/binutils-all/objdump.WK2: Update expected output.
	* testsuite/binutils-all/objdump.exp (test_follow_debuglink): Add
	options and dump file parameters.
	Add extra test.
	* testsuite/binutils-all/objdump.WK3: New file.
	* testsuite/binutils-all/readelf.exp: Change expected output for
	readelf -wKis test.
	* testsuite/binutils-all/readelf.wKis: New file.
2019-02-25 12:15:41 +00:00
Nick Clifton 24841daa74 Extend readelf and objdump so that they will display and follow multiple links to separate debug information files.
PR 23843
	* dwarf.h (struct separate_info): New structure for containing
	information on separate debug info files.
	* dwarf.c (struct dwo_info): New structure for containing dwo
	links.
	(first_dwo_info): Chain of dwo_info structures.
	(first_separate_file): Chain of separate_info structures.
	(separate_debug_file, separate_debug_filename): Delete.
	(fetch_alt_indirect_string): Scan all separate debug info files
	for the requested string.
	(add_dwo_info): New function.
	(add_dwo_name): New function.
	(add_dwo_dir): New function.
	(add_dwo_id: New function.
	(free_dwo_info): New function.
	(read_and_display_attr_value): Store DWO data using the new
	functions.
	(load_debug_section_with_follow): If necessary, scan the list of
	separate debug info files for the requested section.
	(add_separate_debug_file): New function.
	(load_separate_debug_info): Call add_separate_debug_file to store
	the information on the newly loaded file.
	(load_dwo_file): Likewise.
	(load_separate_debif_file): Rename to load_separate_debug_files.
	Change return type to boolean.  If following links then attempt to
	load all separate debug info files, not just the first one.
	(free_debug_memory): Release memory in dwo_info and separate_info
	chains.
	* objdump.c (dump_dwarf): Iterate over all loaded debg info files.
	* readelf.c (process_object): Likewise.
	* doc/debug.options.texi: Update descriptions of links and
	follow-links options.
	* testsuite/binutils-all/objdump.WK2: Update expected output.
	* testsuite/binutils-all/readelf.k2: Likewise.
	* NEWS: Announce the new feature.
2019-02-22 10:36:24 +00:00
Andrew Burgess 46cbf38dc3 binutils: Add new GNU format mode to `size` utility
The size tool currently defaults to berkeley format output.  However,
this output format has a weird quirk, read-only data is counted
against the text sections, not the data sections.

The code offers no real explanation for why this is, but I'm reluctant
to change it for two reasons, first, I'm assuming it probably makes
sense in some case that I'm not thinking of (maybe a target where
sections are not marked executable, and so there's no distinction
between read-only data and code), and second, the code has been this
way for at least 20 years, I worry that changing things now might
cause more confusion than it solves.

This commit then introduces a new output format for the size tool,
this new format displays the results in a similar manor to the
berkeley format, but counts read-only data in the data column, and
only executable sections are counted in the text column.

Given that this is a brand new output format I've gone ahead and
simplified things a little, while the berkeley format displays the
total twice, once in decimal and once in hex, the new display format
just displays the total in decimal.  Of course, there's still the
'--radix' option which can be used to display all the results in
hexadecimal or octal.

I've called the new format 'gnu', so '--format=gnu' or '-G' are used
to access it.

binutils/ChangeLog:

	* size.c (berkeley_format): Delete.
	(enum output_format): New enum.
	(selected_output_format): New variable.
	(usage): Update to mention GNU format.
	(main): Update to extract options, and select format as needed.
	Handle GNU format where needed.
	(berkeley_sum): Renamed to...
	(berkeley_or_gnu_sum): ...this, and updated to handle both formats.
	(berkeley_format): Renamed to...
	(berkeley_or_gnu_format): ...this, and updated to handle both
	formats.
	(print_sizes): Handle GNU format.
	* doc/binutils.texi (size): Document new GNU format.
	* testsuite/binutils-all/size.exp: Add test of extended
	functionality.
	* NEWS: Mention new functionality.
2019-02-08 11:07:24 +00:00
Nick Clifton baae986a40 Update objdump's --disassemble=<symbol> feature so that if <symbol> is a function, the entire function will be disassembled, regardless of the presence of interveening symbols.
* objdump.c (disassemble_section): When disassembling from a
	symbol only stop at the next symbol if the original symbol was not
	a function symbol.  Otherwise continue disassembling until a new
	function is reached.
	* testsuite/binutils-all/objdump.exp: Add tests of extended
	functionality.
	* testsuite/binutils-all/disasm.s: New test source file.
2019-01-17 15:29:43 +00:00
Jim Wilson 2dc8dd17cd RISC-V: Support ELF attribute for gas and readelf.
2019-01-16  Kito Cheng  <kito@andestech.com>
		    Nelson Chu  <nelson@andestech.com>

	bfd/
	* elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
	(elf_backend_obj_attrs_vendor): Define.
	(elf_backend_obj_attrs_section_type): Likewise.
	(elf_backend_obj_attrs_section): Likewise.
	(elf_backend_obj_attrs_arg_type): Define as
	riscv_elf_obj_attrs_arg_type.
	* elfxx-riscv.c (riscv_estimate_digit): New.
	(riscv_estimate_arch_strlen1): Likewise.
	(riscv_estimate_arch_strlen): Likewise.
	(riscv_arch_str1): Likewise.
	(riscv_arch_str): Likewise.
	* elfxx-riscv.h (riscv_arch_str): Declare.
	binutils/
	* readelf.c (get_riscv_section_type_name): New function.
	(get_section_type_name): Add handler for RISC-V.
	(riscv_attr_tag_t): Declare.
	(riscv_attr_tag): New.
	(display_riscv_attribute): New function.
	(process_attributes): Add handler for RISC-V.
	* testsuite/binutils-all/strip-3.d: Remove .riscv.attribute
	section.
	gas/
	* config/tc-riscv.c (DEFAULT_RISCV_ATTR): Define to 0 if not defined.
	(riscv_set_options): Add `arch_attr` field.
	(riscv_opts): Set default value for arch_attr.
	(riscv_write_out_arch_attr): New.
	(riscv_set_public_attributes): Likewise.
	(riscv_md_end): Likewise.
	(riscv_convert_symbolic_attribute): Likewise.
	(s_riscv_attribute): Likewise.
	(explicit_arch_attr): Likewise.
	(riscv_pseudo_table): Add .attribute to the table.
	(options): Add OPTION_ARCH_ATTR and OPTION_NO_ARCH_ATTR
	enumeration constants.
	(md_longopts): Add `march-attr' and `mno-arch-attr' options.
	(md_parse_option): Handle the new options.
	(md_show_usage): Document the `march-attr' option.
	* config/tc-riscv.h (md_end): Define as riscv_md_end
	(riscv_md_end): Declare.
	(CONVERT_SYMBOLIC_ATTRIBUTE): Define as
	riscv_convert_symbolic_attribute.
	(riscv_convert_symbolic_attribute): Declare.
	(start_assemble): Declare.
	* testsuite/gas/elf/elf.exp: Adjust test case for section2.e.
	* testsuite/gas/elf/section2.e-riscv: New.
	* testsuite/gas/riscv/attribute-01.d: New test
	* testsuite/gas/riscv/attribute-02.d: Likewise.
	* testsuite/gas/riscv/attribute-03.d: Likewise.
	* testsuite/gas/riscv/attribute-04.d: Likewise.
	* testsuite/gas/riscv/attribute-04.s: Likewise.
	* testsuite/gas/riscv/attribute-05.d: Likewise.
	* testsuite/gas/riscv/attribute-05.s: Likewise.
	* testsuite/gas/riscv/attribute-06.d: Likewise.
	* testsuite/gas/riscv/attribute-06.s: Likewise.
	* testsuite/gas/riscv/attribute-07.d: Likewise.
	* testsuite/gas/riscv/attribute-07.s: Likewise.
	* testsuite/gas/riscv/attribute-08.d: Likewise.
	* testsuite/gas/riscv/attribute-08.s: Likewise.
	* testsuite/gas/riscv/attribute-unknown.d: Likewise.
	* testsuite/gas/riscv/attribute-unknown.s: Likewise.
	* testsuite/gas/riscv/empty.l: Likewise.
	* doc/c-riscv.texi (.attribute): Add documentation.
	* configure.ac (--enable-default-riscv-attribute): New options.
	* configure: Re-generate.
	* config.in: Re-generate.
	include/
	* elf/riscv.h (SHT_RISCV_ATTRIBUTES): Define.
	(Tag_RISCV_arch): Likewise.
	(Tag_RISCV_priv_spec): Likewise.
	(Tag_RISCV_priv_spec_minor): Likewise.
	(Tag_RISCV_priv_spec_revision): Likewise.
	(Tag_RISCV_unaligned_access): Likewise.
	(Tag_RISCV_stack_align): Likewise.
2019-01-16 13:14:59 -08:00
Alan Modra 923c6a7564 cxxfilt test failures
Fixes these:
bfin-elf  +FAIL: cxxfilt: demangling _Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E
bfin-elf  +FAIL: cxxfilt: demangling _Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
h8300-elf  +FAIL: cxxfilt: demangling _Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E
h8300-elf  +FAIL: cxxfilt: demangling _Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
i686-pe  +FAIL: cxxfilt: demangling _Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E
i686-pe  +FAIL: cxxfilt: demangling _Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
i686-vxworks  +FAIL: cxxfilt: demangling _Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E
i686-vxworks  +FAIL: cxxfilt: demangling _Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
m32c-elf  +FAIL: cxxfilt: demangling _Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E
m32c-elf  +FAIL: cxxfilt: demangling _Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE

	* testsuite/binutils-all/cxxfilt.exp: Pass --no-strip-underscores
	unconditionally to tests needing the option rather than via a
	list of targets.
2019-01-09 11:22:50 +10:30
Nick Clifton 236f4ebe3a Remove support for old gnu v2 name mangling.
PR 24044
	* cxxfilt.c (hp_symbol_characters): Delete.
	(main): Remove depcreated demangling styles.
	* stabs.c (parse_stab_argtypes): Remove support for old gnu v2
	demangling opnames.
	* testsuite/binutils-all/cxxfilt.exp: Use the
	--no-strip-underscore option for targets that do prefix their
	symbols with underscores.
	Update tests to elimiate those that use gnu v2 encoding.
2019-01-08 16:53:26 +00:00
Tamar Christina e3ecd63133 Add testcase for PR/24065.
This adds a new testcase for objcopy -O ihex to test
that it correctly works.

binutils/ChangeLog:

	PR 24065
	* testsuite/binutils-all/copy-6.d: New test.
	* testsuite/binutils-all/objcopy.exp: Use it.
2019-01-08 14:58:03 +00:00
Alan Modra 171b8e1957 run_dump_test source in build directory
Some existing tests build .s and .d files for run_dump_test, using an
absolute #source: line in the .d file.  This patch changes that scheme
a little to instead use "#source: ./..." in .d files rather than
"#source: $objdir/...", which is more useful in cases where the .d
file is not generated.

This allows RX gas test files to be built in the build directory,
rather than in a source directory (which might be read-only).

binutils/
	* testsuite/lib/binutils-common.exp (run_dump_test): Don't prepend
	$srcdir/$subdir to source file name if it starts with "./".
gas/
	* testsuite/gas/rx/rx.exp: Create generated test source in
	current directory.
	* testsuite/gas/rx/Xtod.d, * testsuite/gas/rx/abs.d,
	* testsuite/gas/rx/adc.d, * testsuite/gas/rx/add.d,
	* testsuite/gas/rx/and.d, * testsuite/gas/rx/bclr.d,
	* testsuite/gas/rx/bcnd.d, * testsuite/gas/rx/bfmov.d,
	* testsuite/gas/rx/bmcnd.d, * testsuite/gas/rx/bnot.d,
	* testsuite/gas/rx/bra.d, * testsuite/gas/rx/brk.d,
	* testsuite/gas/rx/bset.d, * testsuite/gas/rx/bsr.d,
	* testsuite/gas/rx/btst.d, * testsuite/gas/rx/clrpsw.d,
	* testsuite/gas/rx/cmp.d, * testsuite/gas/rx/dabs.d,
	* testsuite/gas/rx/dadd.d, * testsuite/gas/rx/dbt.d,
	* testsuite/gas/rx/dcmp.d, * testsuite/gas/rx/ddiv.d,
	* testsuite/gas/rx/div.d, * testsuite/gas/rx/divu.d,
	* testsuite/gas/rx/dmov.d, * testsuite/gas/rx/dmul.d,
	* testsuite/gas/rx/dneg.d, * testsuite/gas/rx/dpopm.d,
	* testsuite/gas/rx/dpushm.d, * testsuite/gas/rx/dround.d,
	* testsuite/gas/rx/dsqrt.d, * testsuite/gas/rx/dsub.d,
	* testsuite/gas/rx/dtoX.d, * testsuite/gas/rx/emaca.d,
	* testsuite/gas/rx/emsba.d, * testsuite/gas/rx/emul.d,
	* testsuite/gas/rx/emula.d, * testsuite/gas/rx/emulu.d,
	* testsuite/gas/rx/fadd.d, * testsuite/gas/rx/fcmp.d,
	* testsuite/gas/rx/fdiv.d, * testsuite/gas/rx/fmul.d,
	* testsuite/gas/rx/fsqrt.d, * testsuite/gas/rx/fsub.d,
	* testsuite/gas/rx/ftoi.d, * testsuite/gas/rx/ftou.d,
	* testsuite/gas/rx/gprel.d, * testsuite/gas/rx/int.d,
	* testsuite/gas/rx/itof.d, * testsuite/gas/rx/jmp.d,
	* testsuite/gas/rx/jsr.d, * testsuite/gas/rx/machi.d,
	* testsuite/gas/rx/maclh.d, * testsuite/gas/rx/maclo.d,
	* testsuite/gas/rx/max.d, * testsuite/gas/rx/min.d,
	* testsuite/gas/rx/mov.d, * testsuite/gas/rx/movco.d,
	* testsuite/gas/rx/movli.d, * testsuite/gas/rx/movu.d,
	* testsuite/gas/rx/msbhi.d, * testsuite/gas/rx/msblh.d,
	* testsuite/gas/rx/msblo.d, * testsuite/gas/rx/mul.d,
	* testsuite/gas/rx/mulhi.d, * testsuite/gas/rx/mullh.d,
	* testsuite/gas/rx/mullo.d, * testsuite/gas/rx/mvfacgu.d,
	* testsuite/gas/rx/mvfachi.d, * testsuite/gas/rx/mvfaclo.d,
	* testsuite/gas/rx/mvfacmi.d, * testsuite/gas/rx/mvfc.d,
	* testsuite/gas/rx/mvfcp.d, * testsuite/gas/rx/mvfdc.d,
	* testsuite/gas/rx/mvfdr.d, * testsuite/gas/rx/mvtacgu.d,
	* testsuite/gas/rx/mvtachi.d, * testsuite/gas/rx/mvtaclo.d,
	* testsuite/gas/rx/mvtc.d, * testsuite/gas/rx/mvtcp.d,
	* testsuite/gas/rx/mvtdc.d, * testsuite/gas/rx/neg.d,
	* testsuite/gas/rx/nop.d, * testsuite/gas/rx/not.d,
	* testsuite/gas/rx/opecp.d, * testsuite/gas/rx/or.d,
	* testsuite/gas/rx/pop.d, * testsuite/gas/rx/popc.d,
	* testsuite/gas/rx/popm.d, * testsuite/gas/rx/push.d,
	* testsuite/gas/rx/pushc.d, * testsuite/gas/rx/pushm.d,
	* testsuite/gas/rx/r-bcc.d, * testsuite/gas/rx/r-bra.d,
	* testsuite/gas/rx/racl.d, * testsuite/gas/rx/racw.d,
	* testsuite/gas/rx/rdacl.d, * testsuite/gas/rx/rdacw.d,
	* testsuite/gas/rx/revl.d, * testsuite/gas/rx/revw.d,
	* testsuite/gas/rx/rmpa.d, * testsuite/gas/rx/rolc.d,
	* testsuite/gas/rx/rorc.d, * testsuite/gas/rx/rotl.d,
	* testsuite/gas/rx/rotr.d, * testsuite/gas/rx/round.d,
	* testsuite/gas/rx/rstr.d, * testsuite/gas/rx/rte.d,
	* testsuite/gas/rx/rtfi.d, * testsuite/gas/rx/rts.d,
	* testsuite/gas/rx/rtsd.d, * testsuite/gas/rx/sat.d,
	* testsuite/gas/rx/satr.d, * testsuite/gas/rx/save.d,
	* testsuite/gas/rx/sbb.d, * testsuite/gas/rx/sccnd.d,
	* testsuite/gas/rx/scmpu.d, * testsuite/gas/rx/setpsw.d,
	* testsuite/gas/rx/shar.d, * testsuite/gas/rx/shll.d,
	* testsuite/gas/rx/shlr.d, * testsuite/gas/rx/smovb.d,
	* testsuite/gas/rx/smovf.d, * testsuite/gas/rx/smovu.d,
	* testsuite/gas/rx/sstr.d, * testsuite/gas/rx/stnz.d,
	* testsuite/gas/rx/stz.d, * testsuite/gas/rx/sub.d,
	* testsuite/gas/rx/suntil.d, * testsuite/gas/rx/swhile.d,
	* testsuite/gas/rx/tst.d, * testsuite/gas/rx/utof.d,
	* testsuite/gas/rx/wait.d, * testsuite/gas/rx/xchg.d,
	* testsuite/gas/rx/xor.d: Add #source line.
ld/
	* testsuite/ld-elf/sec64k.exp: Use . rather than $objdir in
	generated source file names.
	* testsuite/ld-m68k/m68k-got.exp: Likewise.
2019-01-08 18:50:54 +10:30
Simon Marchi 4ae80ffc55 Revert "Sync libiberty sources with master version in gcc repository. Updated stabs demangling and cxxfilt tests to match."
The previous commit breaks the GDB build, which is still using functions
cplus_demangle_opname & co.  Since removing these usages is not an
obvious fix, let's revert this patch until we get rid of them.
2019-01-07 18:06:35 -05:00
Nick Clifton 053af8c903 Sync libiberty sources with master version in gcc repository. Updated stabs demangling and cxxfilt tests to match.
PR 24044
	* stabs.c (parse_stab_argtypes): Remove call to
	cplus_mangle_opcode.
	* testsuite/binutils-all/cxxfilt.exp: Replace tests of v2 encoding
	with v3 encoding.  Add escape for known failures.
2019-01-07 13:18:53 +00:00
Alan Modra 827041555a Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
H.J. Lu 0a59decbb8 elf: Add PT_GNU_PROPERTY segment type
Linkers group input note sections with the same name into one output
note section with the same name.  One output note section is placed in
one PT_NOTE segment.  New linkers merge all input .note.gnu.property
sections into one output .note.gnu.property section with a single
NT_GNU_PROPERTY_TYPE_0 note in a single PT_NOTE segment.  Since older
linkers treat input .note.gnu.property section as a generic note section
and just concatenate all input .note.gnu.property sections into one
output .note.gnu.property section without merging them, we may
see one or more NT_GNU_PROPERTY_TYPE_0 notes in PT_NOTE segment, which
are invalid.

GNU_PROPERTY_X86_UINT32_VALID was defined to address this issue such
that linker sets the bit for non-relocatable outputs.  But it isn't
sufficient:

1. It doesn't cover generic properties.
2. When -mx86-used-note=yes is passed to x86 assembler, the
GNU_PROPERTY_X86_UINT32_VALID bit is set in GNU_PROPERTY_X86_ISA_1_USED
property in object file and older linkers generate invalid
NT_GNU_PROPERTY_TYPE_0 notes with the GNU_PROPERTY_X86_UINT32_VALID bit
set.

I am proposing the following changes:

1. Add PT_GNU_PROPERTY segment type:

 # define PT_GNU_PROPERTY (PT_LOOS + 0x474e553)

which covers .note.gnu.property section.
2. Remove GNU_PROPERTY_X86_UINT32_VALID.

bfd/

	PR ld/23900
	* elf.c (get_program_header_size): Add a PT_GNU_PROPERTY
	segment for NOTE_GNU_PROPERTY_SECTION_NAME.
	(_bfd_elf_map_sections_to_segments): Create a PT_GNU_PROPERTY
	segment for NOTE_GNU_PROPERTY_SECTION_NAME.
	* elfxx-x86.c (_bfd_elf_link_setup_gnu_properties): Don't set
	GNU_PROPERTY_X86_UINT32_VALID.

binutils/

	PR ld/23900
	* readelf.c (get_segment_type): Support PT_GNU_PROPERTY.
	(decode_x86_isa): Don't check GNU_PROPERTY_X86_UINT32_VALID.
	(decode_x86_feature_1): Likewise.
	(decode_x86_feature_2): Likewise.
	(print_gnu_property_note): Remove GNU_PROPERTY_X86_UINT32_VALID
	check.
	* testsuite/binutils-all/i386/empty.d: Updated.
	* testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/empty.d: Likewise.
	* testsuite/binutils-all/i386/pr21231b.s: Change
	GNU_PROPERTY_X86_ISA_1_USED bits to 0x7fffffff.
	* testsuite/binutils-all/x86-64/pr21231b.s: Likewise.

gas/

	PR ld/23900
	* config/tc-i386.c (x86_cleanup): Don't set
	GNU_PROPERTY_X86_UINT32_VALID.
	* testsuite/gas/i386/property-1.s: Change
	GNU_PROPERTY_X86_ISA_1_USED bits to 0.

include/

	PR ld/23900
	* elf/common.h (PT_GNU_PROPERTY): New.
	(GNU_PROPERTY_X86_UINT32_VALID): Removed.

ld/

	PR ld/23900
	* testsuite/ld-elf/elf.exp: Run PR ld/23900 test.
	* testsuite/ld-elf/pr23900-1-32.rd: New file.
	* testsuite/ld-elf/pr23900-1-64.rd: Likewise.
	* testsuite/ld-elf/pr23900-1.d: Likewise.
	* testsuite/ld-elf/pr23900-1.s: Likewise.
	* testsuite/ld-elf/pr23900-2.s: Likewise.
	* testsuite/ld-elf/pr23900-2a.d: Likewise.
	* testsuite/ld-elf/pr23900-2b.d: Likewise.
	* testsuite/ld-i386/ibt-plt-1.d: Adjusted.
	* testsuite/ld-i386/ibt-plt-2c.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2d.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3d.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-1.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3c.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
	* testsuite/ld-i386/pr23372c.d: Expect <None>
	for GNU_PROPERTY_X86_ISA_1_USED.
	* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23372c.d: Likewise.
	* testsuite/ld-x86-64/pr23372d-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23372d.d: Likewise.
	* testsuite/ld-x86-64/property-x86-5a.s: Change
	GNU_PROPERTY_X86_ISA_1_USED bits to 0.
	* testsuite/ld-x86-64/property-x86-5b.s: Likewise.
2018-12-14 04:55:34 -08:00
Alan Modra 7ca166c940 Fix strings.c endian issue and strings test
git commit 71f5e3f7b6 obviously wasn't tested on a big-endian host,
and the test fail message resulted in tcl errors.

	* strings.c (unget_part_char): New function.
	(print_strings): Use unget_part_char.  Formatting.
	* testsuite/binutils-all/strings.exp (test_multibyte): Don't
	use square brackets in fail message.  Expect "String1\nString2".
2018-12-08 13:22:33 +10:30
Nick Clifton af03af8f55 Synchronize libiberty with gcc and add --no-recruse-limit option to tools that support name demangling.
This patch addresses the multitude of bug reports about resource exhaustion
in libiberty's name demangling code.  It adds a limit to the amount of
recursion that is allowed, before an error is triggered.  It also adds a
new demangling option to disable this limit.  (The limit is enabled by
default).

	PR 87681
	PR 87675
	PR 87636
	PR 87335
libiberty * cp-demangle.h (struct d_info): Add recursion_limit field.
	* cp-demangle.c (d_function_type): If the recursion limit is
	enabled and reached, return with a failure result.
        (d_demangle_callback): If the recursion limit is enabled, check
	for a mangled string that is so long that there is not enough
	stack space for the local arrays.
        * cplus-dem.c (struct work): Add recursion_level field.
	(demangle_nested_args): If the recursion limit is enabled and
	reached, return with a failure result.

include	* demangle.h (DMGL_RECURSE_LIMIT): Define.
        (DEMANGLE_RECURSION_LIMIT): Prototype.

binutuils * addr2line.c (demangle_flags): New static variable.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (translate_address): Pass demangle_flags to bfd_demangle.
        (main): Handle --recurse-limit and --no-recurse-limit options.
        * cxxfilt.c (flags): Add DMGL_RECURSE_LIMIT.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (main): Handle new options.
        * dlltool.c (gen_def_file): Include DMGL_RECURSE_LIMIT in flags
        passed to cplus_demangle.
        * nm.c (demangle_flags): New static variable.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (main): Handle new options.
        * objdump.c (demangle_flags): New static variable.
        (usage): Add --recurse-limit and --no-recurse-limit.
        (long_options): Likewise.
        (objdump_print_symname): Pass demangle_flags to bfd_demangle.
        (disassemble_section): Likewise.
        (dump_dymbols): Likewise.
        (main): Handle new options.
        * prdbg.c (demangle_flags): New static variable.
        (tg_variable): Pass demangle_flags to demangler.
        (tg_start_function): Likewise.
        * stabs.c (demangle_flags): New static variable.
        (stab_demangle_template): Pass demangle_flags to demangler.
        (stab_demangle_v3_argtypes): Likewise.
        (stab_demangle_v3_arg): Likewise.
	* doc/binutuls.texi: Document new command line options.
	* NEWS: Mention the new feature.
        * testsuite/config/default.exp (CXXFILT): Define if not already
        defined.
        (CXXFILTFLAGS): Likewise.
        * testsuite/binutils-all/cxxfilt.exp: New file.  Runs a few
        simple tests of the cxxfilt program.
2018-12-07 11:32:55 +00:00
Nick Clifton 8acbe8ffa0 Update the assembler to use a version of 3 when generating the header of the .debug_line section.
PR 23941
gas	* dwarf2dbg.c (DWARF2_LINE_VERSION): Change to 3.
	* testsuite/gas/elf/dwarf2-3.d: Update expected output.
	* testsuite/gas/elf/dwarf2-5.d: Likewise.
	* testsuite/gas/i386/debug1.d: Likewise.
	* testsuite/gas/i386/dw2-compress-1.d: Likewise.
	* testsuite/gas/i386/dw2-compress-3a.d: Likewise.
	* testsuite/gas/i386/dw2-compress-3b.d: Likewise.
	* testsuite/gas/i386/dw2-compressed-1.d: Likewise.
	* testsuite/gas/i386/dw2-compressed-3a.d: Likewise.
	* testsuite/gas/i386/dw2-compressed-3b.d: Likewise.
	* testsuite/gas/ia64/pr13167.d: Likewise.
	* testsuite/gas/mips/loc-swap-2.d: Likewise.
	* testsuite/gas/mips/loc-swap.d: Likewise.
	* testsuite/gas/mips/micromips@loc-swap-2.d: Likewise.
	* testsuite/gas/mips/micromips@loc-swap.d: Likewise.
	* testsuite/gas/mips/mips16@loc-swap-2.d: Likewise.
	* testsuite/gas/mips/mips16@loc-swap.d: Likewise.
	* testsuite/gas/mips/mips16e@loc-swap.d: Likewise.

binutils* testsuite/binutils-all/i386/compressed-1a.d: Update expected output.
	* testsuite/binutils-all/x86-64/compressed-1a.d: Likewise.
2018-12-03 17:26:41 +00:00
Mark Wielaard 4207142d6a Handle ELF compressed header alignment correctly by setting up the section alignment correctly for the Elf32_Chdr or Elf64_Chdr type and respect the ch_addralign field when decompressing the section data.
PR binutils/23919
binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
	(dump_sections_as_bytes): Likewise.
	(load_specific_debug_sections): Likewise.
	* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
	* testsuite/binutils-all/dw2-3.rt: Likewise.

bfd	* bfd.c (bfd_update_compression_header): Explicitly set alignment.
	(bfd_check_compression_header): Add uncompressed_alignment_power
	argument. Check ch_addralign is a power of 2.
	* bfd-in2.h: Regenerated.
	* compress.c (bfd_compress_section_contents): Get and set
	orig_uncompressed_alignment_pow if section is decompressed.
	(bfd_is_section_compressed_with_header): Add and get
	uncompressed_align_pow_p argument.
	(bfd_is_section_compressed): Add uncompressed_align_power argument
	to bfd_is_section_compressed_with_header call.
	(bfd_init_section_decompress_status): Get and set
	uncompressed_alignment_power.
	* elf.c (_bfd_elf_make_section_from_shdr): Add
	uncompressed_align_power argument to
	bfd_is_section_compressed_with_header call.
2018-11-27 11:59:10 +00:00
H.J. Lu f92f9e8780 readelf: Prune gaps warning in build notes
Since some object files may not have build notes, it is normal to have
gaps in build notes.

	PR binutils/23898
	* testsuite/lib/binutils-common.exp (prune_warnings_extra):
	Prune gaps in build notes.
2018-11-20 06:46:03 -08:00
Francois H. Theron 97b3f39201 opcodes/nfp: Fix disassembly of crc[] with swapped operands.
The decoding of the CRC operation in alu instructions was using bits
from the instruction word directly, instead of srcA which would be
different if the swap bit was set.

Signed-off-by: Francois H. Theron <francois.theron@netronome.com>
2018-11-13 15:33:21 +02:00
Nick Clifton 71f5e3f7b6 Enhance the strings program so that it can display multibyte strings.
* strings.c (print_strings): Check for multibyte encodings.
	* binutils-all/strings-1.bin: New file.  Test binary for string decoding.
	* testsuite/binutils-all/strings.exp: New file.  Test the strings program.
	* testsuite/config/default.exp (STRINGS): Define if not provided
	by the environment.
	(STRINGSFLAGS): Likewise.
2018-11-09 12:48:23 +00:00
Masatake Yamato d3def5d73e Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol.
* objdump.c (long_options): Have the --disassemble option take an
	optional argument.
	(usage): Add description for the `symbol' argument to the
	--disassemble option.
	(disasm_sym): New file private variable.
	(struct objdump_disasm_info): New field `symbol'.
	(disassemble_section): Introduce `do_print' local variable
	to control whether objdump displays the result of disassembling
	for a symbol or not.
	(main): Set `symbol' file private variable if the option argument
	for the --disassemble option is given.
	* doc/binutils.texi (objdump): Add description for the option
	argument.
	* NEWS: Mention the new feature.
	* testsuite/binutils-all/objdump.exp: Add tests of the -d and
	--disassemble=<symbol> options.
	* testsuite/binutils-all/bintest.s: Add more symbols and code.
	* testsuite/binutils-all/readelf.s: Update expected output.
	* testsuite/binutils-all/readelf.ss-64: Likewise.
	* testsuite/binutils-all/readelf.ss-mips: Likewise.
	* testsuite/binutils-all/readelf.ss-tmips: Likewise.
2018-11-07 18:07:36 +00:00
Yoshinori Sato 8d3c78e473 rx: Add target rx-*-linux. 2018-11-07 17:18:05 +09:00
Thomas Preud'homme 33ea299c25 Fix ld action in run_dump_test
run_dump_test proposes an ld action but when trying to make use of it in
a gas test it gave me some Tcl error. It turns out that it references
the check_shared_lib_support procedure and ld_elf_shared_opt variable
both only available in ld-lib.exp. I've thus moved the procedure in
binutils-common.exp and defined the variable needed in the various
default.exp of testsuite that seem to be using run_dump_test.

Since check_shared_lib_support itself references the ld variable not
defined in binutils-common I've defined it from LD in run_dump_test and
fixed LD and LDFLAGS to be defined as expected by run_dump_test in the
various default.exp of testsuite using run_dump_test.

2018-11-01  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

binutils/
	* testsuite/config/default.exp: Define LD, LDFLAGS and
	ld_elf_shared_opt.
	* testsuite/lib/binutils-common.exp (check_shared_lib_support): Moved
	from ld-lib.exp.
	(run_dump_test): Set ld to $LD.

gas/
	* testsuite/config/default.exp: Define LD, LDFLAGS and
	ld_elf_shared_opt.

ld/
	* testsuite/lib/ld-lib.exp (check_shared_lib_support): Moved to
	binutils-common.exp.
2018-11-01 17:19:17 +00:00
Nick Clifton de564eb5cc Prevent the --keep-global-symbol and --globalize-symbol options from being used together.
This is the result of an email thread starting here:
  https://sourceware.org/ml/binutils/2018-09/msg00031.html

The main point of the thread is this observation:

  * Supposing we had an object file with two globals, SomeGlobal and
  SomeOtherGlobal, if one were to do "--globalize-symbol SomeGlobal
  --keep-global-symbol SomeOtherGlobal", you might expect that both
  SomeGlobal and SomeOtherGlobal are global in the output file... but it
  isn't. Because --keep-global-symbol is set and doesn't include
  SomeGlobal, SomeGlobal will be demoted to a local symbol. And because
  the check to see if we should apply the --globalize-symbol flag checks
  "flags" (the original flag set), and not "sym->flags", it decides not
  to do anything, so SomeGlobal remains a local symbol. Although this is
  a weird edge case, should this be changed so that --keep-global-symbol
  implicitly keeps anything also specified via --globalize-symbol? (The
  code seems technically correct with respect to the documentation, but
  IMO the behavior is counter-intuitive).

binutils* objcopy.c (copy_main): Issue a fata error if the
	--keep-global-symbol(s) and the --globalize-symbol(s) options are
	used together.
	* doc/binutils.texi: Document that the two options are
	incompatible.
	* testsuite/binutils-all/copy-5.d: New test.
	* testsuite/binutils-all/objcopy.exp: Run the new test.
2018-10-11 11:38:10 +01:00
John Darrington 17f6ade235 binutils --dwarf=decodedline: Add display of is_stmt flag
binutils/
    * dwarf.c (display_debug_lines_decoded): Add display of is_stmt.
    * testsuite/binutils-all/dw5.W: Deal with the consequences.
    * testsuite/binutils-all/objdump.WL: Deal with the consequences.
2018-09-20 19:02:50 +02:00
Nick Clifton fbaf61ad52 Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream!
We have not only removed all unsupported and obsolete code, but also supported lost of new features,
including better link-time relaxations and TLS implementations. Besides, the files generated by the
newly assembler and linker usually get higher performance and more optimized code size.

ld	* emultempl/nds32elf.em (hyper_relax): New variable.
	(nds32_elf_create_output_section_statements):
	the parameters of bfd_elf32_nds32_set_target_option
	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
	PARSE_AND_LIST_ARGS_CASES): Add new option --mhyper-relax.
	* emultempl/nds32elf.em (nds32_elf_after_open): Updated.
	* emultempl/nds32elf.em (tls_desc_trampoline): New variable.
	* (nds32_elf_create_output_section_statements): Updated.
	* (nds32_elf_after_parse): Disable relaxations when PIC is enable.
	* (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
	PARSE_AND_LIST_ARGS_CASES): Add new option --m[no-]tlsdesc-trampoline.

include	* elf/nds32.h: Remove the unused target features.
	* dis-asm.h (disassemble_init_nds32): Declared.
	* elf/nds32.h (E_NDS32_NULL): Removed.
	(E_NDS32_HAS_DSP_INST, E_NDS32_HAS_ZOL): New.
	* opcode/nds32.h: Ident.
	(N32_SUB6, INSN_LW): New macros.
	(enum n32_opcodes): Updated.
	* elf/nds32.h: Doc fixes.
	* elf/nds32.h: Add R_NDS32_LSI.
	* elf/nds32.h: Add new relocations for TLS.

gas 	* config/tc-nds32.c: Remove the unused target features.
	(nds32_relax_relocs, md_pseudo_table, nds32_elf_record_fixup_exp,
	nds32_set_elf_flags_by_insn, nds32_insert_relax_entry,
	nds32_apply_fix): Likewise.
	(nds32_no_ex9_begin): Removed.
	* config/tc-nds32.c (add_mapping_symbol_for_align,
	make_mapping_symbol, add_mapping_symbol): New functions.
	* config/tc-nds32.h (enum mstate): New.
	(nds32_segment_info_type): Likewise.
	* configure.ac (--enable-dsp-ext, --enable-zol-ext): New options.
	* config.in: Regenerated.
	* configure: Regenerated.
	* config/tc-nds32.c (nds32_dx_regs):
	Set the value according to the configuration.
	(nds32_perf_ext, nds32_perf_ext2, nds32_string_ext, nds32_audio_ext):
	Likewise.
	(nds32_dsp_ext): New variable. Set the value according to the
	configuration.
	(nds32_zol_ext): Likewise.
	(asm_desc, nds32_pseudo_opcode_table): Make them static.
	(nds32_set_elf_flags_by_insn): Updated.
	(nds32_check_insn_available): Updated.
	(nds32_str_tolower): New function.
	* config/tc-nds32.c (relax_table): Updated.
	(md_begin): Updated.
	(md_assemble): Use XNEW macro to allocate space for `insn.info',
	and then remember to free it.
	(md_section_align): Cast (-1) to ValueT.
	(nds32_get_align): Cast (~0U) to addressT.
	(nds32_relax_branch_instructions): Updated.
	(md_convert_frag): Add new local variable `final_r_type'.
	(invalid_prev_frag): Add new bfd_boolean parameter `relax'.
	All callers changed.
	* config/tc-nds32.c (struct nds32_relocs_pattern): Add `insn' field.
	(struct nds32_hint_map): Add `option_list' field.
	(struct suffix_name, suffix_table): Remove the unused `pic' field.
	(do_pseudo_b, do_pseudo_bal): Remove the suffix checking.
	(do_pseudo_la_internal, do_pseudo_pushpopm): Indent.
	(relax_hint_bias, relax_hint_id_current): New static variables.
	(reset_bias, relax_hint_begin): New variables.
	(nds_itoa): New function.
	(CLEAN_REG, GET_OPCODE): New macros.
	(struct relax_hint_id): New.
	(nds32_relax_hint): For .relax_hint directive, we can use `begin'
	and `end' to mark the relax pattern without giving exactly id number.
	(nds32_elf_append_relax_relocs): Handle the case that the .relax_hint
	directives are attached to pseudo instruction.
	(nds32_elf_save_pseudo_pattern): Change the second parameter from
	instruction's opcode to byte code.
	(nds32_elf_build_relax_relation): Add new bfd_boolean parameter
	`pseudo_hint'.
	(nds32_lookup_pseudo_opcode): Fix the overflow issue.
	(enum nds32_insn_type): Add N32_RELAX_ALU1 and N32_RELAX_16BIT.
	(nds32_elf_record_fixup_exp, relax_ls_table, hint_map,
	nds32_find_reloc_table, nds32_match_hint_insn, nds32_parse_name):
	Updated.
	* config/tc-nds32.h (MAX_RELAX_NUM): Extend it to 6.
	(enum nds32_relax_hint_type): Merge NDS32_RELAX_HINT_LA and
	NDS32_RELAX_HINT_LS into NDS32_RELAX_HINT_LALS. Add
	NDS32_RELAX_HINT_LA_PLT, NDS32_RELAX_HINT_LA_GOT and
	NDS32_RELAX_HINT_LA_GOTOFF.
	* config/tc-nds32.h (relax_ls_table): Add floating load/store
	to gp relax pattern.
	(hint_map, nds32_find_reloc_table): Likewise.
	* configure.ac: Define NDS32_LINUX_TOOLCHAIN.
	* configure: Regenerated.
	* config.in: Regenerated.
	* config/tc-nds32.h (enum nds32_ramp): Updated.
	(enum nds32_relax_hint_type): Likewise.
	* config/tc-nds32.c: Include "errno.h" and "limits.h".
	(relax_ls_table): Add TLS relax patterns.
	(nds32_elf_append_relax_relocs): Attach BFD_RELOC_NDS32_GROUP on
	each instructions of TLS patterns.
	(nds32_elf_record_fixup_exp): Updated.
	(nds32_apply_fix): Likewise.
	(suffix_table): Add TLSDESC suffix.

binutils* testsuite/binutils-all/objcopy.exp: Set the unsupported reloc number
	from 215 to 255 for NDS32.

bfd	* elf32-nds32.c (nds32_elf_relax_loadstore):
	Remove the unused target features.
	(bfd_elf32_nds32_set_target_option): Remove the unused parameters.
	(nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
	nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
	nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
	nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
	calculate_plt_offset, calculate_got_memory_address,
	nds32_elf_check_dup_relocs): Removed.
	All callers changed.
	* elf32-nds32.h: Remove the unused macros and defines.
	(elf_nds32_link_hash_table): Remove the unused variable.
	(bfd_elf32_nds32_set_target_option): Update prototype.
	(nds32_elf_ex9_init): Removed.
	* elf32-nds32.c (nds32_convert_32_to_16): Updated.
	* elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
	to initialize array nds32_elf_howto_table in any order
	without lots of EMPTY_HOWTO.
	(nds32_reloc_map): Updated.
	* reloc.c: Add BFD_RELOC_NDS32_LSI.
	* bfd-in2.h: Regenerated.
	* bfd/libbfd.h: Regenerated.
	* elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
	(nds32_reloc_map): Likewise.
	(nds32_elf_relax_flsi): New function.
	(nds32_elf_relax_section): Support floating load/store relaxation.
	* elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
	New macro.
	(struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
	(struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
	(elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
	nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
	New functions.
	(nds32_info_to_howto_rel): Add BFD_ASSERT.
	(bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
	nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
	nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
	bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
	(nds32_elf_final_sda_base): Improve it to find the better gp value.
	(insert_nds32_elf_blank): Must consider `len' when inserting blanks.
	* elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
	(struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
	* elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
	(create_got_section): Likewise.
	(allocate_dynrelocs, nds32_elf_size_dynamic_sections,
	nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
	(nds32_elf_check_relocs): Fix the issue that the shared library may
	has TEXTREL entry in the dynamic section.
	(nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
	since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
	(nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
	dynamic entry.
	(calculate_offset): Remove the unused parameter `pic_ext_target' and
	related codes.
	All callers changed.
	(elf_backend_dtrel_excludes_plt): Disable it temporarily since it
	will cause some errors for our test cases.
	* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
	generic object.
	* reloc.c: Add TLS relocations.
	* libbfd.h: Regenerated.
	* bfd-in2.h: Regenerated.
	* elf32-nds32.h (struct section_id_list_t): New.
	(elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
	elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
	New prototypes.
	(elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
	New macro.
	(nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
	elf_nds32_link_hash_table): Updated.
	* elf32-nds32.c (enum elf_nds32_tls_type): New.
	(struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
	(elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
	fls, ones32, list_insert, list_insert_sibling, dump_chain,
	elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
	elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
	(elf_nds32_obj_tdata): Add new fields.
	(elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
	(nds32_elf_howto_table): Add TLS relocations.
	(nds32_reloc_map): Likewise.
	(nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
	nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
	nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
	nds32_elf_check_relocs, allocate_dynrelocs): Updated.
	(nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
	(dtpoff_base): Rename it to `gottpof' and then update it.

opcodes	* nds32-asm.c (operand_fields): Remove the unused fields.
	(nds32_opcodes): Remove the unused instructions.
	* nds32-dis.c (nds32_ex9_info): Removed.
	(nds32_parse_opcode): Updated.
	(print_insn_nds32): Likewise.
	* nds32-asm.c (config.h, stdlib.h, string.h): New includes.
	(LEX_SET_FIELD, LEX_GET_FIELD): Update defines.
	(nds32_asm_init, build_operand_hash_table, build_keyword_hash_table,
	build_opcode_hash_table): New functions.
	(nds32_keyword_table, nds32_keyword_count_table, nds32_field_table,
	nds32_opcode_table): New.
	(hw_ktabs): Declare it to a pointer rather than an array.
	(build_hash_table): Removed.
	* nds32-asm.h (enum): Add SYN_INPUT, SYN_OUTPUT, SYN_LOPT,
	SYN_ROPT and upadte HW_GPR and HW_INT.
	* nds32-dis.c (keywords): Remove const.
	(match_field): New function.
	(nds32_parse_opcode): Updated.
	* disassemble.c (disassemble_init_for_target):
	Add disassemble_init_nds32.
	* nds32-dis.c (eum map_type): New.
	(nds32_private_data): Likewise.
	(get_mapping_symbol_type, is_mapping_symbol, nds32_symbol_is_valid,
	nds32_add_opcode_hash_table, disassemble_init_nds32): New functions.
	(print_insn_nds32): Updated.
	* nds32-asm.c (parse_aext_reg): Add new parameter.
	(parse_re, parse_re2, parse_aext_reg): Only reduced registers
	are allowed to use.
	All callers changed.
	* nds32-asm.c (keyword_usr, keyword_sr): Updated.
	(operand_fields): Add new fields.
	(nds32_opcodes): Add new instructions.
	(keyword_aridxi_mx): New keyword.
	* nds32-asm.h (enum): Add NASM_ATTR_DSP_ISAEXT, HW_AEXT_ARIDXI_MX
	and NASM_ATTR_ZOL.
	(ALU2_1, ALU2_2, ALU2_3): New macros.
	* nds32-dis.c (nds32_filter_unknown_insn): Updated.
2018-09-20 13:32:58 +01:00
Alan Modra c12d9fa2af Support objcopy --remove-section=.relaFOO
* objcopy.c (handle_remove_section_option): Don't require a dot
	after .rela and .rel to handle a possible relocation section.
	* testsuite/binutils-all/remove-relocs-07.s,
	* testsuite/binutils-all/remove-relocs-07.d,
	* testsuite/binutils-all/remove-relocs-08.d: New tests.
	* testsuite/binutils-all/remove-relocs-01.d,
	* testsuite/binutils-all/remove-relocs-04.d,
	* testsuite/binutils-all/remove-relocs-05.d,
	* testsuite/binutils-all/remove-relocs-06.d: Exclude mips64-openbsd.
2018-09-17 23:31:18 +09:30
Alan Modra 0b1352e04c A few hppa testcase tidies
binutils/
	* testsuite/lib/binutils-common.exp (is_som_format): New proc.
	(run_dump_test): Correct target test for alternate .comm syntax.
	(get_standard_section_names): Handle som format.
	* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
	Correct target test for alternate .comm syntax.
gas/
	* testsuite/gas/all/gas.exp (redef3): Don't xfail for hppa.
	(octa): Run for hppa.
	* testsuite/gas/elf/elf.exp (common1, common2): Likewise.
	* testsuite/gas/elf/symver.d: Delete notarget.
ld/
	* testsuite/ld-elf/comm-data5.d: Remove notarget for hppa.
	* testsuite/ld-scripts/defined6.d: Likewise.
2018-09-17 23:17:14 +09:30
Alan Modra 8c9604b6a2 Adjust some strip testcases to silence h8300 warnings
* testsuite/binutils-all/strip-13mips64.s: Add section flags
	for reloc section.
	* testsuite/binutils-all/strip-13rel.s: Likewise.
	* testsuite/binutils-all/strip-13rela.s: Likewise.
	* testsuite/binutils-all/strip-14mips64.s: Likewise.
	* testsuite/binutils-all/strip-14rel.s: Likewise.
	* testsuite/binutils-all/strip-14rela.s: Likewise.
	* testsuite/binutils-all/strip-15mips64.s: Likewise.
	* testsuite/binutils-all/strip-15rel.s: Likewise.
	* testsuite/binutils-all/strip-15rela.s: Likewise.
2018-09-17 23:16:48 +09:30
Nick Clifton a0a8a9340d Ensure that binutils test names are unique.
binutils* testsuite/binutils-all/compress.exp: Rename second "objcopy
	zlib-gnu compress debug sections 3" test to "objcopy zlib-gabi
	compress debug sections 3" and use gabi object files instead
	of gnu object files.
	* testsuite/binutils-all/objcopy.exp: Add suffix to the names
	of the "ELF group" tests.
	* testsuite/binutils-all/readelf.exp (proc readelf_find_size):
	Add an iteration parameter and include it in the name of the
	test.  Update callers to include an iteration count.

gas	* testuite/gas/elf/group0a.d: Add extra details to the test
	name.
	* testuite/gas/elf/group0b.d: Likewise.
	* testuite/gas/elf/group1a.d: Likewise.
	* testuite/gas/elf/group1b.d: Likewise.
	* testuite/gas/elf/group0b.d: Likewise.
	* testuite/gas/elf/section9.d: Likewise.
	* testuite/gas/i386/ilp32/lns/lns-common-1.d: Likewise.
	* testuite/gas/i386/ilp32/lns/lns-duplicate-1.d: Likewise.

ld	* testuite/ld/ld-elf/audit.exp: Differentiate the names of the
	two "Run with shared with --audit" tests.
	* testuite/ld/ld-elf/compress.exp: Differentiate the zlib
	compressed debug output test names.
	* testuite/ld/ld-i386/tlspie1.d: Add extra details to the test
	name.
	* testuite/ld/ld-i386/tlspie2.d: Likewise.
	* testuite/ld/ld-size/size.exp: Add missing escapes to the end
	of lines in the size-3e test.
	* testuite/ld/ld-unique/unique.exp: Differentiate the names of
	the two "Checking unique PIC object" tests.
	* testuite/ld/ld-x86-64/tlspie1.d: Add extra details to the test
	name.
2018-09-17 10:10:47 +01:00
Alan Modra 8ffb70eb57 Consolidate run_dump_test
This merges the three versions of run_dump_test.  Improved warning
handling versus the old gas version shows up a number of tests that
need their disassembly updating:
arm-linuxeabi  +FAIL: ARM v1 instructions
arm-linuxeabi  +FAIL: Accepted v8-a with ARMv8.1 AdvSIMD.
arm-linuxeabi  +FAIL: bl local instructions for v4t.
arm-linuxeabi  +FAIL: UDF
and some that now fail due to detecting assembly warnings:
h8300-elf  +FAIL: binutils-all/strip-13
h8300-elf  +FAIL: binutils-all/strip-14
h8300-elf  +FAIL: binutils-all/strip-15

I've generally kept the union of all run_dump_test features, except
that the ld target aliases "cfi" and "shared" have disappeared, as has
the binutils substitution of $srcdir as $scrdir/$subdir.

binutils/
	* testsuite/binutils-all/add-symbol.d: Add "section_subst: no".
	* testsuite/binutils-all/elfedit.exp: Don't set tempfile or copyfile.
	* testsuite/binutils-all/symbols-1.d,
	* testsuite/binutils-all/symbols-2.d,
	* testsuite/binutils-all/symbols-3.d,
	* testsuite/binutils-all/symbols-4.d: Quote '*' and '!'.
	* testsuite/binutils-all/add-empty-section.d,
	* testsuite/binutils-all/add-section.d,
	* testsuite/binutils-all/elfedit.exp,
	* testsuite/binutils-all/note-1.d,
	* testsuite/binutils-all/pr23633.d: Add $subdir after $srcdir.
	* testsuite/config/default.exp (AS, ASFLAGS): Define.
	* testsuite/config/hppa.sed: Handle all common symbols.
	* testsuite/lib/binutils-common.exp (run_dump_test): New proc,
	merged from three other versions.
	(slurp_options, file_contents, set_file_contents): Likewise.
	(big_or_little_endian, get_standard_section_names): Likewise.
	* testsuite/lib/utils-lib.exp (run_dump_test): Delete.
	(slurp_options, proc file_contents): Delete.
	(get_standard_section_names): Delete.
gas/
	* testsuite/config/default.exp: Make tmpdir.
	* testsuite/lib/gas-defs.exp (run_dump_test): Delete.
	(get_standard_section_names, slurp_options): Delete.
ld/
	* testsuite/ld-d10v/reloc-007.d,
	* testsuite/ld-d10v/reloc-008.d,
	* testsuite/ld-d10v/reloc-015.d,
	* testsuite/ld-d10v/reloc-016.d: Remove "error:".
	* testsuite/ld-elf/eh-frame-hdr.d,
	* testsuite/ld-elf/eh5.d,
	* testsuite/ld-gc/personality.d: Replace "cfi" and "shared" in
	target list with appropriate proc.
	* testsuite/ld-elf/frame.exp: Use check_shared_lib_support rather
	than "istarget shared".
	* testsuite/lib/ld-lib.exp (proc big_or_little_endian): Delete.
	(run_dump_test, slurp_options, file_contents): Delete.
	(set_file_contents, istarget): Delete.
2018-09-15 16:56:55 +09:30
Alan Modra e8d88459e6 binutils run_dump_test rename not-target and not-skip
Use notarget and noskip, like the ld testsuite.

	* testsuite/binutils-all/copy-2.d,
	* testsuite/binutils-all/copy-3.d,
	* testsuite/binutils-all/copy-4.d,
	* testsuite/binutils-all/elfedit-1.d,
	* testsuite/binutils-all/note-1.d,
	* testsuite/binutils-all/note-2-64.d,
	* testsuite/binutils-all/strip-11.d,
	* testsuite/binutils-all/strip-13.d,
	* testsuite/binutils-all/strip-14.d,
	* testsuite/binutils-all/testranges.d,
	* testsuite/binutils-all/x86-64/pr23494a-x32.d,
	* testsuite/binutils-all/x86-64/pr23494a.d,
	* testsuite/binutils-all/x86-64/pr23494b-x32.d,
	* testsuite/binutils-all/x86-64/pr23494b.d,
	* testsuite/binutils-all/x86-64/pr23494c-x32.d,
	* testsuite/binutils-all/x86-64/pr23494c.d,
	* testsuite/binutils-all/x86-64/pr23494d-x32.d,
	* testsuite/binutils-all/x86-64/pr23494d.d,
	* testsuite/binutils-all/x86-64/pr23494e-x32.d,
	* testsuite/binutils-all/x86-64/pr23494e.d,
	* testsuite/lib/utils-lib.exp (run_dump_test): Replace not-target
	and not-skip with notarget and noskip.
2018-09-15 16:24:18 +09:30
Alan Modra 04ade4bc66 Remove run_dump_test support for objcopy as a dump program
We have three copies of run_dump_test in the testsuite.  This is a first
step towards consolidating them.

A few tests use objcopy to convert to verilog or srec output, then
check that output is as expected.  Those tests can just as easily use
objdump, keeping the set of dump programs (addr2line, nm, objdump,
readelf, size) separate from utilities under test.  That in turn makes
auto-detecting the dump program possible in more places.

binutils/
	* testsuite/binutils-all/group-7a.d,
	* testsuite/binutils-all/group-7b.d,
	* testsuite/binutils-all/group-7c.d,
	* testsuite/binutils-all/symbols-1.d,
	* testsuite/binutils-all/symbols-2.d,
	* testsuite/binutils-all/symbols-3.d,
	* testsuite/binutils-all/symbols-4.d: Remove DUMPPROG.
gas/
	* testsuite/gas/mri/char.d: Don't objcopy to srec, objdump instead.
	* testsuite/gas/mri/float.d: Likewise.
	* testsuite/lib/gas-defs.exp (run_dump_test): Remove support
	for objcopy as a dump tool.
ld/
	* testsuite/ld-elf/interleave-0.d,
	* testsuite/ld-elf/interleave-4.d: Don't objcopy to srec,
	objdump instead.
	* testsuite/ld-gc/all-debug-sections.d,
	* testsuite/ld-scripts/provide-4.d,
	* testsuite/ld-scripts/provide-5.d,
	* testsuite/ld-scripts/provide-6.d,
	* testsuite/ld-scripts/provide-7.d,
	* testsuite/ld-scripts/provide-8.d,
	* testsuite/ld-scripts/segment-start.d: Remove PROG, specify
	nm instead.
	* testsuite/lib/ld-lib.exp (run_dump_test): Remove support
	for objcopy as a dump tool.
2018-09-15 16:24:18 +09:30
Alan Modra 1fcd7e871c PR23633 testcase fix
PR binutils/23633
	* testsuite/binutils-all/pr23633.d: Don't fail when assembler
	generates sections other than .text.
2018-09-14 21:21:40 +09:30
H.J. Lu 319dbdfbb7 Add a testcase for PR binutils/23633
PR binutils/23633
	* testsuite/binutils-all/objcopy.exp: Run pr23633.
	* testsuite/binutils-all/pr23633.d: New file.
	* testsuite/binutils-all/pr23633.list: Likewise.
	* testsuite/binutils-all/pr23633.s: Likewise.
2018-09-13 09:09:15 -07:00
Alan Modra f9853190c8 PR23611, objcopy is not removing executable relocatable sections
BFD handles ELF relocation sections in an executable differently to
relocation sections in a relocatable object.  For a relocatable
object, BFD carries the relocations as data associated with the
section to which they apply; The relocation section doesn't appear as
a separate section.  For an executable, dynamic relocation sections do
appear as separate sections.  This means that objcopy needs to use
different strategies when dealing with relocations.

When --remove-relocations was added to objcopy with commit
d3e5f6c8f1, objcopy lost the ability to remove dynamic relocation
sections such as .rela.plt from executables using the option
"--remove-section=.rela.plt".  This patch reinstates that
functionality.

I thought it best to keep --remove-relocations as is, rather than
extending to handle dynamic relocations as per the patch in the PR,
because executables linked with --emit-relocs may have both dynamic
and non-dynamic relocations.  In that case --remove-relocataions=* is
useful to remove all the non-dynamic relocations.

	PR binutils/23611
	* objcopy.c (handle_remove_section_option): Consider .rela and
	.rel sections for stripping directly as well as attached to the
	associated section they relocate.
	* doc/binutils.texi (remove-relocations): Specify that this
	option removes non-dynamic relocation sections.
	* testsuite/binutils-all/objcopy.exp
	(objcopy_remove_relocations_from_executable): New test.
2018-09-10 13:46:37 +09:30
H.J. Lu 0f60cce3e1 binutils: Adjusted tests for .note.gnu.property section
Since x86 assembler may generate .note.gnu.property section, adjust
binutils tests to handle it.

	* testsuite/binutils-all/readelf.s-64: Adjusted for
	.note.gnu.property section.
	* testsuite/binutils-all/strip-3.d: Also strip
	.note.gnu.property section.
2018-08-31 04:38:25 -07:00
H.J. Lu 6c0d3bdec7 x86: Add explicit -mx86-used-note=[yes|no] to tests
Pass explicit -mx86-used-note=[yes|no] to x86 assembler and update
expected outputs from "readelf -n" if needed.

binutils/

	* testsuite/binutils-all/i386/compressed-1b.d: Pass
	-mx86-used-note=no to assembler.
	* testsuite/binutils-all/i386/compressed-1c.d: Likewise.
	* testsuite/binutils-all/x86-64/compressed-1b.d: Likewise.
	* testsuite/binutils-all/x86-64/compressed-1c.d: Likewise.
	* testsuite/binutils-all/i386/empty.d: Pass -mx86-used-note=yes
	to assembler and update expected output from "readelf -n".
	* testsuite/binutils-all/i386/ibt.d: Likewise.
	* testsuite/binutils-all/i386/pr21231a.d: Likewise.
	* testsuite/binutils-all/i386/pr21231b.d: Likewise.
	* testsuite/binutils-all/i386/shstk.d: Likewise.
	* testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/empty.d: Likewise.
	* testsuite/binutils-all/x86-64/ibt-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/ibt.d: Likewise.
	* testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
	* testsuite/binutils-all/x86-64/shstk-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/shstk.d: Likewise.

gas/

	* testsuite/gas/i386/bss.d: Pass -mx86-used-note=no to assembler.
	* testsuite/gas/i386/ilp32/quad.d: Likewise.
	* testsuite/gas/i386/ilp32/reloc64.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-1.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-3.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-size-5.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-unwind.d: Likewise.
	* testsuite/gas/i386/property-1.d: Likewise.
	* testsuite/gas/i386/relax.d: Likewise.
	* testsuite/gas/i386/reloc64.d: Likewise.
	* testsuite/gas/i386/size-1.d: Likewise.
	* testsuite/gas/i386/size-3.d: Likewise.
	* testsuite/gas/i386/x86-64-property-1.d: Likewise.
	* testsuite/gas/i386/x86-64-size-1.d: Likewise.
	* testsuite/gas/i386/x86-64-size-3.d: Likewise.
	* testsuite/gas/i386/x86-64-size-5.d: Likewise.
	* testsuite/gas/i386/x86-64-unwind.d: Likewise.
	* testsuite/gas/i386/divide.d: Append "#pass".

ld/

	* testsuite/ld-i386/i386.exp: (ASFLAGS): Save, append
	-mx86-used-note=no and restore.  Pass -mx86-used-note=yes and
	-mx86-used-note=no to assembler.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/no-plt.exp: Pass -mx86-used-note=yes to
	assembler.
	* testsuite/ld-i386/tls.exp: Likewise.
	* testsuite/ld-x86-64/no-plt.exp: Likewise.
	* testsuite/ld-x86-64/tls.exp: Likewise.
	* testsuite/ld-i386/pr23486a.d: Pass -mx86-used-note=no to
	assembler.
	* testsuite/ld-i386/pr23486b.d: Likewise.
	* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
	* testsuite/ld-x86-64/pr23486a-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486a.d: Likewise.
	* testsuite/ld-x86-64/pr23486b-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486b.d: Likewise.
	* testsuite/ld-i386/property-x86-3.d: Pass -mx86-used-note=yes
	to assembler and update expected output from "readelf -n".
	* testsuite/ld-i386/property-x86-4a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt1a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt1b.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt2.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt4.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt5.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk1a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk1b.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk2.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk4.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-3.d: Likewise.
	* testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-4a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk2.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk4.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk5.d: Likewise.
	* testsuite/ld-i386/property-1a.r: New file.
	* testsuite/ld-i386/property-2a.r: Likewise.
	* testsuite/ld-i386/property-3a.r: Likewise.
	* testsuite/ld-i386/property-4a.r: Likewise.
	* testsuite/ld-i386/property-5a.r: Likewise.
	* testsuite/ld-i386/property-7a.r: Likewise.
	* testsuite/ld-x86-64/property-1a.r: Likewise.
	* testsuite/ld-x86-64/property-2a.r: Likewise.
	* testsuite/ld-x86-64/property-3a.r: Likewise.
	* testsuite/ld-x86-64/property-4a.r: Likewise.
	* testsuite/ld-x86-64/property-5a.r: Likewise.
	* testsuite/ld-x86-64/property-7a.r: Likewise.
	* testsuite/ld-x86-64/mpx.exp: Pass -mx86-used-note=no to
	assembler.
2018-08-31 04:35:57 -07:00
H.J. Lu 90c745dc54 x86: Don't mask out the GNU_PROPERTY_X86_UINT32_VALID bit
Since only the GNU_PROPERTY_X86_UINT32_VALID bit may be set in data-only
relocatable objects which don't contain any instructions, linker
shouldn't mask out the GNU_PROPERTY_X86_UINT32_VALID bit when merging
GNU_PROPERTY_X86_XXX bits.  Otherwise, linker output doesn't contain
GNU_PROPERTY_X86_XXX property with any data-only relocatable inputs.
This patch keeps the GNU_PROPERTY_X86_UINT32_VALID bit and updates
readelf to print "<None>" if GNU_PROPERTY_X86_XXX property only has
the GNU_PROPERTY_X86_UINT32_VALID bit.

bfd/

	* elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
	out the GNU_PROPERTY_X86_UINT32_VALID bit.

binutils/

	* readelf.c (decode_x86_isa): Print <None> if bitmask only
	contains the GNU_PROPERTY_X86_UINT32_VALID bit.
	(decode_x86_feature_1): Likewise.
	(decode_x86_feature_2): Likewise.
	(print_gnu_property_note): Don't mask out the
	GNU_PROPERTY_X86_UINT32_VALID bit.
	* testsuite/binutils-all/i386/pr21231b.d: Updated.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.

gas/

	* testsuite/gas/i386/i386.exp: Run property-1 and
	x86-64-property-1.
	* testsuite/gas/i386/property-1.d: New file.
	* testsuite/gas/i386/property-1.s: Likewise.
	* testsuite/gas/i386/x86-64-property-1.d: Likewise.

ld/

	* testsuite/ld-i386/i386.exp: Run property-x86-5.
	* testsuite/ld-i386/property-x86-5.d: New file.
	* testsuite/ld-x86-64/property-x86-5-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-5.d: Likewise.
	* testsuite/ld-x86-64/property-x86-5a.s: Likewise.
	* testsuite/ld-x86-64/property-x86-5b.s: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run property-x86-5 and
	property-x86-5-x32.
2018-08-27 15:42:14 -07:00
H.J. Lu a9eafb08b3 x86: Update GNU_PROPERTY_X86_XXX macros
This patch updates GNU_PROPERTY_X86_XXX macros:

1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in all relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_AND_LO      0xc0000002
 #define GNU_PROPERTY_X86_UINT32_AND_HI      0xc0007fff

2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_OR_LO    0xc0008000
 #define GNU_PROPERTY_X86_UINT32_OR_HI    0xc000ffff

3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs and the property is
present in all relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_OR_AND_LO   0xc0010000
 #define GNU_PROPERTY_X86_UINT32_OR_AND_HI   0xc0017fff

4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED
and GNU_PROPERTY_X86_FEATURE_2_XXX bits.

GNU_PROPERTY_X86_FEATURE_1_AND is unchanged.  GNU_PROPERTY_X86_ISA_1_USED
and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted
processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful.
A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined.  The previous
GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to
GNU_PROPERTY_X86_COMPAT_ISA_1_XXX.

bfd/

	* elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
	X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
	X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
	X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
	instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
	(_bfd_x86_elf_merge_gnu_properties): Likewise.
	(_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
	instead of X86_ISA_1_NEEDED.
	(_bfd_x86_elf_link_fixup_gnu_properties): Handle
	X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
	X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
	X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
	X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.

binutils/

	* readelf.c (decode_x86_compat_isa): New function.
	(decode_x86_feature_2): Likewise.
	(decode_x86_isa): Updated for new X86_ISA_1_XXX bits.
	(decode_x86_feature): Renamed to ...
	(decode_x86_feature_1): This.  Remove the type argument.
	(print_gnu_property_note): Handle X86_COMPAT_ISA_1_USED,
	X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO, X86_UINT32_AND_HI,
	X86_UINT32_OR_LO, X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and
	X86_UINT32_OR_AND_HI instead of X86_ISA_1_USED, X86_ISA_1_NEEDED
	and X86_FEATURE_1_AND.
	* testsuite/binutils-all/i386/pr21231b.s: Updated to the current
	GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
	values.
	* testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.s: Likewise.
	* testsuite/binutils-all/i386/pr21231b.d: Updated.
	* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.

include/

	* elf/common.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
	(GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
	(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
	(GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
	(GNU_PROPERTY_X86_ISA_1_XXX): Renamed to ...
	(GNU_PROPERTY_X86_COMPAT_ISA_1_XXX): This.
	(GNU_PROPERTY_X86_UINT32_AND_LO): New.
	(GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
	(GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
	(GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
	(GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
	(GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
	(GNU_PROPERTY_X86_ISA_1_CMOV): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSE): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSE2): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSE3): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSSE3): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSE4_1): Likewise.
	(GNU_PROPERTY_X86_ISA_1_SSE4_2): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX2): Likewise.
	(GNU_PROPERTY_X86_ISA_1_FMA): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512F): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512CD): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512ER): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512PF): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512VL): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512DQ): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512BW): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_BITALG): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_IFMA): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2): Likewise.
	(GNU_PROPERTY_X86_ISA_1_AVX512_VNNI): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_X86): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_X87): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_MMX): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_XMM): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_YMM): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_ZMM): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_FXSR): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_XSAVE): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT): Likewise.
	(GNU_PROPERTY_X86_FEATURE_2_XSAVEC): Likewise.
	(GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
	(GNU_PROPERTY_X86_UINT32_AND_LO + 0).
	(GNU_PROPERTY_X86_ISA_1_NEEDED): Defined to
	(GNU_PROPERTY_X86_UINT32_OR_LO + 0).
	(GNU_PROPERTY_X86_FEATURE_2_NEEDED): New.  Defined to
	(GNU_PROPERTY_X86_UINT32_OR_LO + 1).
	(GNU_PROPERTY_X86_ISA_1_USED): Defined to
	(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0).
	(GNU_PROPERTY_X86_FEATURE_2_USED): New.  Defined to
	(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).

ld/

	* testsuite/ld-i386/i386.exp: Run pr23372c, pr23372d, pr23486c
	and pr23486d.
	* testsuite/ld-i386/pr23372a.s: Update comments.
	* testsuite/ld-i386/pr23372b.s: Likewise.
	* testsuite/ld-i386/pr23372c.s: Likewise.
	* testsuite/ld-x86-64/pr23372a.s: Likewise.
	* testsuite/ld-x86-64/pr23372b.s: Likewise.
	* testsuite/ld-x86-64/pr23372c.s: Likewise.
	* testsuite/ld-x86-64/pr23486a.s: Likewise.
	* testsuite/ld-x86-64/pr23486b.s: Likewise.
	* testsuite/ld-i386/pr23372c.d: New file.
	* testsuite/ld-i386/pr23372d.d: Likewise.
	* testsuite/ld-i386/pr23486c.d: Likewise.
	* testsuite/ld-i386/pr23486d.d: Likewise.
	* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23372c.d: Likewise.
	* testsuite/ld-x86-64/pr23372d-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23372d.d: Likewise.
	* testsuite/ld-x86-64/pr23372d.s: Likewise.
	* testsuite/ld-x86-64/pr23372e.s: Likewise.
	* testsuite/ld-x86-64/pr23372f.s: Likewise.
	* testsuite/ld-x86-64/pr23486c-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486c.d: Likewise.
	* testsuite/ld-x86-64/pr23486c.s: Likewise.
	* testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
	* testsuite/ld-x86-64/pr23486d.d: Likewise.
	* testsuite/ld-x86-64/pr23486d.s: Likewise.
	* testsuite/ld-i386/property-3.r: Updated.
	* testsuite/ld-i386/property-4.r: Likewise.
	* testsuite/ld-i386/property-5.r: Likewise.
	* testsuite/ld-i386/property-x86-3.d: Likewise.
	* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-x86-64/property-3.r: Likewise.
	* testsuite/ld-x86-64/property-4.r: Likewise.
	* testsuite/ld-x86-64/property-5.r: Likewise.
	* testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-3.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
	* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
	* testsuite/ld-i386/property-x86-1.S: Updated to the current
	GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
	values.
	* testsuite/ld-i386/property-x86-2.S: Likewise.
	* testsuite/ld-i386/property-x86-3.s: Likewise.
	* testsuite/ld-x86-64/property-x86-1.S: Likewise.
	* testsuite/ld-x86-64/property-x86-2.S: Likewise.
	* testsuite/ld-x86-64/property-x86-3.s: Likewise.
	* ld/testsuite/ld-x86-64/x86-64.exp: Run pr23372c, pr23372c-x32,
	pr23372d, pr23372d-x32, pr23486c, pr23486c-x32, pr23486d and
	pr23486d-x32.
2018-08-24 04:42:15 -07:00
H.J. Lu 7dd36a6f1c Prune BFD warnings for unknown GNU properties
When glibc is enabled with the new GNU_PROPERTY_X86_XXX bits:

https://groups.google.com/forum/#!topic/x86-64-abi/-D05GQ3kWrA

BFD will issue an unknown GNU property warning like

warning: tmpdir/ld1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001

and ignore such GNU properties.  This patch adds prune_warnings_extra to
prune such warnings on release branches and updates prune_warnings to
call prune_warnings_extra.

binutils/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.
	* testsuite/binutils-all/objcopy.exp (strip_test): Call
	prune_warnings to prune BFD output.
	(strip_test_with_saving_a_symbol): Likewise.
	(objcopy_test_without_global_symbol): Likewise.
	* testsuite/lib/binutils-common.exp (prune_warnings_extra):
	New proc.
	(prune_warnings): Likewise.

gas/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.

ld/

	PR ld/23536
	* Makefile.am (development.exp): New target.
	(EXTRA_DEJAGNU_SITE_CONFIG): New.
	(DISTCLEANFILES): Add development.exp.
	* Makefile.in: Regenerated.
	* testsuite/ld-bootstrap/bootstrap.exp: Call prune_warnings to
	prune BFD output.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/lib/ld-lib.exp (prune_warnings): Removed.
	* testsuite/ld-elf/shared.exp: Allow "\n" in linker warnings.
2018-08-23 06:12:50 -07:00
Alan Modra 506b86a4f5 binutils testsuite strip-13 test
The strip-13 test runs into difficulty using dc.a on some targets.
dc.a writes a power of 2 number of bytes large enough to contain a
target address.  On some targets, eg. avr-elf, this can be 2 bytes but
the ELF format used require words of 4 bytes to make up a relocation
entry.  There was a hack in the test, duplicating the reloc type into
what is normally the addend to make the test work when little-endian,
but that hack fails for similar big-endian targets.

This patch fixes that problem by arranging to emit 32-bit and 64-bit
ELF relocs using .4byte and .8byte directives, chosen as appropriate
for the ELF size.  I've also bumped the reloc number tested to a
higher unused value, and made the number more easily parameterised by
target should that be necessary in the future.  Whether REL or RELA
relocs are used is now chosen by a new is_rela readelf test of an
object file, rather than by lists of targets.

	* testsuite/lib/binutils-common.exp (is_elf64): Use directory of
	input file for readelf.out.
	(is_rela): New proc.
	* testsuite/binutils-all/objcopy.exp (elf64): Set new variable
	from first result of is_elf64 test.
	(reloc_format): Set using is_rela.
	(strip-13): Pass RELOC and ELF64 to assembler.
	(strip-14, strip-15): Use elf64 rather than calling is_elf64 again.
	* testsuite/binutils-all/strip-13.d: Run for more targets.
	* testsuite/binutils-all/strip-13mips64.s: Use RELOC and set
	addend to zero.
	* testsuite/binutils-all/strip-13rel.s: Use RELOC and ELF64.
	Don't add _NONE reloc.
	* testsuite/binutils-all/strip-13rela.s: Likewise.
2018-08-18 13:46:32 +09:30
H.J. Lu 9c973a29df Always use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE
For GNU_PROPERTY_STACK_SIZE, pr_datasz is the same as align_size, which
is 8 bytes for 64-bit ELF binaries and 4 bytes for 32-bit ELF binaries,
Use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE to convert
.note.gnu.property section.

bfd/

	PR binutils/23494
	* elf-properties.c (elf_get_gnu_property_section_size): Always
	use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
	(elf_write_gnu_properties): Likewise.

binutils/

	PR binutils/23494
	* testsuite/binutils-all/x86-64/pr23494c.s: New file.
	* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
2018-08-10 08:14:24 -07:00
H.J. Lu 11459a79d9 Skip PR binutils/23494 tests for nacl targets
PR binutils/23494 tests pass "-O elf64-x86-64" and "-O elf32-x86-64"
to objcopy which may not supported for nacl targets.  This patch skips
these tests for nacl targets.

	* testsuite/binutils-all/x86-64/pr23494a-x32.d: Skip nacl
	targets.
	* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
2018-08-10 07:53:50 -07:00
H.J. Lu 6404ab9937 Convert .note.gnu.property section between ELF32 and ELF64
.note.gnu.property section has different alignments and section
sizes for 32-bit and 64-bit ELF binaries.  This patch updated
bfd_convert_section_size and bfd_convert_section_contents to
properly convert .note.gnu.property section between 32-bit and
64-bit ELF binaries.

bfd/

	PR binutils/23494
	* bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
	calling _bfd_elf_convert_gnu_property_size to convert
	.note.gnu.property section size.
	(bfd_convert_section_contents): Check BFD_DECOMPRESS after
	calling _bfd_elf_convert_gnu_properties to convert
	.note.gnu.property section.
	* elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
	(_bfd_elf_convert_gnu_properties): Likewise.
	* elf-properties.c (elf_get_gnu_property_section_size): New
	function.
	(elf_write_gnu_properties): Likewise.
	(_bfd_elf_convert_gnu_property_size): Likewise.
	(_bfd_elf_convert_gnu_properties): Likewise.
	(_bfd_elf_link_setup_gnu_properties): Use
	elf_get_gnu_property_section_size and elf_write_gnu_properties.

binutils/

	PR binutils/23494
	* testsuite/binutils-all/x86-64/pr23494a-x32.d: New file.
	* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
	* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
2018-08-08 21:00:18 -07:00
Alan Modra 7b8d9e8cec PR23431, Messages composed from pieces can't be properly translated
PR 23431
	* dwarf.c (display_formatted_table): Replace "what" parameter
	with "is_dir".  Expand messages.  Fix capitalisation.
	* testsuite/binutils-all/dw5.W: Update expected output.
2018-07-24 19:59:11 +09:30
Alan Modra be570f0684 xgate testsuite fixes
binutils/
	* testsuite/lib/binutils-common.exp (supports_gnu_unique): Return
	zero for xgate.
ld/
	* testsuite/lib/ld-lib.exp (check_gc_sections_available): Return 0
	for xgate.
	* testsuite/ld-elf/elf.exp: Add xgate to pr21703 xfails.
	* testsuite/ld-elf/shared.exp: Add xgate to pr21703 xfails.
	* testsuite/ld-discard/extern.d: xfail xgate.
	* testsuite/ld-discard/start.d: Likewise.
	* testsuite/ld-discard/static.d: Likewise.
	* testsuite/ld-elf/attributes.d: Likewise.
	* testsuite/ld-elf/compressed1d.d: Likewise.
	* testsuite/ld-elf/group1.d: Likewise.
	* testsuite/ld-elf/group3b.d: Likewise.
	* testsuite/ld-elf/group8a.d: Likewise.
	* testsuite/ld-elf/group8b.d: Likewise.
	* testsuite/ld-elf/group9a.d: Likewise.
	* testsuite/ld-elf/group9b.d: Likewise.
	* testsuite/ld-elf/linkonce2.d: Likewise.
	* testsuite/ld-elf/merge.d: Likewise.
	* testsuite/ld-elf/merge2.d: Likewise.
	* testsuite/ld-elf/merge3.d: Likewise.
	* testsuite/ld-elf/orphan-10.d: Likewise.
	* testsuite/ld-elf/orphan-9.d: Likewise.
	* testsuite/ld-elf/orphan-region.d: Likewise.
	* testsuite/ld-elf/orphan.d: Likewise.
	* testsuite/ld-elf/orphan3.d: Likewise.
	* testsuite/ld-elf/pr12851.d: Likewise.
	* testsuite/ld-elf/pr12975.d: Likewise.
	* testsuite/ld-elf/pr13177.d: Likewise.
	* testsuite/ld-elf/pr13195.d: Likewise.
	* testsuite/ld-elf/pr14156b.d: Likewise.
	* testsuite/ld-elf/pr17550c.d: Likewise.
	* testsuite/ld-elf/pr17550d.d: Likewise.
	* testsuite/ld-elf/pr17615.d: Likewise.
	* testsuite/ld-elf/pr20528a.d: Likewise.
	* testsuite/ld-elf/pr20528b.d: Likewise.
	* testsuite/ld-elf/pr21562a.d: Likewise.
	* testsuite/ld-elf/pr21562b.d: Likewise.
	* testsuite/ld-elf/pr21562c.d: Likewise.
	* testsuite/ld-elf/pr21562d.d: Likewise.
	* testsuite/ld-elf/pr21562i.d: Likewise.
	* testsuite/ld-elf/pr21562j.d: Likewise.
	* testsuite/ld-elf/pr21562k.d: Likewise.
	* testsuite/ld-elf/pr21562l.d: Likewise.
	* testsuite/ld-elf/pr21562m.d: Likewise.
	* testsuite/ld-elf/pr21562n.d: Likewise.
	* testsuite/ld-elf/pr22677.d: Likewise.
	* testsuite/ld-elf/pr22836-1a.d: Likewise.
	* testsuite/ld-elf/pr22836-1b.d: Likewise.
	* testsuite/ld-elf/pr349.d: Likewise.
	* testsuite/ld-elf/warn1.d: Likewise.
	* testsuite/ld-elf/warn2.d: Likewise.
	* testsuite/ld-elf/warn3.d: Likewise.
2018-07-10 23:59:59 +09:30
Alan Modra 0034eed03a Run a few more binutils tests non-native
Setting CC_FOR_TARGET from the environment CC was just plain wrong,
and no doubt the reason these tests were only run natively.

	* testsuite/binutils-all/compress.exp (test_gnu_debuglink): Don't
	set CC_FOR_TARGET.  Run test non-native.
	* testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
	Likewise.
	(test_follow_debuglink): Run test non-native.
2018-05-31 12:00:11 +09:30
Ant Bikeneev 1869e86f2e Add option to ar's 't' command to display the offset of elements within the archive.
PR 23107
	* ar.c (display_offsets): New variable.
	(usage): Add description of 'O' operator.
	(decode_option): Handle 'O' operator.
	(print_descr): Pass display_offsets to print_arelt_descr.
	* arsup.c: Update call to printy_arelt_descr.
	* objdump.c: Likewise.
	* bucomm.c (print_arelt_descr): If offsets parameter is true then
	display offset of archive element within the archive.
	* bucomm.h: Update prototype for print_arelt_descr.
	* doc/binutils.texi: Update description of ar command.
	* NEWS: Mention the new feature.
	* testsuite/binutils-all/ar.exp: Add text of new feature.
2018-05-30 17:08:03 +01:00
Alan Modra bb3b531633 PR23235, make check uses system installed ld
This patch doesn't stop the build-id and debuglink tests using the
installed ld, it just prevents a compiler failure from resulting in a
test fail.  We could move the tests to the ld testsuite but it doesn't
seem all that important.

	PR 23235
	* testsuite/binutils-all/compress.exp (test_gnu_debuglink): Return
	unsupported rather than fail on compile errors.
	* testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
	Likewise.  Save and restore CFLAGS_FOR_TARGET.
2018-05-28 21:43:44 +09:30
John Darrington 7b4ae82428 Add support for the Freescale s12z processor.
bfd	* Makefile.am: Add s12z files.
	* Makefile.in: Regenerate.
	* archures.c: Add bfd_s12z_arch.
	* bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
	* bfd-in2.h: Regenerate.
	* config.bfd: Add s12z target.
	* configure.ac: Add s12z target.
	* configure: Regenerate.
	* cpu-s12z.c: New file.
	* elf32-s12z.c: New file.
	* libbfd.c (bfd_putb24): New function.
	(bfd_putl24): New function.
	* libbfd.h: Regenerate.
	* reloc.c: Add s12z relocations.
	(bfd_get_reloc_size): Handle size 5 relocs.
	* targets.c: Add s12z_elf32_vec.

opcodes	* Makefile.am: Add support for s12z architecture.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* s12z-dis.c: New file.
	* s12z.h: New file.

include	* elf/s12z.h: New header.

ld	* Makefile.am: Add support for s12z architecture.
	* configure.tgt: Likewise.
	* Makefile.in: Regenerate.
	* emulparams/m9s12zelf.sh: New file.
	* scripttempl/elfm9s12z.sc: New file.
	* testsuite/ld-discard/static.d: Expect to fail for the s12z
	target.
	* testsuite/ld-elf/endsym.d: Likewise.
	* testsuite/ld-elf/merge.d: Likewise.
	* testsuite/ld-elf/pr14926.d: Skip for the s12z target.
	* testsuite/ld-elf/sec64k.exp: Likewise.
	* testsuite/ld-s12z: New directory.
	* testsuite/ld-s12z/opr-linking.d: New file.
	* testsuite/ld-s12z/opr-linking.s: New file.
	* testsuite/ld-s12z/relative-linking.d: New file.
	* testsuite/ld-s12z/relative-linking.s: New file.
	* testsuite/ld-s12z/z12s.exp: New file.

gas	* Makefile.am: Add support for s12z target.
	* Makefile.in: Regenerate.
	* NEWS: Mention the new support.
	* config/tc-s12z.c: New file.
	* config/tc-s12z.h: New file.
	* configure.tgt: Add  s12z support.
	* doc/Makefile.am: Likewise.
	* doc/Makefile.in: Regenerate.
	* doc/all.texi: Add s12z documentation.
	* doc/as.textinfo: Likewise.
	* doc/c-s12z.texi: New file.
	* testsuite/gas/s12z: New directory.
	* testsuite/gas/s12z/abs.d: New file.
	* testsuite/gas/s12z/abs.s: New file.
	* testsuite/gas/s12z/adc-imm.d: New file.
	* testsuite/gas/s12z/adc-imm.s: New file.
	* testsuite/gas/s12z/adc-opr.d: New file.
	* testsuite/gas/s12z/adc-opr.s: New file.
	* testsuite/gas/s12z/add-imm.d: New file.
	* testsuite/gas/s12z/add-imm.s: New file.
	* testsuite/gas/s12z/add-opr.d: New file.
	* testsuite/gas/s12z/add-opr.s: New file.
	* testsuite/gas/s12z/and-imm.d: New file.
	* testsuite/gas/s12z/and-imm.s: New file.
	* testsuite/gas/s12z/and-opr.d: New file.
	* testsuite/gas/s12z/and-opr.s: New file.
	* testsuite/gas/s12z/and-or-cc.d: New file.
	* testsuite/gas/s12z/and-or-cc.s: New file.
	* testsuite/gas/s12z/bfext-special.d: New file.
	* testsuite/gas/s12z/bfext-special.s: New file.
	* testsuite/gas/s12z/bfext.d: New file.
	* testsuite/gas/s12z/bfext.s: New file.
	* testsuite/gas/s12z/bit-manip.d: New file.
	* testsuite/gas/s12z/bit-manip.s: New file.
	* testsuite/gas/s12z/bit.d: New file.
	* testsuite/gas/s12z/bit.s: New file.
	* testsuite/gas/s12z/bra-expression-defined.d: New file.
	* testsuite/gas/s12z/bra-expression-defined.s: New file.
	* testsuite/gas/s12z/bra-expression-undef.d: New file.
	* testsuite/gas/s12z/bra-expression-undef.s: New file.
	* testsuite/gas/s12z/bra.d: New file.
	* testsuite/gas/s12z/bra.s: New file.
	* testsuite/gas/s12z/brclr-symbols.d: New file.
	* testsuite/gas/s12z/brclr-symbols.s: New file.
	* testsuite/gas/s12z/brset-clr-opr-imm-rel.d: New file.
	* testsuite/gas/s12z/brset-clr-opr-imm-rel.s: New file.
	* testsuite/gas/s12z/brset-clr-opr-reg-rel.d: New file.
	* testsuite/gas/s12z/brset-clr-opr-reg-rel.s: New file.
	* testsuite/gas/s12z/brset-clr-reg-imm-rel.d: New file.
	* testsuite/gas/s12z/brset-clr-reg-imm-rel.s: New file.
	* testsuite/gas/s12z/brset-clr-reg-reg-rel.d: New file.
	* testsuite/gas/s12z/brset-clr-reg-reg-rel.s: New file.
	* testsuite/gas/s12z/clb.d: New file.
	* testsuite/gas/s12z/clb.s: New file.
	* testsuite/gas/s12z/clr-opr.d: New file.
	* testsuite/gas/s12z/clr-opr.s: New file.
	* testsuite/gas/s12z/clr.d: New file.
	* testsuite/gas/s12z/clr.s: New file.
	* testsuite/gas/s12z/cmp-imm.d: New file.
	* testsuite/gas/s12z/cmp-imm.s: New file.
	* testsuite/gas/s12z/cmp-opr-inc.d: New file.
	* testsuite/gas/s12z/cmp-opr-inc.s: New file.
	* testsuite/gas/s12z/cmp-opr-rdirect.d: New file.
	* testsuite/gas/s12z/cmp-opr-rdirect.s: New file.
	* testsuite/gas/s12z/cmp-opr-reg.d: New file.
	* testsuite/gas/s12z/cmp-opr-reg.s: New file.
	* testsuite/gas/s12z/cmp-opr-rindirect.d: New file.
	* testsuite/gas/s12z/cmp-opr-rindirect.s: New file.
	* testsuite/gas/s12z/cmp-opr-sxe4.d: New file.
	* testsuite/gas/s12z/cmp-opr-sxe4.s: New file.
	* testsuite/gas/s12z/cmp-opr-xys.d: New file.
	* testsuite/gas/s12z/cmp-opr-xys.s: New file.
	* testsuite/gas/s12z/cmp-s-imm.d: New file.
	* testsuite/gas/s12z/cmp-s-imm.s: New file.
	* testsuite/gas/s12z/cmp-s-opr.d: New file.
	* testsuite/gas/s12z/cmp-s-opr.s: New file.
	* testsuite/gas/s12z/cmp-xy.d: New file.
	* testsuite/gas/s12z/cmp-xy.s: New file.
	* testsuite/gas/s12z/com-opr.d: New file.
	* testsuite/gas/s12z/com-opr.s: New file.
	* testsuite/gas/s12z/complex-shifts.d: New file.
	* testsuite/gas/s12z/complex-shifts.s: New file.
	* testsuite/gas/s12z/db-tb-cc-opr.d: New file.
	* testsuite/gas/s12z/db-tb-cc-opr.s: New file.
	* testsuite/gas/s12z/db-tb-cc-reg.d: New file.
	* testsuite/gas/s12z/db-tb-cc-reg.s: New file.
	* testsuite/gas/s12z/dbCC.d: New file.
	* testsuite/gas/s12z/dbCC.s: New file.
	* testsuite/gas/s12z/dec-opr.d: New file.
	* testsuite/gas/s12z/dec-opr.s: New file.
	* testsuite/gas/s12z/dec.d: New file.
	* testsuite/gas/s12z/dec.s: New file.
	* testsuite/gas/s12z/div.d: New file.
	* testsuite/gas/s12z/div.s: New file.
	* testsuite/gas/s12z/eor.d: New file.
	* testsuite/gas/s12z/eor.s: New file.
	* testsuite/gas/s12z/exg.d: New file.
	* testsuite/gas/s12z/exg.s: New file.
	* testsuite/gas/s12z/ext24-ld-xy.d: New file.
	* testsuite/gas/s12z/ext24-ld-xy.s: New file.
	* testsuite/gas/s12z/inc-opr.d: New file.
	* testsuite/gas/s12z/inc-opr.s: New file.
	* testsuite/gas/s12z/inc.d: New file.
	* testsuite/gas/s12z/inc.s: New file.
	* testsuite/gas/s12z/inh.d: New file.
	* testsuite/gas/s12z/inh.s: New file.
	* testsuite/gas/s12z/jmp.d: New file.
	* testsuite/gas/s12z/jmp.s: New file.
	* testsuite/gas/s12z/jsr.d: New file.
	* testsuite/gas/s12z/jsr.s: New file.
	* testsuite/gas/s12z/ld-imm-page2.d: New file.
	* testsuite/gas/s12z/ld-imm-page2.s: New file.
	* testsuite/gas/s12z/ld-imm.d: New file.
	* testsuite/gas/s12z/ld-imm.s: New file.
	* testsuite/gas/s12z/ld-immu18.d: New file.
	* testsuite/gas/s12z/ld-immu18.s: New file.
	* testsuite/gas/s12z/ld-large-direct.d: New file.
	* testsuite/gas/s12z/ld-large-direct.s: New file.
	* testsuite/gas/s12z/ld-opr.d: New file.
	* testsuite/gas/s12z/ld-opr.s: New file.
	* testsuite/gas/s12z/ld-s-opr.d: New file.
	* testsuite/gas/s12z/ld-s-opr.s: New file.
	* testsuite/gas/s12z/ld-small-direct.d: New file.
	* testsuite/gas/s12z/ld-small-direct.s: New file.
	* testsuite/gas/s12z/lea-immu18.d: New file.
	* testsuite/gas/s12z/lea-immu18.s: New file.
	* testsuite/gas/s12z/lea.d: New file.
	* testsuite/gas/s12z/lea.s: New file.
	* testsuite/gas/s12z/mac.d: New file.
	* testsuite/gas/s12z/mac.s: New file.
	* testsuite/gas/s12z/min-max.d: New file.
	* testsuite/gas/s12z/min-max.s: New file.
	* testsuite/gas/s12z/mod.d: New file.
	* testsuite/gas/s12z/mod.s: New file.
	* testsuite/gas/s12z/mov.d: New file.
	* testsuite/gas/s12z/mov.s: New file.
	* testsuite/gas/s12z/mul-imm.d: New file.
	* testsuite/gas/s12z/mul-imm.s: New file.
	* testsuite/gas/s12z/mul-opr-opr.d: New file.
	* testsuite/gas/s12z/mul-opr-opr.s: New file.
	* testsuite/gas/s12z/mul-opr.d: New file.
	* testsuite/gas/s12z/mul-opr.s: New file.
	* testsuite/gas/s12z/mul-reg.d: New file.
	* testsuite/gas/s12z/mul-reg.s: New file.
	* testsuite/gas/s12z/mul.d: New file.
	* testsuite/gas/s12z/mul.s: New file.
	* testsuite/gas/s12z/neg-opr.d: New file.
	* testsuite/gas/s12z/neg-opr.s: New file.
	* testsuite/gas/s12z/not-so-simple-shifts.d: New file.
	* testsuite/gas/s12z/not-so-simple-shifts.s: New file.
	* testsuite/gas/s12z/opr-18u.d: New file.
	* testsuite/gas/s12z/opr-18u.s: New file.
	* testsuite/gas/s12z/opr-expr.d: New file.
	* testsuite/gas/s12z/opr-expr.s: New file.
	* testsuite/gas/s12z/opr-ext-18.d: New file.
	* testsuite/gas/s12z/opr-ext-18.s: New file.
	* testsuite/gas/s12z/opr-idx-24-reg.d: New file.
	* testsuite/gas/s12z/opr-idx-24-reg.s: New file.
	* testsuite/gas/s12z/opr-idx3-reg.d: New file.
	* testsuite/gas/s12z/opr-idx3-reg.s: New file.
	* testsuite/gas/s12z/opr-idx3-xysp-24.d: New file.
	* testsuite/gas/s12z/opr-idx3-xysp-24.s: New file.
	* testsuite/gas/s12z/opr-indirect-expr.d: New file.
	* testsuite/gas/s12z/opr-indirect-expr.s: New file.
	* testsuite/gas/s12z/opr-symbol.d: New file.
	* testsuite/gas/s12z/opr-symbol.s: New file.
	* testsuite/gas/s12z/or-imm.d: New file.
	* testsuite/gas/s12z/or-imm.s: New file.
	* testsuite/gas/s12z/or-opr.d: New file.
	* testsuite/gas/s12z/or-opr.s: New file.
	* testsuite/gas/s12z/p2-mul.d: New file.
	* testsuite/gas/s12z/p2-mul.s: New file.
	* testsuite/gas/s12z/page2-inh.d: New file.
	* testsuite/gas/s12z/page2-inh.s: New file.
	* testsuite/gas/s12z/psh-pul.d: New file.
	* testsuite/gas/s12z/psh-pul.s: New file.
	* testsuite/gas/s12z/qmul.d: New file.
	* testsuite/gas/s12z/qmul.s: New file.
	* testsuite/gas/s12z/rotate.d: New file.
	* testsuite/gas/s12z/rotate.s: New file.
	* testsuite/gas/s12z/s12z.exp: New file.
	* testsuite/gas/s12z/sat.d: New file.
	* testsuite/gas/s12z/sat.s: New file.
	* testsuite/gas/s12z/sbc-imm.d: New file.
	* testsuite/gas/s12z/sbc-imm.s: New file.
	* testsuite/gas/s12z/sbc-opr.d: New file.
	* testsuite/gas/s12z/sbc-opr.s: New file.
	* testsuite/gas/s12z/shift.d: New file.
	* testsuite/gas/s12z/shift.s: New file.
	* testsuite/gas/s12z/simple-shift.d: New file.
	* testsuite/gas/s12z/simple-shift.s: New file.
	* testsuite/gas/s12z/single-ops.d: New file.
	* testsuite/gas/s12z/single-ops.s: New file.
	* testsuite/gas/s12z/specd6.d: New file.
	* testsuite/gas/s12z/specd6.s: New file.
	* testsuite/gas/s12z/st-large-direct.d: New file.
	* testsuite/gas/s12z/st-large-direct.s: New file.
	* testsuite/gas/s12z/st-opr.d: New file.
	* testsuite/gas/s12z/st-opr.s: New file.
	* testsuite/gas/s12z/st-s-opr.d: New file.
	* testsuite/gas/s12z/st-s-opr.s: New file.
	* testsuite/gas/s12z/st-small-direct.d: New file.
	* testsuite/gas/s12z/st-small-direct.s: New file.
	* testsuite/gas/s12z/st-xy.d: New file.
	* testsuite/gas/s12z/st-xy.s: New file.
	* testsuite/gas/s12z/sub-imm.d: New file.
	* testsuite/gas/s12z/sub-imm.s: New file.
	* testsuite/gas/s12z/sub-opr.d: New file.
	* testsuite/gas/s12z/sub-opr.s: New file.
	* testsuite/gas/s12z/tfr.d: New file.
	* testsuite/gas/s12z/tfr.s: New file.
	* testsuite/gas/s12z/trap.d: New file.
	* testsuite/gas/s12z/trap.s: New file.

binutils* readelf.c: Add support for s12z architecture.
	* testsuite/lib/binutils-common.exp (is_elf_format): Excluse s12z
	targets.
2018-05-18 15:26:18 +01:00
Alan Modra 679ca9753b Recognize more targets as ELF for testing
Also use the correct rel strip-13 variant for more ARM targets.

	* testsuite/lib/binutils-common.exp (is_elf_format): Add chorus,
	cloudabi, fuchsia, kaos and nto.  Merge netbsdelf* into *elf*,
	and *uclinux* into *linux*.
	* testsuite/binutils-all/objcopy.exp: Accept armeb for rel
	strip-13 test, exclude arm-vxworks and arm-windiss.
2018-05-15 21:04:13 +09:30
Francois H. Theron fe944acf8f This patch adds support to objdump for disassembly of NFP (Netronome Flow Processor) ELF files (.nffw) as well as some basic readelf support.
bfd	* Makefile.am: Added NFP files to build.
	* archures.c: Added bfd_arch_nfp
	* config.bfd: Added NFP support.
	* configure.ac: Added NFP support.
	* cpu-nfp.c: New, for NFP support.
	* elf-bfd.h: Added elf_section_info()
	* elf64-nfp.c: New, for NFP support.
	* po/SRC-POTFILES.in: Added NFP source files.
	* targets.c: Added nfp_elf64_vec
	* bfd-in2.h: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

binutils* readelf.c: Very basic support for EM_NFP and its section types.
	* testsuite/binutils-all/nfp: New directory.
	* testsuite/binutils-all/nfp/objdump.exp: New file.  Run new
	tests.
	* testsuite/binutils-all/nfp/test2_ctx8.d: New file.
	* testsuite/binutils-all/nfp/test2_no-pc_ctx4.d: New file.
	* testsuite/binutils-all/nfp/test1.d: New file.
	* testsuite/binutils-all/nfp/nfp6000.nffw: New file.
	* testsuite/binutils-all/nfp/test2_nfp6000.nffw: New file.
	* NEWS: Mention the new support.

include	* dis-asm.h: Added print_nfp_disassembler_options prototype.
	* elf/common.h: Added EM_NFP, officially assigned. See Google Group
	Generic System V Application Binary Interface.
	* elf/nfp.h: New, for NFP support.
	* opcode/nfp.h: New, for NFP support.

opcodes	Makefile.am: Added nfp-dis.c.
	configure.ac: Added bfd_nfp_arch.
	disassemble.h: Added print_insn_nfp prototype.
	disassemble.c: Added ARCH_nfp and call to print_insn_nfp
	nfp-dis.c: New, for NFP support.
	po/POTFILES.in: Added nfp-dis.c to the list.
	Makefile.in: Regenerate.
	configure: Regenerate.
2018-04-30 17:02:59 +01:00
Maciej W. Rozycki 6d9dabbbc6 testsuite: Support filtering targets by TCL procedure in `run_dump_test'
Implement a more complex way of selecting targets to include or exclude
with `run_dump_test' cases, by extending the syntax for the `target',
`not-target', `skip' and `not-skip' options (with the binutils and GAS
test suites) and the `target', `alltargets' and `notarget' options (with
the LD test suite) to also accept a name of a TCL procedure instead of a
target triplet glob matching expression.  The result, 1 or 0, of the
procedure determines whether the test is to be run or not.  This mimics
and expands `dg-require-effective-target' from the GCC test suite.

Names of TCL procedures are supplied in square brackets `[]' as with TCL
procedure calls, observing that target triplet glob matching expressions
do not normally start and end with matching square brackets both at a
time.  Arguments for procedures are allowed if required.

Having a way to specify a complex condition for a `run_dump_test' case
to run has the advantage of keeping it local within the test case itself
where tool options related to the check might be also present, removing
the need to wrap `run_dump_test' calls into an `if' block whose only
reason is to do a feature check, and ultimately lets one have the test
reported as UNSUPPORTED automagically if required (not currently
supported by the `run_dump_test' options used for LD).

	binutils/
	* testsuite/lib/binutils-common.exp (match_target): New procedure.
	* testsuite/lib/utils-lib.exp (run_dump_test): Use it in place
	of `istarget' for matching with `target', `not-target', `skip'
	and `not-skip' options.

	gas/
	* testsuite/lib/gas-defs.exp (run_dump_test): Use `match_target'
	in place of `istarget' for matching with `target', `not-target',
	`skip' and `not-skip' options.

	ld/
	* testsuite/lib/ld-lib.exp (run_dump_test): Use `match_target'
	in place of `istarget' for matching with `target', `alltargets'
	and `notarget' options.
2018-04-27 15:25:20 +01:00
Nick Clifton 0df8ad28f0 Extend the assembler so that it can automatically generate GNU Build attribute notes if none are present in the input files.
gas	* as.c (flag_generate_build_notes): New variable.
	(show_usage): Add entry for --generate-missing-build-notes.
	(parse_args): Parse --generate-missing-build-notes.
	* as.h: Export flag_generate_build_notes.
	* symbols.c (save_symbol_name): Ensure that the name parameter is
	not NULL.
	* write.c (create_obj_attrs_section): Reformat.
	(create_note_reloc): New function - creates a relocation for a
	field in a GNU Build attribute note.
	(maybe_generate_build_notes): New function - created GNU Build
	attribute notes if none are present in the output file.
	(write_object_file): Call maybe_generate_build_notes.
	* configure.ac (--enable-generate-build-notes): New option.
	* NEWS: Announce the new feature.
	* doc/as.textinfo: Document the new option.
	* config.in: Regenerate.
	* configure: Regenerate.

binutils* readelf.c (is_32bit_abs_reloc): Support R_PARISC_DIR32 as a
	32-bit absolute reloc for the HPPA target.
	* testsuite/binutils-all/note-5.d: New test.
	* testsuite/binutils-all/note-5.s: Source file for new test.
	* testsuite/binutils-all/objcopy.exp: Run new test.
2018-04-26 15:12:42 +01:00
Christophe Lyon f1ac0afe48 [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi.
2018-04-25  Christophe Lyon  <christophe.lyon@st.com>

	binutils/
	* testsuite/binutils-all/elfedit-2.d: Accept arm*-*-uclinuxfdpiceabi.
	* testsuite/binutils-all/elfedit-3.d: Likewise.
	* testsuite/binutils-all/objcopy.exp: Likewise.
	* testsuite/binutils-all/strip-3.d: Likewise.
	* testsuite/lib/binutils-common.exp: Likewise.

	ld/
	* testsuite/ld-arm/export-class.exp: Accept arm*-*-uclinuxfdpiceabi.
	* testsuite/ld-discard/discard.exp: Likewise.
	* testsuite/ld-elf/binutils.exp: Likewise.
	* testsuite/ld-elf/commonpage1.d: Likewise.
	* testsuite/ld-elf/compress1c.d: Likewise.
	* testsuite/ld-elf/compressed1b.d: Likewise.
	* testsuite/ld-elf/compressed1c.d: Likewise.
	* testsuite/ld-elf/compressed1e.d: Likewise.
	* testsuite/ld-elf/dynamic1.d: Likewise.
	* testsuite/ld-elf/dynsym1.d: Likewise.
	* testsuite/ld-elf/ehdr_start-missing.d: Likewise.
	* testsuite/ld-elf/ehdr_start-shared.d: Likewise.
	* testsuite/ld-elf/ehdr_start-userdef.d: Likewise.
	* testsuite/ld-elf/ehdr_start-weak.d: Likewise.
	* testsuite/ld-elf/ehdr_start.d: Likewise.
	* testsuite/ld-elf/exclude3b.d: Likewise.
	* testsuite/ld-elf/export-class.exp: Likewise.
	* testsuite/ld-elf/global1.d: Likewise.
	* testsuite/ld-elf/hash.d: Likewise.
	* testsuite/ld-elf/header.d: Likewise.
	* testsuite/ld-elf/loadaddr1.d: Likewise.
	* testsuite/ld-elf/loadaddr2.d: Likewise.
	* testsuite/ld-elf/loadaddr3a.d: Likewise.
	* testsuite/ld-elf/loadaddr3b.d: Likewise.
	* testsuite/ld-elf/local1.d: Likewise.
	* testsuite/ld-elf/maxpage1.d: Likewise.
	* testsuite/ld-elf/maxpage2.d: Likewise.
	* testsuite/ld-elf/maxpage3a.d: Likewise.
	* testsuite/ld-elf/mbind1a.d: Likewise.
	* testsuite/ld-elf/mbind1b.d: Likewise.
	* testsuite/ld-elf/mbind1c.d: Likewise.
	* testsuite/ld-elf/multibss1.d: Likewise.
	* testsuite/ld-elf/noload-2.d: Likewise.
	* testsuite/ld-elf/now-1.d: Likewise.
	* testsuite/ld-elf/now-2.d: Likewise.
	* testsuite/ld-elf/now-3.d: Likewise.
	* testsuite/ld-elf/now-4.d: Likewise.
	* testsuite/ld-elf/pie.d: Likewise.
	* testsuite/ld-elf/pr12975.d: Likewise.
	* testsuite/ld-elf/pr13177.d: Likewise.
	* testsuite/ld-elf/pr13195.d: Likewise.
	* testsuite/ld-elf/pr16322.d: Likewise.
	* testsuite/ld-elf/pr16498a.d: Likewise.
	* testsuite/ld-elf/pr16498b.d: Likewise.
	* testsuite/ld-elf/pr17615.d: Likewise.
	* testsuite/ld-elf/pr19162.d: Likewise.
	* testsuite/ld-elf/pr19539.d: Likewise.
	* testsuite/ld-elf/pr19617a.d: Likewise.
	* testsuite/ld-elf/pr19617b.d: Likewise.
	* testsuite/ld-elf/pr19617c.d: Likewise.
	* testsuite/ld-elf/pr19698.d: Likewise.
	* testsuite/ld-elf/pr19789.d: Likewise.
	* testsuite/ld-elf/pr20513c.d: Likewise.
	* testsuite/ld-elf/pr20513d.d: Likewise.
	* testsuite/ld-elf/pr21384.d: Likewise.
	* testsuite/ld-elf/pr21389a.d: Likewise.
	* testsuite/ld-elf/pr21389b.d: Likewise.
	* testsuite/ld-elf/pr21389c.d: Likewise.
	* testsuite/ld-elf/pr21562a.d: Likewise.
	* testsuite/ld-elf/pr21562b.d: Likewise.
	* testsuite/ld-elf/pr21562c.d: Likewise.
	* testsuite/ld-elf/pr21562d.d: Likewise.
	* testsuite/ld-elf/pr21562e.d: Likewise.
	* testsuite/ld-elf/pr21562f.d: Likewise.
	* testsuite/ld-elf/pr21562g.d: Likewise.
	* testsuite/ld-elf/pr21562h.d: Likewise.
	* testsuite/ld-elf/pr21562i.d: Likewise.
	* testsuite/ld-elf/pr21562j.d: Likewise.
	* testsuite/ld-elf/pr21562k.d: Likewise.
	* testsuite/ld-elf/pr21562l.d: Likewise.
	* testsuite/ld-elf/pr21562m.d: Likewise.
	* testsuite/ld-elf/pr21562n.d: Likewise.
	* testsuite/ld-elf/pr21903a.d: Likewise.
	* testsuite/ld-elf/pr21903b.d: Likewise.
	* testsuite/ld-elf/pr21903d.d: Likewise.
	* testsuite/ld-elf/pr22269a.d: Likewise.
	* testsuite/ld-elf/pr22269b.d: Likewise.
	* testsuite/ld-elf/pr22393-1a.d: Likewise.
	* testsuite/ld-elf/pr22393-1b.d: Likewise.
	* testsuite/ld-elf/pr22393-1c.d: Likewise.
	* testsuite/ld-elf/pr22393-1d.d: Likewise.
	* testsuite/ld-elf/pr22393-1e.d: Likewise.
	* testsuite/ld-elf/pr22393-1f.d: Likewise.
	* testsuite/ld-elf/pr22423.d: Likewise.
	* testsuite/ld-elf/rpath-1.d: Likewise.
	* testsuite/ld-elf/rpath-2.d: Likewise.
	* testsuite/ld-elf/runpath-1.d: Likewise.
	* testsuite/ld-elf/runpath-2.d: Likewise.
	* testsuite/ld-elf/seg.d: Likewise.
	* testsuite/ld-elf/sizeofb.d: Likewise.
	* testsuite/ld-elf/startofb.d: Likewise.
	* testsuite/ld-elf/strtab.d: Likewise.
	* testsuite/ld-elf/textaddr1.d: Likewise.
	* testsuite/ld-elf/textaddr2.d: Likewise.
	* testsuite/ld-elf/textaddr3.d: Likewise.
	* testsuite/ld-elf/textaddr4.d: Likewise.
	* testsuite/ld-elf/textaddr5.d: Likewise.
	* testsuite/ld-elf/textaddr6.d: Likewise.
	* testsuite/ld-elf/textaddr7.d: Likewise.
	* testsuite/ld-elf/tls.exp: Likewise.
	* testsuite/ld-elf/tls_common.exp: Likewise.
	* testsuite/ld-elf/unknown2.d: Likewise.
	* testsuite/ld-gc/abi-note.d: Likewise.
	* testsuite/ld-gc/pr11218.d: Likewise.
	* testsuite/ld-gc/pr19167.d: Likewise.
	* testsuite/ld-gc/pr20022.d: Likewise.
	* testsuite/ld-gc/start.d: Likewise.
	* testsuite/ld-gc/stop.d: Likewise.
	* testsuite/ld-scripts/phdrs2.exp: Likewise.
	* testsuite/ld-scripts/rgn-at5.d: Likewise.
	* testsuite/ld-undefined/entry-3.d: Likewise.
	* testsuite/ld-undefined/entry-4.d: Likewise.
2018-04-25 21:13:14 +00:00
Alan Modra 2ac93be706 Remove arm-aout and arm-coff support
This also removes arm-netbsd (not arm-netbsdelf!), arm-openbsd, and
arm-riscix.  Those targets weren't on the obsolete list but they are
all aout, and it doesn't make all that much sense to remove arm-aout
without removing them too.

bfd/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* aout-arm.c: Delete.
	* armnetbsd.c: Delete.
	* riscix.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/arm/objdump.exp: Remove arm-aout and
	arm-coff support.
	* testsuite/binutils-all/objcopy.exp: Likewise.
	* testsuite/lib/binutils-common.exp: Likewise.
gas/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* config/tc-arm.c: Likewise.
	* config/tc-arm.h: Likewise.
	* configure.tgt: Likewise.
	* testsuite/gas/aarch64/codealign.d: Likewise.
	* testsuite/gas/aarch64/mapping.d: Likewise.
	* testsuite/gas/aarch64/mapping2.d: Likewise.
	* testsuite/gas/arm/adds-thumb1-reloc-local-armv7-m.d: Likewise.
	* testsuite/gas/arm/adds-thumb1-reloc-local.d: Likewise.
	* testsuite/gas/arm/addsw-bad.d: Likewise.
	* testsuite/gas/arm/align.d: Likewise.
	* testsuite/gas/arm/align64.d: Likewise.
	* testsuite/gas/arm/arch7.d: Likewise.
	* testsuite/gas/arm/arch7a-mp.d: Likewise.
	* testsuite/gas/arm/arch7em.d: Likewise.
	* testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise.
	* testsuite/gas/arm/arm-it-auto-2.d: Likewise.
	* testsuite/gas/arm/arm-it-auto-3.d: Likewise.
	* testsuite/gas/arm/arm-it-auto.d: Likewise.
	* testsuite/gas/arm/arm-it-bad-2.d: Likewise.
	* testsuite/gas/arm/arm-it.d: Likewise.
	* testsuite/gas/arm/armv7e-m+fpv5-d16.d: Likewise.
	* testsuite/gas/arm/armv7e-m+fpv5-sp-d16.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-scalar-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-scalar.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-simd-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-simd.d: Likewise.
	* testsuite/gas/arm/armv8-a+crypto.d: Likewise.
	* testsuite/gas/arm/armv8-a+fp.d: Likewise.
	* testsuite/gas/arm/armv8-a+ras.d: Likewise.
	* testsuite/gas/arm/armv8-a+rdma-warning.d: Likewise.
	* testsuite/gas/arm/armv8-a+rdma.d: Likewise.
	* testsuite/gas/arm/armv8-a+simd.d: Likewise.
	* testsuite/gas/arm/armv8-a-barrier-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-r+fp.d: Likewise.
	* testsuite/gas/arm/armv8-r+simd.d: Likewise.
	* testsuite/gas/arm/armv8-r-barrier-thumb.d: Likewise.
	* testsuite/gas/arm/armv8_1-a+simd.d: Likewise.
	* testsuite/gas/arm/armv8_2+rdma.d: Likewise.
	* testsuite/gas/arm/armv8_2-a.d: Likewise.
	* testsuite/gas/arm/armv8_3-a-fp.d: Likewise.
	* testsuite/gas/arm/armv8_3-a-simd.d: Likewise.
	* testsuite/gas/arm/armv8a-automatic-hlt.d: Likewise.
	* testsuite/gas/arm/armv8a-automatic-lda.d: Likewise.
	* testsuite/gas/arm/attr-syntax.d: Likewise.
	* testsuite/gas/arm/automatic-bw.d: Likewise.
	* testsuite/gas/arm/automatic-cbz.d: Likewise.
	* testsuite/gas/arm/automatic-clrex.d: Likewise.
	* testsuite/gas/arm/automatic-lda.d: Likewise.
	* testsuite/gas/arm/automatic-ldaex.d: Likewise.
	* testsuite/gas/arm/automatic-ldaexb.d: Likewise.
	* testsuite/gas/arm/automatic-ldrex.d: Likewise.
	* testsuite/gas/arm/automatic-ldrexd.d: Likewise.
	* testsuite/gas/arm/automatic-movw.d: Likewise.
	* testsuite/gas/arm/automatic-sdiv.d: Likewise.
	* testsuite/gas/arm/automatic-strexb.d: Likewise.
	* testsuite/gas/arm/barrier-bad-thumb.d: Likewise.
	* testsuite/gas/arm/barrier-bad.d: Likewise.
	* testsuite/gas/arm/barrier-thumb.d: Likewise.
	* testsuite/gas/arm/barrier.d: Likewise.
	* testsuite/gas/arm/bignum1.d: Likewise.
	* testsuite/gas/arm/blx-bad.d: Likewise.
	* testsuite/gas/arm/blx-bl-convert.d: Likewise.
	* testsuite/gas/arm/blx-local.s: Likewise.
	* testsuite/gas/arm/crc32-armv8-a-bad.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-a.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-r-bad.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-r.d: Likewise.
	* testsuite/gas/arm/dis-data.d: Likewise.
	* testsuite/gas/arm/dis-data2.d: Likewise.
	* testsuite/gas/arm/dis-data3.d: Likewise.
	* testsuite/gas/arm/eabi_attr_1.d: Likewise.
	* testsuite/gas/arm/fp-save.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs.d: Likewise.
	* testsuite/gas/arm/insn-error-a.d: Likewise.
	* testsuite/gas/arm/insn-error-t.d: Likewise.
	* testsuite/gas/arm/inst-po-2.d: Likewise.
	* testsuite/gas/arm/inst-po-3.d: Likewise.
	* testsuite/gas/arm/inst-po-be.d: Likewise.
	* testsuite/gas/arm/inst-po.d: Likewise.
	* testsuite/gas/arm/ldconst.d: Likewise.
	* testsuite/gas/arm/ldgesb-bad.d: Likewise.
	* testsuite/gas/arm/ldgesh-bad.d: Likewise.
	* testsuite/gas/arm/ldst-offset0.d: Likewise.
	* testsuite/gas/arm/local_function.d: Likewise.
	* testsuite/gas/arm/local_label_coff.d: Likewise.
	* testsuite/gas/arm/local_label_elf.d: Likewise.
	* testsuite/gas/arm/mapping.d: Likewise.
	* testsuite/gas/arm/mapping2.d: Likewise.
	* testsuite/gas/arm/mapping3.d: Likewise.
	* testsuite/gas/arm/mapping4.d: Likewise.
	* testsuite/gas/arm/mapshort-elf.d: Likewise.
	* testsuite/gas/arm/mask_1-armv8-a.d: Likewise.
	* testsuite/gas/arm/mask_1-armv8-r.d: Likewise.
	* testsuite/gas/arm/movs-thumb1-reloc-local-armv7-m.d: Likewise.
	* testsuite/gas/arm/movs-thumb1-reloc-local.d: Likewise.
	* testsuite/gas/arm/movw-local.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v6t2.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v7-m.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v7e-m.d: Likewise.
	* testsuite/gas/arm/msr-imm-bad.d: Likewise.
	* testsuite/gas/arm/msr-reg-bad.d: Likewise.
	* testsuite/gas/arm/msr-reg-thumb.d: Likewise.
	* testsuite/gas/arm/nomapping.d: Likewise.
	* testsuite/gas/arm/nops.d: Likewise.
	* testsuite/gas/arm/pic.d: Likewise.
	* testsuite/gas/arm/pinsn.d: Likewise.
	* testsuite/gas/arm/plt-1.d: Likewise.
	* testsuite/gas/arm/pr21458.d: Likewise.
	* testsuite/gas/arm/pr9722.d: Likewise.
	* testsuite/gas/arm/strex-t.d: Likewise.
	* testsuite/gas/arm/t2-branch-global.d: Likewise.
	* testsuite/gas/arm/target-reloc-1.d: Likewise.
	* testsuite/gas/arm/thumb-b-bad.d: Likewise.
	* testsuite/gas/arm/thumb-w-bad.d: Likewise.
	* testsuite/gas/arm/thumb-w-good.d: Likewise.
	* testsuite/gas/arm/thumb.d: Likewise.
	* testsuite/gas/arm/thumb2_it.d: Likewise.
	* testsuite/gas/arm/thumb2_it_auto.d: Likewise.
	* testsuite/gas/arm/thumb2_it_search.d: Likewise.
	* testsuite/gas/arm/thumb2_ldmstm.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_armv6.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_armv6t2.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.d: Likewise.
	* testsuite/gas/arm/thumb2_pool.d: Likewise.
	* testsuite/gas/arm/thumb2_vpool.d: Likewise.
	* testsuite/gas/arm/thumb2_vpool_be.d: Likewise.
	* testsuite/gas/arm/thumb32.d: Likewise.
	* testsuite/gas/arm/thumbver.d: Likewise.
	* testsuite/gas/arm/tls.d: Likewise.
	* testsuite/gas/arm/tls_vxworks.d: Likewise.
	* testsuite/gas/arm/undefined.d: Likewise.
	* testsuite/gas/arm/undefined_coff.d: Likewise.
	* testsuite/gas/arm/unwind.d: Likewise.
	* testsuite/gas/arm/v4bx.d: Likewise.
	* testsuite/gas/arm/vcmp-noprefix-imm.d: Likewise.
	* testsuite/gas/arm/vcvt-bad.d: Likewise.
	* testsuite/gas/arm/vfma1.d: Likewise.
	* testsuite/gas/arm/vldconst.d: Likewise.
	* testsuite/gas/arm/vldconst_be.d: Likewise.
	* testsuite/gas/arm/vldm-arm.d: Likewise.
	* testsuite/gas/arm/vldr.d: Likewise.
	* testsuite/gas/arm/weakdef-1.d: Likewise.
	* testsuite/gas/arm/weakdef-2.d: Likewise.
	* config/te-riscix.h: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* configure.tgt: Likewise.
	* testsuite/ld-arm/attr-merge-div-00.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-01-m3.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-01.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-02.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-10-m3.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-10.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-11.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-12.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-120.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-20.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-21.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-22.d: Likewise.
	* testsuite/ld-arm/attr-merge-hardfp-use-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-hardfp-use-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-nosection-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-2r.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-3.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-10.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-10r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-11.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-11r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-12.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-12r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-13.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-13r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-14.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-14r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-1r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-2r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-3.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-4.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-5.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-6.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-6r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-7.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-8.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-8r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-9.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-9r.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-00.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-02.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-04.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-20.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-22.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-40.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-44.d: Likewise.
	* testsuite/ld-arm/eabi-hard-float.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float-ABI4.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float-r.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float.d: Likewise.
	* testsuite/ld-arm/gc-hidden-1.d: Likewise.
	* emulparams/armaoutb.sh: Delete.
	* emulparams/armaoutl.sh: Delete.
	* emulparams/armcoff.sh: Delete.
	* emulparams/armnbsd.sh: Delete.
	* emulparams/riscix.sh: Delete.
	* scripttempl/armaout.sc: Delete.
	* scripttempl/armcoff.sc: Delete.
	* scripttempl/riscix.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-25 09:38:17 +09:30
Alan Modra c65c21e1ff various i386-aout and i386-coff target removal
Also tidies some other aout leftovers in binutils-common.exp.

bfd/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* doc/bfdint.texi: Likewise.
	* targets.c: Likewise.
	* freebsd.h: Delete.
	* i386dynix.c: Delete.
	* i386freebsd.c: Delete.
	* i386linux.c: Delete.
	* i386mach3.c: Delete.
	* i386netbsd.c: Delete.
	* i386os9k.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/lib/binutils-common.exp: Remove support for assorted
	aout targets.
gas/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* config/obj-elf.c: Likewise.
	* config/tc-i386.h: Likewise.
	* configure.ac: Likewise.
	* configure.tgt: Likewise.
	* config/te-dynix.h: Delete.
	* config/te-i386aix.h: Delete.
	* config/te-mach.h: Delete.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
include/
	* aout/dynix3.h: Delete.
ld/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* configure.tgt: Likewise.
	* testsuite/ld-discard/discard.exp: Likewise.
	* testsuite/ld-elf/binutils.exp: Likewise.
	* testsuite/ld-elf/tls.exp: Likewise.
	* testsuite/ld-elf/tls_common.exp: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
	* testsuite/ld-elfweak/elfweak.exp: Likewise.
	* testsuite/ld-gc/abi-note.d: Likewise.
	* testsuite/ld-gc/pr19167.d: Likewise.
	* testsuite/ld-gc/pr20022.d: Likewise.
	* testsuite/ld-gc/start.d: Likewise.
	* testsuite/ld-gc/stop.d: Likewise.
	* testsuite/ld-i386/i386.exp: Likewise.
	* testsuite/ld-ifunc/binutils.exp: Likewise.
	* testsuite/ld-ifunc/ifunc.exp: Likewise.
	* testsuite/ld-linkonce/linkonce.exp: Likewise.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/ld-scripts/empty-address-2a.d: Likewise.
	* testsuite/ld-scripts/empty-address-2b.d: Likewise.
	* testsuite/ld-scripts/phdrs2.exp: Likewise.
	* testsuite/ld-scripts/section-match-1.d: Likewise.
	* testsuite/ld-shared/shared.exp: Likewise.
	* testsuite/ld-size/size.exp: Likewise.
	* testsuite/ld-sparc/sparc.exp: Likewise.
	* emulparams/i386coff.sh: Delete.
	* emulparams/i386linux.sh: Delete.
	* emulparams/i386mach.sh: Delete.
	* emulparams/i386nbsd.sh: Delete.
	* emulparams/vsta.sh: Delete.
	* scripttempl/i386coff.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-18 09:34:19 +09:30
Alan Modra c9098af41e Remove sparc-aout and sparc-coff support
bfd/
	* Makefile.am: Remove sparc-aout and sparc-coff support.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* aout-sparcle.c: Delete.
	* aoutf1.h: Delete.
	* cf-sparclynx.c: Delete.
	* coff-sparc.c: Delete.
	* demo64.c: Delete.
	* sparclinux.c: Delete.
	* sparclynx.c: Delete.
	* sparcnetbsd.c: Delete.
	* sunos.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/lib/binutils-common.exp: Remove sparc-aout and
	sparc-coff support.
gas/
	* Makefile.am: Remove sparc-aout and sparc-coff support.
	* config/obj-coff.h: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-sparc.h: Likewise.
	* configure.tgt: Likewise.
	* config/te-sparcaout.h: Delete.
	* testsuite/gas/sun4/addend.d: Delete.
	* testsuite/gas/sun4/addend.exp: Delete.
	* testsuite/gas/sun4/addend.s: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove sparc-aout and sparc-coff support.
	* configure.tgt: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
	* testsuite/ld-elfweak/elfweak.exp: Likewise.
	* testsuite/ld-shared/shared.exp: Likewise.
	* emulparams/coff_sparc.sh: Delete.
	* emulparams/sparcaout.sh: Delete.
	* emulparams/sparclinux.sh: Delete.
	* emulparams/sparcnbsd.sh: Delete.
	* emulparams/sun4.sh: Delete.
	* scripttempl/sparccoff.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:33:26 +09:30
Alan Modra dc12032bca Remove m68k-aout and m68k-coff support
include/
	* aout/host.h: Remove m68k-aout and m68k-coff support.
	* aout/hp300hpux.h: Delete.
	* coff/apollo.h: Delete.
	* coff/aux-coff.h: Delete.
	* coff/m68k.h: Delete.
bfd/
	* Makefile.am: Remove m68k-aout and m68k-coff support.
	* aoutf1.h: Likewise.
	* aoutx.h: Likewise.
	* archive.c: Likewise.
	* bfd-in.h: Likewise.
	* bfd.c: Likewise.
	* coffcode.h: Likewise.
	* coffswap.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* configure.host: Likewise.
	* doc/bfd.texinfo: Likewise.
	* doc/bfdint.texi: Likewise.
	* freebsd.h: Likewise.
	* gen-aout.c: Likewise.
	* hpux-core.c: Likewise.
	* libaout.h: Likewise.
	* libbfd-in.h: Likewise.
	* pdp11.c: Likewise.
	* peicode.h: Likewise.
	* riscix.c: Likewise.
	* targets.c: Likewise.
	* aout0.c: Delete.
	* coff-apollo.c: Delete.
	* coff-aux.c: Delete.
	* coff-m68k.c: Delete.
	* coff-svm68k.c: Delete.
	* coff-u68k.c: Delete.
	* hosts/delta68.h: Delete.
	* hosts/hp300bsd.h: Delete.
	* hosts/m68kaux.h: Delete.
	* hosts/news.h: Delete.
	* hp300bsd.c: Delete.
	* hp300hpux.c: Delete.
	* liboasys.h: Delete.
	* m68k4knetbsd.c: Delete.
	* m68klinux.c: Delete.
	* m68knetbsd.c: Delete.
	* oasys.c: Delete.
	* versados.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* libbfd.h: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/copy-2.d: Remove m68k-aout and m68k-coff
	support.
	* testsuite/binutils-all/copy-3.d: Likewise.
	* testsuite/binutils-all/objcopy.exp: Likewise.
	* testsuite/lib/binutils-common.exp: Likewise.
gas/
	* Makefile.am: Remove m68k-aout and m68k-coff support.
	* config/tc-m68k.c: Likewise.
	* config/tc-m68k.h: Likewise.
	* configure.ac: Likewise.
	* configure.tgt: Likewise.
	* testsuite/gas/all/weakref1u.d: Likewise.
	* testsuite/gas/m68k/all.exp: Likewise.
	* testsuite/gas/m68k/br-isaa.d: Likewise.
	* testsuite/gas/m68k/br-isab.d: Likewise.
	* testsuite/gas/m68k/br-isac.d: Likewise.
	* config/te-psos.h: Delete.
	* config/te-sun3.h: Delete.
	* testsuite/gas/m68k-coff/gas.exp: Delete.
	* testsuite/gas/m68k-coff/p2389.s: Delete.
	* testsuite/gas/m68k-coff/p2389a.s: Delete.
	* testsuite/gas/m68k-coff/p2430.s: Delete.
	* testsuite/gas/m68k-coff/p2430a.s: Delete.
	* testsuite/gas/m68k-coff/t1.s: Delete.
	* testsuite/gas/m68k/p3041.d: Delete.
	* testsuite/gas/m68k/p3041.s: Delete.
	* testsuite/gas/m68k/p3041data.d: Delete.
	* testsuite/gas/m68k/p3041data.s: Delete.
	* testsuite/gas/m68k/p3041pcrel.d: Delete.
	* testsuite/gas/m68k/p3041pcrel.s: Delete.
	* testsuite/gas/m68k/t2.d: Delete.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove m68k-aout and m68k-coff support.
	* configure.tgt: Likewise.
	* emultempl/m68kelf.em: Likewise.
	* ld.texinfo: Likewise.
	* mri.c: Likewise.
	* emulparams/delta68.sh: Delete.
	* emulparams/hp300bsd.sh: Delete.
	* emulparams/hp3hpux.sh: Delete.
	* emulparams/m68k4knbsd.sh: Delete.
	* emulparams/m68kaout.sh: Delete.
	* emulparams/m68kaux.sh: Delete.
	* emulparams/m68kcoff.sh: Delete.
	* emulparams/m68klinux.sh: Delete.
	* emulparams/m68knbsd.sh: Delete.
	* emulparams/m68kpsos.sh: Delete.
	* emulparams/sun3.sh: Delete.
	* emultempl/m68kcoff.em: Delete.
	* scripttempl/delta68.sc: Delete.
	* scripttempl/m68kaux.sc: Delete.
	* scripttempl/m68kcoff.sc: Delete.
	* scripttempl/psos.sc: Delete.
	* testsuite/ld-versados/t1-1.ro: Delete.
	* testsuite/ld-versados/t1-2.ro: Delete.
	* testsuite/ld-versados/t1.ld: Delete.
	* testsuite/ld-versados/t1.ook: Delete.
	* testsuite/ld-versados/t2-1.ro: Delete.
	* testsuite/ld-versados/t2-2.ro: Delete.
	* testsuite/ld-versados/t2-3.ro: Delete.
	* testsuite/ld-versados/t2.ld: Delete.
	* testsuite/ld-versados/t2.ook: Delete.
	* testsuite/ld-versados/versados.exp: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:31:36 +09:30
Alan Modra 211dc24b87 Remove sh5 and sh64 support
include/
	* dis-asm.h: Remove sh5 and sh64 support.
bfd/
	* Makefile.am: Remove sh5 and sh64 support.
	* archures.c: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* cpu-sh.c: Likewise.
	* elf32-sh-relocs.h: Likewise.
	* elf32-sh.c: Likewise.
	* targets.c: Likewise.
	* elf32-sh64-com.c: Delete.
	* elf32-sh64.c: Delete.
	* elf32-sh64.h: Delete.
	* elf64-sh64.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* Makefile.am: Remove sh5 and sh64 support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* sh-dis.c: Likewise.
	* sh64-dis.c: Delete.
	* sh64-opc.c: Delete.
	* sh64-opc.h: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
bintuils/
	* testsuite/binutils-all/objcopy.exp: Remove sh5 and sh64 support.
gas/
	* Makefile.am: Remove sh5 and sh64 support.
	* config/tc-sh.c: Likewise.
	* configure.tgt: Likewise.
	* doc/Makefile.am: Likewise.
	* doc/as.texinfo: Likewise.
	* testsuite/gas/cfi/cfi.exp: Likewise.
	* testsuite/gas/sh/basic.exp: Likewise.
	* config/tc-sh64.c: Delete.
	* config/tc-sh64.h: Delete.
	* doc/c-sh64.texi: Delete.
	* testsuite/gas/sh/sh64/abi-32.d: Delete.
	* testsuite/gas/sh/sh64/abi-32.s: Delete.
	* testsuite/gas/sh/sh64/abi-64.d: Delete.
	* testsuite/gas/sh/sh64/abi-64.s: Delete.
	* testsuite/gas/sh/sh64/basic-1.d: Delete.
	* testsuite/gas/sh/sh64/basic-1.s: Delete.
	* testsuite/gas/sh/sh64/case-1.d: Delete.
	* testsuite/gas/sh/sh64/case-1.s: Delete.
	* testsuite/gas/sh/sh64/case-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/crange1-1.d: Delete.
	* testsuite/gas/sh/sh64/crange1-2.d: Delete.
	* testsuite/gas/sh/sh64/crange1.s: Delete.
	* testsuite/gas/sh/sh64/crange2-1.d: Delete.
	* testsuite/gas/sh/sh64/crange2-2.d: Delete.
	* testsuite/gas/sh/sh64/crange2-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/crange2.s: Delete.
	* testsuite/gas/sh/sh64/crange3-1.d: Delete.
	* testsuite/gas/sh/sh64/crange3.s: Delete.
	* testsuite/gas/sh/sh64/crange4-1.d: Delete.
	* testsuite/gas/sh/sh64/crange4.s: Delete.
	* testsuite/gas/sh/sh64/crange5-1.d: Delete.
	* testsuite/gas/sh/sh64/crange5.s: Delete.
	* testsuite/gas/sh/sh64/creg-1.d: Delete.
	* testsuite/gas/sh/sh64/creg-1.s: Delete.
	* testsuite/gas/sh/sh64/creg-2.d: Delete.
	* testsuite/gas/sh/sh64/creg-2.s: Delete.
	* testsuite/gas/sh/sh64/datal-1.s: Delete.
	* testsuite/gas/sh/sh64/datal-2.d: Delete.
	* testsuite/gas/sh/sh64/datal-2.s: Delete.
	* testsuite/gas/sh/sh64/datal-3.s: Delete.
	* testsuite/gas/sh/sh64/datal32-1.d: Delete.
	* testsuite/gas/sh/sh64/datal32-3.d: Delete.
	* testsuite/gas/sh/sh64/datal64-1.d: Delete.
	* testsuite/gas/sh/sh64/datal64-3.d: Delete.
	* testsuite/gas/sh/sh64/eh-1.d: Delete.
	* testsuite/gas/sh/sh64/eh-1.s: Delete.
	* testsuite/gas/sh/sh64/endian-1.d: Delete.
	* testsuite/gas/sh/sh64/endian-1.s: Delete.
	* testsuite/gas/sh/sh64/endian-2.d: Delete.
	* testsuite/gas/sh/sh64/endian-2.s: Delete.
	* testsuite/gas/sh/sh64/err-1.s: Delete.
	* testsuite/gas/sh/sh64/err-2.s: Delete.
	* testsuite/gas/sh/sh64/err-3.s: Delete.
	* testsuite/gas/sh/sh64/err-4.s: Delete.
	* testsuite/gas/sh/sh64/err-abi-32.s: Delete.
	* testsuite/gas/sh/sh64/err-abi-64.s: Delete.
	* testsuite/gas/sh/sh64/err-dsp.s: Delete.
	* testsuite/gas/sh/sh64/err-movi-noexp-1.s: Delete.
	* testsuite/gas/sh/sh64/err-noexp-cmd1.s: Delete.
	* testsuite/gas/sh/sh64/err-pt-1.s: Delete.
	* testsuite/gas/sh/sh64/err-pt32-cmd1.s: Delete.
	* testsuite/gas/sh/sh64/err-pt32-cmd2.s: Delete.
	* testsuite/gas/sh/sh64/err-pt32-cmd3.s: Delete.
	* testsuite/gas/sh/sh64/err-ptb-1.s: Delete.
	* testsuite/gas/sh/sh64/err-ptb-2.s: Delete.
	* testsuite/gas/sh/sh64/err.exp: Delete.
	* testsuite/gas/sh/sh64/immexpr1.s: Delete.
	* testsuite/gas/sh/sh64/immexpr2.s: Delete.
	* testsuite/gas/sh/sh64/immexpr32-1.d: Delete.
	* testsuite/gas/sh/sh64/immexpr32-2.d: Delete.
	* testsuite/gas/sh/sh64/immexpr64-1.d: Delete.
	* testsuite/gas/sh/sh64/immexpr64-2.d: Delete.
	* testsuite/gas/sh/sh64/lineno.d: Delete.
	* testsuite/gas/sh/sh64/lineno.s: Delete.
	* testsuite/gas/sh/sh64/localcom-1.d: Delete.
	* testsuite/gas/sh/sh64/localcom-1.s: Delete.
	* testsuite/gas/sh/sh64/mix-1.d: Delete.
	* testsuite/gas/sh/sh64/mix-1.s: Delete.
	* testsuite/gas/sh/sh64/mix-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/movi-1.s: Delete.
	* testsuite/gas/sh/sh64/movi-2.s: Delete.
	* testsuite/gas/sh/sh64/movi-3.d: Delete.
	* testsuite/gas/sh/sh64/movi-3.s: Delete.
	* testsuite/gas/sh/sh64/movi32-1.d: Delete.
	* testsuite/gas/sh/sh64/movi32-2.d: Delete.
	* testsuite/gas/sh/sh64/movi32-noexp-2.d: Delete.
	* testsuite/gas/sh/sh64/movi64-1.d: Delete.
	* testsuite/gas/sh/sh64/movi64-2.d: Delete.
	* testsuite/gas/sh/sh64/movi64-2.s: Delete.
	* testsuite/gas/sh/sh64/movi64-3.d: Delete.
	* testsuite/gas/sh/sh64/movi64-noexp-2.d: Delete.
	* testsuite/gas/sh/sh64/pt-1.d: Delete.
	* testsuite/gas/sh/sh64/pt-1.s: Delete.
	* testsuite/gas/sh/sh64/pt-2.s: Delete.
	* testsuite/gas/sh/sh64/pt-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/pt32-1.d: Delete.
	* testsuite/gas/sh/sh64/pt32-noexp-2.d: Delete.
	* testsuite/gas/sh/sh64/pt64-1.d: Delete.
	* testsuite/gas/sh/sh64/pt64-32-1.d: Delete.
	* testsuite/gas/sh/sh64/pt64-32-2.d: Delete.
	* testsuite/gas/sh/sh64/pt64-noexp-2.d: Delete.
	* testsuite/gas/sh/sh64/ptc-1.s: Delete.
	* testsuite/gas/sh/sh64/ptc32-1.d: Delete.
	* testsuite/gas/sh/sh64/ptc32-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/ptc64-1.d: Delete.
	* testsuite/gas/sh/sh64/ptc64-32-1.d: Delete.
	* testsuite/gas/sh/sh64/ptc64-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/ptext-1.s: Delete.
	* testsuite/gas/sh/sh64/ptext32-1.d: Delete.
	* testsuite/gas/sh/sh64/ptext32-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/ptext64-1.d: Delete.
	* testsuite/gas/sh/sh64/ptext64-32-1.d: Delete.
	* testsuite/gas/sh/sh64/ptext64-noexp-1.d: Delete.
	* testsuite/gas/sh/sh64/rel-1.s: Delete.
	* testsuite/gas/sh/sh64/rel-2.s: Delete.
	* testsuite/gas/sh/sh64/rel-3.s: Delete.
	* testsuite/gas/sh/sh64/rel-4.s: Delete.
	* testsuite/gas/sh/sh64/rel-5.s: Delete.
	* testsuite/gas/sh/sh64/rel32-1.d: Delete.
	* testsuite/gas/sh/sh64/rel32-2.d: Delete.
	* testsuite/gas/sh/sh64/rel32-3.d: Delete.
	* testsuite/gas/sh/sh64/rel32-4.d: Delete.
	* testsuite/gas/sh/sh64/rel32-5.d: Delete.
	* testsuite/gas/sh/sh64/rel64-1.d: Delete.
	* testsuite/gas/sh/sh64/rel64-2.d: Delete.
	* testsuite/gas/sh/sh64/rel64-3.d: Delete.
	* testsuite/gas/sh/sh64/rel64-4.d: Delete.
	* testsuite/gas/sh/sh64/rel64-5.d: Delete.
	* testsuite/gas/sh/sh64/relax-1.d: Delete.
	* testsuite/gas/sh/sh64/relax-1.s: Delete.
	* testsuite/gas/sh/sh64/relax-2.d: Delete.
	* testsuite/gas/sh/sh64/relax-2.s: Delete.
	* testsuite/gas/sh/sh64/relax-3.d: Delete.
	* testsuite/gas/sh/sh64/relax-3.s: Delete.
	* testsuite/gas/sh/sh64/sh64.exp: Delete.
	* testsuite/gas/sh/sh64/shift-1.s: Delete.
	* testsuite/gas/sh/sh64/shift-2.s: Delete.
	* testsuite/gas/sh/sh64/shift-3.s: Delete.
	* testsuite/gas/sh/sh64/shift32-1.d: Delete.
	* testsuite/gas/sh/sh64/shift32-3.d: Delete.
	* testsuite/gas/sh/sh64/shift32-noexp-3.d: Delete.
	* testsuite/gas/sh/sh64/shift64-1.d: Delete.
	* testsuite/gas/sh/sh64/shift64-2.d: Delete.
	* testsuite/gas/sh/sh64/shift64-3.d: Delete.
	* testsuite/gas/sh/sh64/shift64-noexp-3.d: Delete.
	* testsuite/gas/sh/sh64/syntax-1.d: Delete.
	* testsuite/gas/sh/sh64/syntax-1.s: Delete.
	* testsuite/gas/sh/sh64/syntax-2.d: Delete.
	* testsuite/gas/sh/sh64/syntax-2.s: Delete.
	* testsuite/gas/sh/sh64/ua-1.s: Delete.
	* testsuite/gas/sh/sh64/ua32-1.d: Delete.
	* testsuite/gas/sh/sh64/ua64-1.d: Delete.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove sh5 and sh64 support.
	* configure.tgt: Likewise.
	* ldlang.c: Likewise.
	* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
	* testsuite/ld-gc/gc.exp: Likewise.
	* testsuite/ld-gc/pr13683.d: Likewise.
	* testsuite/ld-scripts/crossref.exp: Likewise.
	* testsuite/ld-selective/selective.exp: Likewise.
	* testsuite/ld-sh/ld-r-1.d: Likewise.
	* testsuite/ld-sh/rd-sh.exp: Likewise.
	* testsuite/ld-sh/sh.exp: Likewise.
	* testsuite/ld-srec/srec.exp: Likewise.
	* testsuite/ld-undefined/undefined.exp: Likewise.
	* emulparams/shelf32.sh: Delete.
	* emulparams/shelf32_linux.sh: Delete.
	* emulparams/shelf32_nbsd.sh: Delete.
	* emulparams/shelf64.sh: Delete.
	* emulparams/shelf64_nbsd.sh: Delete.
	* emulparams/shlelf32.sh: Delete.
	* emulparams/shlelf32_linux.sh: Delete.
	* emulparams/shlelf32_nbsd.sh: Delete.
	* emulparams/shlelf64.sh: Delete.
	* emulparams/shlelf64_nbsd.sh: Delete.
	* emultempl/sh64elf.em: Delete.
	* testsuite/ld-sh/sh64/abi32.sd: Delete.
	* testsuite/ld-sh/sh64/abi32.xd: Delete.
	* testsuite/ld-sh/sh64/abi64.sd: Delete.
	* testsuite/ld-sh/sh64/abi64.xd: Delete.
	* testsuite/ld-sh/sh64/abixx-noexp.sd: Delete.
	* testsuite/ld-sh/sh64/cmpct1.sd: Delete.
	* testsuite/ld-sh/sh64/cmpct1.xd: Delete.
	* testsuite/ld-sh/sh64/crange-1.s: Delete.
	* testsuite/ld-sh/sh64/crange-2a.s: Delete.
	* testsuite/ld-sh/sh64/crange-2b.s: Delete.
	* testsuite/ld-sh/sh64/crange-2c.s: Delete.
	* testsuite/ld-sh/sh64/crange-2d.s: Delete.
	* testsuite/ld-sh/sh64/crange-2e.s: Delete.
	* testsuite/ld-sh/sh64/crange-2f.s: Delete.
	* testsuite/ld-sh/sh64/crange-2g.s: Delete.
	* testsuite/ld-sh/sh64/crange-2h.s: Delete.
	* testsuite/ld-sh/sh64/crange-2i.s: Delete.
	* testsuite/ld-sh/sh64/crange1.rd: Delete.
	* testsuite/ld-sh/sh64/crange2.rd: Delete.
	* testsuite/ld-sh/sh64/crange3-cmpct.rd: Delete.
	* testsuite/ld-sh/sh64/crange3-media.rd: Delete.
	* testsuite/ld-sh/sh64/crange3.dd: Delete.
	* testsuite/ld-sh/sh64/crange3.rd: Delete.
	* testsuite/ld-sh/sh64/crangerel1.rd: Delete.
	* testsuite/ld-sh/sh64/crangerel2.rd: Delete.
	* testsuite/ld-sh/sh64/dlsection-1.s: Delete.
	* testsuite/ld-sh/sh64/dlsection.sd: Delete.
	* testsuite/ld-sh/sh64/endian.dbd: Delete.
	* testsuite/ld-sh/sh64/endian.dld: Delete.
	* testsuite/ld-sh/sh64/endian.ld: Delete.
	* testsuite/ld-sh/sh64/endian.s: Delete.
	* testsuite/ld-sh/sh64/endian.sbd: Delete.
	* testsuite/ld-sh/sh64/endian.sld: Delete.
	* testsuite/ld-sh/sh64/gotplt.d: Delete.
	* testsuite/ld-sh/sh64/gotplt.map: Delete.
	* testsuite/ld-sh/sh64/gotplt.s: Delete.
	* testsuite/ld-sh/sh64/init-cmpct.d: Delete.
	* testsuite/ld-sh/sh64/init-media.d: Delete.
	* testsuite/ld-sh/sh64/init.s: Delete.
	* testsuite/ld-sh/sh64/init64.d: Delete.
	* testsuite/ld-sh/sh64/mix1-noexp.sd: Delete.
	* testsuite/ld-sh/sh64/mix1.sd: Delete.
	* testsuite/ld-sh/sh64/mix1.xd: Delete.
	* testsuite/ld-sh/sh64/mix2-noexp.sd: Delete.
	* testsuite/ld-sh/sh64/mix2.sd: Delete.
	* testsuite/ld-sh/sh64/mix2.xd: Delete.
	* testsuite/ld-sh/sh64/rd-sh64.exp: Delete.
	* testsuite/ld-sh/sh64/rel-1.s: Delete.
	* testsuite/ld-sh/sh64/rel-2.s: Delete.
	* testsuite/ld-sh/sh64/rel32.xd: Delete.
	* testsuite/ld-sh/sh64/rel64.xd: Delete.
	* testsuite/ld-sh/sh64/relax.exp: Delete.
	* testsuite/ld-sh/sh64/relax1.s: Delete.
	* testsuite/ld-sh/sh64/relax2.s: Delete.
	* testsuite/ld-sh/sh64/relax3.s: Delete.
	* testsuite/ld-sh/sh64/relax4.s: Delete.
	* testsuite/ld-sh/sh64/reldl-1.s: Delete.
	* testsuite/ld-sh/sh64/reldl-2.s: Delete.
	* testsuite/ld-sh/sh64/reldl32.rd: Delete.
	* testsuite/ld-sh/sh64/reldl64.rd: Delete.
	* testsuite/ld-sh/sh64/relfail.exp: Delete.
	* testsuite/ld-sh/sh64/relfail.s: Delete.
	* testsuite/ld-sh/sh64/sh64-1.s: Delete.
	* testsuite/ld-sh/sh64/sh64-2.s: Delete.
	* testsuite/ld-sh/sh64/sh64.exp: Delete.
	* testsuite/ld-sh/sh64/shcmp-1.s: Delete.
	* testsuite/ld-sh/sh64/shdl-1.s: Delete.
	* testsuite/ld-sh/sh64/shdl-2.s: Delete.
	* testsuite/ld-sh/sh64/shdl32.xd: Delete.
	* testsuite/ld-sh/sh64/shdl64.sd: Delete.
	* testsuite/ld-sh/sh64/shdl64.xd: Delete.
	* testsuite/ld-sh/sh64/shmix-1.s: Delete.
	* testsuite/ld-sh/sh64/shmix-2.s: Delete.
	* testsuite/ld-sh/sh64/shmix-3.s: Delete.
	* testsuite/ld-sh/sh64/stobin-0-dso.d: Delete.
	* testsuite/ld-sh/sh64/stobin-1.d: Delete.
	* testsuite/ld-sh/sh64/stobin.s: Delete.
	* testsuite/ld-sh/sh64/stolib.s: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:29:39 +09:30
Alan Modra a9a4b30244 Remove w65 support
include/
	* coff/internal.h: Remove w65 support.
	* coff/w65.h: Delete.
bfd/
	* Makefile.am: Remove w65 support.
	* archures.c: Likewise.
	* coffcode.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* coff-w65.c: Delete.
	* cpu-w65.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* Makefile.am: Remove w65 support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* w65-dis.c: Delete.
	* w65-opc.h: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/objcopy.exp: Remove w65 support.
ld/
	* Makefile.am: Remove w65 support.
	* configure.tgt: Likewise.
	* emulparams/w65.sh: Delete.
	* scripttempl/w65.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:26:05 +09:30
Alan Modra 04cb01fd5a Remove we32k support
include/
	* coff/we32k.h: Delete.
bfd/
	* Makefile.am: Remove we32k support.
	* archures.c: Likewise.
	* coffcode.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* coff-we32k.c: Delete.
	* cpu-we32k.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* configure.ac: Remove we32k support.
	* configure: Regenerate.
bintuils/
	* testsuite/binutils-all/objdump.exp: Remove we32k support.
2018-04-16 15:24:43 +09:30
Alan Modra c2bf1eecf9 Remove m88k support
include/
	* coff/internal.h: Remove m88k support.
	* coff/m88k.h: Delete.
	* opcode/m88k.h: Delete.
bfd/
	* Makefile.am: Remove m88k support.
	* aoutx.h: Likewise.
	* archures.c: Likewise.
	* coffcode.h: Likewise.
	* coffswap.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* cpu-ns32k.c: Likewise.
	* elf32-nds32.c: Likewise.
	* mach-o.c: Likewise.
	* netbsd-core.c: Likewise.
	* reloc.c: Likewise.
	* targets.c: Likewise.
	* coff-m88k.c: Delete.
	* cpu-m88k.c: Delete.
	* elf32-m88k.c: Delete.
	* hosts/m88kmach3.h: Delete.
	* m88kmach3.c: Delete.
	* m88kopenbsd.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* Makefile.am: Remove m88k support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* m88k-dis.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* MAINTAINERS (Mark Kettenis): Move to past maintainers.
	* testsuite/binutils-all/objdump.exp: Remove m88k support.
gas/
	* configure.ac: Remove m88k support.
	* config.in: Regenerate.
	* configure: Regenerate.
ld/
	* Makefile.am: Remove m88k support.
	* configure.host: Likewise.
	* configure.tgt: Likewise.
	* testsuite/ld-elf/sec-to-seg.exp: Likewise.
	* emulparams/m88kbcs.sh: Delete.
	* scripttempl/m88kbcs.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:23:38 +09:30
Alan Modra 6793974daa Remove i370 support
include/
	* elf/i370.h: Delete.
	* opcode/i370.h: Delete.
bfd/
	* Makefile.am: Remove i370 support.
	* archures.c: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* cpu-i370.c: Delete.
	* elf32-i370.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* Makefile.am: Remove i370 support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* i370-dis.c: Delete.
	* i370-opc.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* readelf.c: Remove i370 support.
	* testsuite/binutils-all/objdump.exp: Likewise.
gas/
	* Makefile.am: Remove i370 support.
	* app.c: Likewise.
	* config/obj-elf.c: Likewise.
	* configure.tgt: Likewise.
	* doc/Makefile.am: Likewise.
	* doc/as.texinfo: Likewise.
	* testsuite/gas/all/gas.exp: Likewise.
	* testsuite/gas/elf/warn-2.s: Likewise.
	* testsuite/gas/lns/lns.exp: Likewise.
	* config/tc-i370.c: Delete.
	* config/tc-i370.h: Delete.
	* doc/c-i370.texi: Delete.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove i370 support.
	* configure.tgt: Likewise.
	* testsuite/ld-elf/compressed1d.d: Likewise.
	* testsuite/ld-elf/group8a.d: Likewise.
	* testsuite/ld-elf/group8b.d: Likewise.
	* testsuite/ld-elf/group9a.d: Likewise.
	* testsuite/ld-elf/group9b.d: Likewise.
	* testsuite/ld-elf/merge.d: Likewise.
	* testsuite/ld-elf/pr12851.d: Likewise.
	* testsuite/ld-elf/pr12975.d: Likewise.
	* testsuite/ld-elf/pr13177.d: Likewise.
	* testsuite/ld-elf/pr13195.d: Likewise.
	* testsuite/ld-elf/pr17615.d: Likewise.
	* testsuite/ld-elf/pr21562a.d: Likewise.
	* testsuite/ld-elf/pr21562b.d: Likewise.
	* testsuite/ld-elf/pr21562c.d: Likewise.
	* testsuite/ld-elf/pr21562d.d: Likewise.
	* testsuite/ld-elf/pr21562i.d: Likewise.
	* testsuite/ld-elf/pr21562j.d: Likewise.
	* testsuite/ld-elf/pr21562k.d: Likewise.
	* testsuite/ld-elf/pr21562l.d: Likewise.
	* testsuite/ld-elf/pr21562m.d: Likewise.
	* testsuite/ld-elf/pr21562n.d: Likewise.
	* testsuite/ld-elf/pr22677.d: Likewise.
	* testsuite/lib/ld-lib.exp: Likewise.
	* emulparams/elf32i370.sh: Delete.
	* scripttempl/elfi370.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:21:56 +09:30
Alan Modra e82aa7944d Remove h8500 support
include/
	* coff/h8500.h: Delete.
	* coff/internal.h: Remove h8500 support.
bfd/
	* Makefile.am: Remove h8500 support.
	* archures.c: Likewise.
	* coffcode.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* coff-h8500.c: Delete.
	* cpu-h8500.c: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* Makefile.am: Remove h8500 support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* h8500-dis.c: Delete.
	* h8500-opc.h: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/objcopy.exp: Remove h8500 support.
	* testsuite/lib/binutils-common.exp: Likewise.
gas/
	* config/obj-coff.h: Remove h8500 support.
ld/
	* Makefile.am: Remove h8500 support.
	* configure.tgt: Likewise.
	* emulparams/h8500.sh: Delete.
	* emulparams/h8500b.sh: Delete.
	* emulparams/h8500c.sh: Delete.
	* emulparams/h8500m.sh: Delete.
	* emulparams/h8500s.sh: Delete.
	* scripttempl/h8500.sc: Delete.
	* scripttempl/h8500b.sc: Delete.
	* scripttempl/h8500c.sc: Delete.
	* scripttempl/h8500m.sc: Delete.
	* scripttempl/h8500s.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:19:52 +09:30
Alan Modra fe0bf0fd57 Remove h8300-coff support
include/
	* coff/h8300.h: Delete.
bfd/
	* Makefile.am: Remove h8300-coff support.
	* coffcode.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* reloc16.c: Likewise.
	* targets.c: Likewise.
	* coff-h8300.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/objcopy.exp: Remove h8300-coff support.
gas/
	* config/obj-coff.h: Remove h8300-coff support.
	* config/tc-h8300.c: Likewise.
	* config/tc-h8300.h: Likewise.
	* testsuite/gas/h8300/h8300.exp: Likewise.
	* testsuite/gas/h8300/branch-coff.s: Delete.
	* testsuite/gas/h8300/branchh-coff.s: Delete.
	* testsuite/gas/h8300/branchs-coff.s: Delete.
	* testsuite/gas/h8300/ffxx1-coff.d: Delete.
	* testsuite/gas/h8300/ffxx1-coff.s: Delete.
	* testsuite/gas/h8300/h8300-coff.exp: Delete.
ld/
	* Makefile.am: Remove h8300-coff support.
	* configure.tgt: Likewise.
	* testsuite/ld-h8300/h8300.exp: Likewise.
	* emulparams/h8300.sh: Delete.
	* emulparams/h8300h.sh: Delete.
	* emulparams/h8300hn.sh: Delete.
	* emulparams/h8300s.sh: Delete.
	* emulparams/h8300sn.sh: Delete.
	* emulparams/h8300sx.sh: Delete.
	* emulparams/h8300sxn.sh: Delete.
	* scripttempl/h8300.sc: Delete.
	* scripttempl/h8300h.sc: Delete.
	* scripttempl/h8300hn.sc: Delete.
	* scripttempl/h8300s.sc: Delete.
	* scripttempl/h8300sn.sc: Delete.
	* scripttempl/h8300sx.sc: Delete.
	* scripttempl/h8300sxn.sc: Delete.
	* testsuite/ld-h8300/relax-3-coff.d: Delete.
	* testsuite/ld-h8300/relax-4-coff.d: Delete.
	* testsuite/ld-h8300/relax-5-coff.d: Delete.
	* testsuite/ld-h8300/relax-6-coff.d: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:17:57 +09:30
Alan Modra 5972ac7375 Remove sony newsos3 support
include/
	* aout/host.h: Remove newsos3 support.
bfd/
	* Makefile.am: Remove newsos3 support.
	* aoutx.h: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* newsos3.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/copy-2.d: Remove newsos3 support.
	* testsuite/binutils-all/nm.exp: Likewise.
ld/
	* Makefile.am: Remove newsos3 support.
	* configure.tgt: Likewise.
	* emulparams/news.sh: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:13:07 +09:30
Alan Modra b4b594e304 Remove netware support
include/
	* nlm/ChangeLog-9315: Delete.
	* nlm/alpha-ext.h: Delete.
	* nlm/common.h: Delete.
	* nlm/external.h: Delete.
	* nlm/i386-ext.h: Delete.
	* nlm/internal.h: Delete.
	* nlm/ppc-ext.h: Delete.
	* nlm/sparc32-ext.h: Delete.
bfd/
	* Makefile.am: Remove netware support.
	* bfd-in.h: Likewise.
	* bfd.c: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* doc/bfdint.texi: Likewise.
	* ecoff.c: Likewise.
	* targets.c: Likewise.
	* libnlm.h: Delete.
	* nlm-target.h: Delete.
	* nlm.c: Delete.
	* nlm32-alpha.c: Delete.
	* nlm32-i386.c: Delete.
	* nlm32-ppc.c: Delete.
	* nlm32-sparc.c: Delete.
	* nlm32.c: Delete.
	* nlm64.c: Delete.
	* nlmcode.h: Delete.
	* nlmswap.h: Delete.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* .gitignore: Remove netware support.
	* Makefile.am: Likewise.
	* configure.ac: Likewise.
	* doc/Makefile.am: Likewise.
	* doc/binutils.texi: Likewise.
	* testsuite/binutils-all/nm.exp: Likewise.
	* nlmconv.c: Delete.
	* nlmconv.h: Delete.
	* nlmheader.y: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
gas/
	* Makefile.am: Remove netware support.
	* config/tc-i386.c: Likewise.
	* configure.tgt: Likewise.
	* config/te-netware.h: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
gprof/
	* corefile.c: Remove netware support.
ld/
	* Makefile.am: Remove netware support.
	* configure.tgt: Likewise.
	* testsuite/ld-powerpc/powerpc.exp: Likewise.
	* emulparams/i386nw.sh: Delete.
	* emulparams/ppcnw.sh: Delete.
	* scripttempl/nw.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 15:11:22 +09:30
Alan Modra fceadf0951 Remove tahoe support
include/
	* opcode/tahoe.h: Delete.
bfd/
	* archures.c: Remove tahoe support.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* hosts/tahoe.h: Delete.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
opcodes/
	* configure.ac: Remove tahoe support.
	* configure: Regenerate.
binutils/
	* testsuite/binutils-all/objdump.exp: Remove tahoe support.
gprof/
	* Makefile.am: Remove tahoe support.
	* corefile.c: Likewise.
	* tahoe.c: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2018-04-16 15:08:40 +09:30
Alan Modra a8eb42a8b7 Remove i860, i960, bout and aout-adobe targets
Plus remove a few leftovers from the 29k support.

include/
	* aout/adobe.h: Delete.
	* aout/reloc.h: Delete.
	* coff/i860.h: Delete.
	* coff/i960.h: Delete.
	* elf/i860.h: Delete.
	* elf/i960.h: Delete.
	* opcode/i860.h: Delete.
	* opcode/i960.h: Delete.
	* aout/aout64.h (enum reloc_type): Trim off 29k and other unused values.
	* aout/ar.h (ARMAGB): Remove.
	* coff/internal.h (struct internal_aouthdr, struct internal_scnhdr,
	union internal_auxent): Remove i960 support.
bfd/
	* aout-adobe.c: Delete.
	* bout.c: Delete.
	* coff-i860.c: Delete.
	* coff-i960.c: Delete.
	* cpu-i860.c: Delete.
	* cpu-i960.c: Delete.
	* elf32-i860.c: Delete.
	* elf32-i960.c: Delete.
	* hosts/i860mach3.h: Delete.
	* Makefile.am: Remove i860, i960, bout, and adobe support.
	* archures.c: Remove i860 and i960 support.
	* coffcode.h: Likewise.
	* reloc.c: Likewise.
	* aoutx.h: Comment updates.
	* archive.c: Remove BOUT and i960 support.
	* bfd.c: Remove BOUT support.
	* coffswap.h: Remove i960 support.
	* config.bfd: Remove i860, i960 and adobe targets.
	* configure.ac: Remove adode, bout, i860, i960, icoff targets.
	* targets.c: Likewise.
	* ieee.c: Remove i960 support.
	* mach-o.c: Remove i860 support.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* libbfd.h: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
opcodes/
	* opcodes/i860-dis.c: Delete.
	* opcodes/i960-dis.c: Delete.
	* Makefile.am: Remove i860 and i960 support.
	* configure.ac: Likewise.
	* disassemble.c: Likewise.
	* disassemble.h: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* ieee.c: Remove i960 support.
	* od-macho.c: Remove i860 support.
	* readelf.c: Remove i860 and i960 support.
	* testsuite/binutils-all/objcopy.exp: Likewise.
	* testsuite/binutils-all/objdump.exp: Likewise.
	* testsuite/lib/binutils-common.exp: Likewise.
gas/
	* config/aout_gnu.h: Delete.
	* config/tc-i860.c: Delete.
	* config/tc-i860.h: Delete.
	* config/tc-i960.c: Delete.
	* config/tc-i960.h: Delete.
	* doc/c-i860.texi: Delete.
	* doc/c-i960.texi: Delete.
	* testsuite/gas/i860/README.i860: Delete.
	* testsuite/gas/i860/bitwise.d: Delete.
	* testsuite/gas/i860/bitwise.s: Delete.
	* testsuite/gas/i860/branch.d: Delete.
	* testsuite/gas/i860/branch.s: Delete.
	* testsuite/gas/i860/bte.d: Delete.
	* testsuite/gas/i860/bte.s: Delete.
	* testsuite/gas/i860/dir-align01.d: Delete.
	* testsuite/gas/i860/dir-align01.s: Delete.
	* testsuite/gas/i860/dir-intel01.d: Delete.
	* testsuite/gas/i860/dir-intel01.s: Delete.
	* testsuite/gas/i860/dir-intel02.d: Delete.
	* testsuite/gas/i860/dir-intel02.s: Delete.
	* testsuite/gas/i860/dir-intel03-err.l: Delete.
	* testsuite/gas/i860/dir-intel03-err.s: Delete.
	* testsuite/gas/i860/dual01.d: Delete.
	* testsuite/gas/i860/dual01.s: Delete.
	* testsuite/gas/i860/dual02-err.l: Delete.
	* testsuite/gas/i860/dual02-err.s: Delete.
	* testsuite/gas/i860/dual03.d: Delete.
	* testsuite/gas/i860/dual03.s: Delete.
	* testsuite/gas/i860/fldst01.d: Delete.
	* testsuite/gas/i860/fldst01.s: Delete.
	* testsuite/gas/i860/fldst02.d: Delete.
	* testsuite/gas/i860/fldst02.s: Delete.
	* testsuite/gas/i860/fldst03.d: Delete.
	* testsuite/gas/i860/fldst03.s: Delete.
	* testsuite/gas/i860/fldst04.d: Delete.
	* testsuite/gas/i860/fldst04.s: Delete.
	* testsuite/gas/i860/fldst05.d: Delete.
	* testsuite/gas/i860/fldst05.s: Delete.
	* testsuite/gas/i860/fldst06.d: Delete.
	* testsuite/gas/i860/fldst06.s: Delete.
	* testsuite/gas/i860/fldst07.d: Delete.
	* testsuite/gas/i860/fldst07.s: Delete.
	* testsuite/gas/i860/fldst08.d: Delete.
	* testsuite/gas/i860/fldst08.s: Delete.
	* testsuite/gas/i860/float01.d: Delete.
	* testsuite/gas/i860/float01.s: Delete.
	* testsuite/gas/i860/float02.d: Delete.
	* testsuite/gas/i860/float02.s: Delete.
	* testsuite/gas/i860/float03.d: Delete.
	* testsuite/gas/i860/float03.s: Delete.
	* testsuite/gas/i860/float04.d: Delete.
	* testsuite/gas/i860/float04.s: Delete.
	* testsuite/gas/i860/form.d: Delete.
	* testsuite/gas/i860/form.s: Delete.
	* testsuite/gas/i860/i860.exp: Delete.
	* testsuite/gas/i860/iarith.d: Delete.
	* testsuite/gas/i860/iarith.s: Delete.
	* testsuite/gas/i860/ldst01.d: Delete.
	* testsuite/gas/i860/ldst01.s: Delete.
	* testsuite/gas/i860/ldst02.d: Delete.
	* testsuite/gas/i860/ldst02.s: Delete.
	* testsuite/gas/i860/ldst03.d: Delete.
	* testsuite/gas/i860/ldst03.s: Delete.
	* testsuite/gas/i860/ldst04.d: Delete.
	* testsuite/gas/i860/ldst04.s: Delete.
	* testsuite/gas/i860/ldst05.d: Delete.
	* testsuite/gas/i860/ldst05.s: Delete.
	* testsuite/gas/i860/ldst06.d: Delete.
	* testsuite/gas/i860/ldst06.s: Delete.
	* testsuite/gas/i860/pfam.d: Delete.
	* testsuite/gas/i860/pfam.s: Delete.
	* testsuite/gas/i860/pfmam.d: Delete.
	* testsuite/gas/i860/pfmam.s: Delete.
	* testsuite/gas/i860/pfmsm.d: Delete.
	* testsuite/gas/i860/pfmsm.s: Delete.
	* testsuite/gas/i860/pfsm.d: Delete.
	* testsuite/gas/i860/pfsm.s: Delete.
	* testsuite/gas/i860/pseudo-ops01.d: Delete.
	* testsuite/gas/i860/pseudo-ops01.s: Delete.
	* testsuite/gas/i860/regress01.d: Delete.
	* testsuite/gas/i860/regress01.s: Delete.
	* testsuite/gas/i860/shift.d: Delete.
	* testsuite/gas/i860/shift.s: Delete.
	* testsuite/gas/i860/simd.d: Delete.
	* testsuite/gas/i860/simd.s: Delete.
	* testsuite/gas/i860/system.d: Delete.
	* testsuite/gas/i860/system.s: Delete.
	* testsuite/gas/i860/xp.d: Delete.
	* testsuite/gas/i860/xp.s: Delete.
	* Makefile.am: Remove i860 and i960 support.
	* configure.tgt: Likewise.
	* doc/Makefile.am: Likewise.
	* doc/all.texi: Likewise.
	* testsuite/gas/all/gas.exp
	* config/obj-coff.h: Remove i960 support.
	* doc/internals.texi: Likewise.
	* expr.c: Likewise.
	* read.c: Likewise.
	* write.c: Likewise.
	* write.h: Likewise.
	* testsuite/gas/lns/lns.exp: Likewise.
	* testsuite/gas/symver/symver.exp: Likewise.
	* config/tc-m68k.c: Remove BOUT support.
	* config/tc-score.c: Likewise.
	* config/tc-score7.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* symbols.c: Likewise.
	* doc/h8.texi: Likewise.
	* configure.ac: Remove BOUT and i860 support.
	* doc/as.texinfo: Remove BOUT, i860 and i960 support
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* emulparams/coff_i860.sh: Delete.
	* emulparams/elf32_i860.sh: Delete.
	* emulparams/elf32_i960.sh: Delete.
	* emulparams/gld960.sh: Delete.
	* emulparams/gld960coff.sh: Delete.
	* emulparams/lnk960.sh: Delete.
	* emultempl/gld960.em: Delete.
	* emultempl/gld960c.em: Delete.
	* emultempl/lnk960.em: Delete.
	* scripttempl/i860coff.sc: Delete.
	* scripttempl/i960.sc: Delete.
	* ld.texinfo: Remove i960 support.
	* Makefile.am: Remove i860 and i960 support.
	* configure.tgt: Likewise.
	* testsuite/ld-discard/extern.d: Likewise.
	* testsuite/ld-discard/start.d: Likewise.
	* testsuite/ld-discard/static.d: Likewise.
	* testsuite/ld-elf/compressed1d.d: Likewise.
	* testsuite/ld-elf/group1.d: Likewise.
	* testsuite/ld-elf/group3b.d: Likewise.
	* testsuite/ld-elf/group8a.d: Likewise.
	* testsuite/ld-elf/group8b.d: Likewise.
	* testsuite/ld-elf/group9a.d: Likewise.
	* testsuite/ld-elf/group9b.d: Likewise.
	* testsuite/ld-elf/linkonce2.d: Likewise.
	* testsuite/ld-elf/merge.d: Likewise.
	* testsuite/ld-elf/merge2.d: Likewise.
	* testsuite/ld-elf/merge3.d: Likewise.
	* testsuite/ld-elf/orphan-10.d: Likewise.
	* testsuite/ld-elf/orphan-11.d: Likewise.
	* testsuite/ld-elf/orphan-12.d: Likewise.
	* testsuite/ld-elf/orphan-9.d: Likewise.
	* testsuite/ld-elf/orphan-region.d: Likewise.
	* testsuite/ld-elf/orphan.d: Likewise.
	* testsuite/ld-elf/orphan3.d: Likewise.
	* testsuite/ld-elf/pr12851.d: Likewise.
	* testsuite/ld-elf/pr12975.d: Likewise.
	* testsuite/ld-elf/pr13177.d: Likewise.
	* testsuite/ld-elf/pr13195.d: Likewise.
	* testsuite/ld-elf/pr17550a.d: Likewise.
	* testsuite/ld-elf/pr17550b.d: Likewise.
	* testsuite/ld-elf/pr17550c.d: Likewise.
	* testsuite/ld-elf/pr17550d.d: Likewise.
	* testsuite/ld-elf/pr17615.d: Likewise.
	* testsuite/ld-elf/pr20528a.d: Likewise.
	* testsuite/ld-elf/pr20528b.d: Likewise.
	* testsuite/ld-elf/pr21562a.d: Likewise.
	* testsuite/ld-elf/pr21562b.d: Likewise.
	* testsuite/ld-elf/pr21562c.d: Likewise.
	* testsuite/ld-elf/pr21562d.d: Likewise.
	* testsuite/ld-elf/pr21562i.d: Likewise.
	* testsuite/ld-elf/pr21562j.d: Likewise.
	* testsuite/ld-elf/pr21562k.d: Likewise.
	* testsuite/ld-elf/pr21562l.d: Likewise.
	* testsuite/ld-elf/pr21562m.d: Likewise.
	* testsuite/ld-elf/pr21562n.d: Likewise.
	* testsuite/ld-elf/pr22677.d: Likewise.
	* testsuite/ld-elf/pr22836-1a.d: Likewise.
	* testsuite/ld-elf/pr22836-1b.d: Likewise.
	* testsuite/ld-elf/pr349.d: Likewise.
	* testsuite/ld-elf/sec-to-seg.exp: Likewise.
	* testsuite/ld-elf/sec64k.exp: Likewise.
	* testsuite/ld-elf/warn1.d: Likewise.
	* testsuite/ld-elf/warn2.d: Likewise.
	* testsuite/ld-elf/warn3.d: Likewise.
	* testsuite/lib/ld-lib.exp: Likewise.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-11 21:49:30 +09:30
Maciej W. Rozycki c43b2c546b binutils/testsuite: Also consider `*-*-lynxos*' and `*-*-symbianelf*' ELF
These targets use the ELF format according to `bfd/config.bfd'.

	binutils/
	* testsuite/lib/binutils-common.exp (is_elf_format): Also return
	1 for `*-*-lynxos*' and `*-*-symbianelf*' targets.
2018-04-11 12:03:49 +01:00
Alan Modra d4ae193277 Fix some strip test fails on nds32 and pru
Fixes these fails:
nds32le-linux  +FAIL: binutils-all/strip-14
nds32le-linux  +FAIL: binutils-all/strip-15
pru-elf  +FAIL: binutils-all/strip-14
pru-elf  +FAIL: binutils-all/strip-15

strip-13 fails on nds32 due to an assertion failure and out of bounds
access to nds32_elf_howto_table.

	* testsuite/binutils-all/objcopy.exp (strip-14, strip-15): Choose
	reloc=11 for pru and reloc=50 for nds32.
	* testsuite/binutils-all/strip-15.d: Accept 0xb reloc number.
2018-04-10 09:41:25 +09:30
Maciej W. Rozycki d52e3d06e5 binutils/testsuite: Fix a crash with STN_UNDEF in relocation
Verify that `strip' completes successfully and a correct relocation
entry is copied for a relocation encountered with the STN_UNDEF symbol
index.

	binutils/
	* testsuite/binutils-all/strip-15.d: New test.
	* testsuite/binutils-all/strip-15rel.s: New test source.
	* testsuite/binutils-all/strip-15rela.s: New test source.
	* testsuite/binutils-all/strip-15mips64.s: New test source.
	* testsuite/binutils-all/objcopy.exp: Run the new test.
2018-04-09 13:42:01 +01:00
Maciej W. Rozycki 3f97ba9fc8 binutils/testsuite: Verify the handling of invalid `r_sym' in relocation
Verify that `strip' terminates gracefully and a correct error message is
produced for a relocation encountered with an invalid symbol index.  No
single relocation number is valid across all targets we support, so pick
a few numbers to choose from depending on the target.

	binutils/
	* testsuite/binutils-all/strip-14.d: New test.
	* testsuite/binutils-all/strip-14rel.s: New test source.
	* testsuite/binutils-all/strip-14rela.s: New test source.
	* testsuite/binutils-all/strip-14mips64.s: New test source.
	* testsuite/binutils-all/objcopy.exp: Run the new test.
2018-04-09 13:42:00 +01:00
Maciej W. Rozycki 2d8c1a2318 MIPS/binutils/testsuite: Fix `.dc.l' typo in `strip-13mips64.s'
Fix a typo: `.dc.w' -> `.dc.l' in `strip-13mips64.s', correcting a bug
from commit 2f8ceb3899 ("binutils/testsuite: Support REL and MIPS64
reloc formats with `strip-13'").  For relocation format correctness only
as there is no observable change in test results due to the lack of
connection between the second relocation entry affected and the examined
error message produced.

	binutils/
	* testsuite/binutils-all/strip-13mips64.s: Use `.dc.l' rather
	than `.dc.w' in second relocation.
2018-04-05 22:37:17 +01:00
Maciej W. Rozycki 65bd20451f binutils/testsuite: Tighten the error message check with `strip-13'
Avoid false positives and actually verify both that an `unsupported
relocation type 0x8f' message is produced and that no other message is,
except for the final `bad value', in the `strip-13' test.  This ensures
that it is a relocation processing error and not a different issue that
has caused `strip' to terminate unsuccessfully, and that the number
representing the unsupported relocation has not been clobbered.

	binutils/
	* testsuite/binutils-all/strip-13.d: Also expect `unsupported
	relocation type 0x8f' error message.
2018-04-05 13:08:35 +01:00
Maciej W. Rozycki 2f8ceb3899 binutils/testsuite: Support REL and MIPS64 reloc formats with `strip-13'
Add source variants for the `strip-13' test that produce relocations in
the REL and MIPS64 formats, fixing a failure for the `mips64el-openbsd'
target.  This also corrects output for `i*86-*', `i960-*', `m6812-*' and
`m68hc12-*', o32 `mips*-*', and `score*-*' targets, which however does
not show up as a test result change due to lax error message matching
causing `bad value' previously produced by `strip' as a result of input
file rejection to be accepted as a test pass.

For `m6811-*' aka `m68hc11-*' targets this causes a phantom regression,
because they use 16-bit addressing and therefore `.dc.a' emits 16-bit
quantities causing relocation data constructed in assembly not to be as
expected.  Previously input was rejected by `strip' with a `bad value'
message and now it is accepted, however due to the relocation data error
the relocation number is not one of the unsupported ones and the tool
completes successfully, which scores as a test failure.

Disable the test case for `m6811-*' and `m68hc11-*' targets then, as it
is a test case bug rather than a problem with the relevant backend.  A
separate change to the test case is required to correct this problem, at
which point the test case can be enabled for the affected targets.

	binutils/
	* testsuite/binutils-all/strip-13.s: Rename to...
	* testsuite/binutils-all/strip-13rela.s: ... this.
	* testsuite/binutils-all/strip-13rel.s: New test source.
	* testsuite/binutils-all/strip-13mips64.s: New test source.
	* testsuite/binutils-all/strip-13.d: Remove `arm-*', `d10v-*',
	`dlx-*' and `xgate-*' from `not-target' list.  Add `m6811-*' and
	`m68hc11-*' to `not-target' list.
	* testsuite/binutils-all/objcopy.exp: Switch between sources for
	`strip-13'.
2018-04-05 13:08:35 +01:00
Maciej W. Rozycki aad7be454b binutils/testsuite: Enable `strip-13' test for `hppa*-*'
Based on relocations defined in include/elf/*.h files we have relocation
numbers: 143, 159, 214 and 215 currently not used by any of our ELF
targets.  Use 143 then instead of 241 to enable the `strip-13' test for
`hppa*-*' targets.  It has a side effect with some targets of verifying
that unused relocations whose numbers are below the respective R_*_max
value are handled correctly.

	binutils/
	* testsuite/binutils-all/strip-13.s: Use 143 (0x8f) rather than
	241 (0xf1) for the relocation number and RELA addend.
	* testsuite/binutils-all/strip-13.d: Remove `hppa*-*' from the
	`not-target' list.
2018-04-05 13:08:35 +01:00
Nick Clifton 8fd7578189 Improve readelf's selection of a file start symbol when displaying a gnu build attribute.
* readelf.c (get_symbol_for_build_attribute): Skip ARM mapping
	symbols.
	(print_gnu_build_attribute_description): If no file start symbol
	could be found, look for one two bytes into the file.
	* testsuite/binutils-all/note-4-64.s: Set the address of the file
	start symbol to two bytes into the file.
	* testsuite/binutils-all/note-4-32.s: Likewise.
2018-03-23 12:20:03 +00:00
Nick Clifton f3185997ac Have info_to_howto functions return a success/fail status. Check this result. Stop strip from completeing if one of these functions fails.
bfd	PR 22875
	* elf-bfd.h (struct elf_backend_data): Change the return type of
	the elf_info_to_howto and elf_info_to_howto_rel function pointers
	to bfd_boolean.
	* elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed.
	* elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function.
	(elf32_h8_relax_section): Likewise.
	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
	* elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
	* elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
	* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
	* elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
	* elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
	* elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
	(riscv_elf_relocate_section): Likewise.
	* elf-hppa.h (elf_hppa_info_to_howto): Change return type to
	bfd_boolean.  Issue an error message, set an error value and
	return FALSE if the reloc is not recognized.
	(elf_hppa_info_to_howto_rel): Likewise.
	* elf-m10200.c (mn10200_info_to_howto): Likewise.
	* elf-m10300.c (mn10300_info_to_howto): Likewise.
	* elf.c (_bfd_elf_no_info_to_howto): Likewise.
	* elf32-arc.c (arc_info_to_howto_rel): Likewise.
	* elf32-arm.c (elf32_arm_info_to_howto): Likewise.
	* elf32-avr.c (avr_info_to_howto_rela): Likewise.
	* elf32-bfin.c (bfin_info_to_howto): Likewise.
	* elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
	* elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
	* elf32-cris.c (elf_cr16c_info_to_howto_rel, cris_info_to_howto_rela): Likewise.
	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
	* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
	* elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise.
	* elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto, elf32_dlx_info_to_howto_rel): Likewise.
	* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
	* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
	* elf32-frv.c (frv_info_to_howto_rela, 	frvfdpic_info_to_howto_rel): Likewise.
	* elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
	* elf32-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise.
	* elf32-h8300.c (elf32_h8_info_to_howto, elf32_h8_info_to_howto_rel): Likewise.
	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
	* elf32-i386.c (elf_i386_reloc_type_lookup, elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
	* elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise.
	* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
	* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
	* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
	* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
	* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
	* elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise.
	* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
	* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
	* elf32-m68k.c (rtype_to_howto): Likewise.
	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
	* elf32-mep.c (mep_info_to_howto_rela): Likewise.
	* elf32-metag.c (metag_info_to_howto_rela): Likewise.
	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
	* elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise.
	* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
	* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
	* elf32-mt.c (mt_info_to_howto_rela): Likewise.
	* elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise.
	* elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
	* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
	* elf32-pru.c (pru_elf32_info_to_howto): Likewise.
	* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
	* elf32-rx.c (rx_info_to_howto_rela): Likewise.
	* elf32-s390.c (elf_s390_info_to_howto): Likewise.
	* elf32-score.c (s3_bfd_score_info_to_howto, _bfd_score_info_to_howto): Likewise.
	* elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
	* elf32-tic6x.c (elf32_tic6x_info_to_howto, elf32_tic6x_info_to_howto_rel): Likewise.
	* elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
	* elf32-v850.c (v850_elf_info_to_howto_rel, v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
	* elf32-vax.c (rtype_to_howto): Likewise.
	* elf32-visium.c (visium_info_to_howto_rela): Likewise.
	* elf32-wasm32.c (elf32_wasm32_rtype_to_howto, elf32_wasm32_info_to_howto_rela): Likewise.
	* elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
	* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
	* elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
	* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
	* elf64-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
	* elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
	* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
	* elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
	* elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
	* elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise.
	* elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
	* elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
	* elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
	* elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
	* elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
	* elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
	* elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
	* elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
	* elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
	* elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL.

binutils PR 22875
	* objcopy.c (copy_object): Check the error status after marking symbols used in relocations.
	* testsuite/binutils-all/strip-13.s: New test source file.
	* testsuite/binutils-all/strip-13.s: New test driver file.
	* testsuite/binutils-all/objcopy.exp: Run the new test.
2018-02-27 10:15:13 +00:00