Commit Graph

9791 Commits

Author SHA1 Message Date
Jan Beulich
394ae71f02 x86: CVTPI2PD has special behavior
CVTPI2PD with a memory operand, unlike CVTPI2PS, doesn't engage MMX
logic. Therefore it
- has a proper AVX equivalent (CVTDQ2PD) and hence can be subject to
  SSE2AVX translation and SSE checking,
- should not record MMX use in the respective ELF note.
2021-02-16 11:34:25 +01:00
Jan Beulich
3d70986f21 x86: honor template rather than actual operands when updating i.xstate
This undoes a change to md_assemble() that 32930e4edb ("x86: Support
GNU_PROPERTY_X86_ISA_1_V[234] marker") did without any explanation. This
broke a CVTPI2PS property test that a subsequent test will add, and the
updates to existing tests also demonstrate what was wrong: For example,
AVX insns update the full YMM, even if a Vex128 variant is in use.
2021-02-16 11:33:04 +01:00
Jan Beulich
014d61ea14 x86: record register use for SIMD insns without respective explicit operands
VZERO{ALL,UPPER} modify YMM registers despite having no operands.

While {,V}{LD,ST}MXCSR don't modify XMM registers, MXCSR and XMMn
collectively form underlying machine state.
2021-02-16 11:32:18 +01:00
Jan Beulich
cbe6869656 x86: make common property tests common
There's no need to run the exact same test twice. Move the tests which
don't differ between 32- and 64-bit to the "Common tests" section.
2021-02-16 11:30:49 +01:00
Jan Beulich
c2f1204d1f x86: make 16-bit ENQCMD test actually test ENQCMD 2021-02-16 11:26:58 +01:00
Alan Modra
9a12b194b0 PR27426, More bugs in dwarf2dbg.c
PR 27426
	* dwarf2dbg.c (allocate_filename_to_slot): Allocate the dirs array
	in another place.
2021-02-16 14:47:41 +10:30
Alan Modra
7043388668 demand_copy_C_string NUL check
* read.c (demand_copy_C_string): Really check for embedded zeros.
2021-02-16 14:40:14 +10:30
Andreas Krebbel
ba2b480f10 IBM Z: Implement instruction set extensions
opcodes/

        * s390-mkopc.c (main): Accept arch14 as cpu string.
        * s390-opc.txt: Add new arch14 instructions.

include/

        * opcode/s390.h (enum s390_opcode_cpu_val): Add
        S390_OPCODE_ARCH14.

gas/

        * config/tc-s390.c (s390_parse_cpu): New entry for arch14.
        * doc/c-s390.texi: Document arch14 march option.
        * testsuite/gas/s390/s390.exp: Run the arch14 related tests.
        * testsuite/gas/s390/zarch-arch14.d: New test.
        * testsuite/gas/s390/zarch-arch14.s: New test.
2021-02-15 14:32:17 +01:00
Nick Clifton
c46b706620 Change the readelf and objdump programs so that they will automatically follow links to separate debug info files.
* configure.ac (follow-debug-links): Add option to enable or
	disable the following of debug links by default.  Set the
	default for the option to be 'follow'.
	* dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
	(dwarf_select_sections_by_names): Add no-follow-links option.
	(dwarf_select_sections_by_letter): Add 'N' option.
	* objdump.c (usage): Add conditional text describing the
	follow links option.
	(slurp_symtab): Ensure that there is a NULL entry at the end
	of the symbol table.
	(slurp_dynamic_symtab): Likewise.
	(dump_bfd): When extending the symbol table, ensure that there
	is still a NULL entry at the end.
	* readelf.c (usage): Add conditional text describing the
	follow links option.
	* doc/binutils.texi: Update documentation for objcopy and
	readelf.
	* doc/debug.options.texi: Update documentation of the
	follow-links option.
	* config.in: Regenerate.
	* configure: Regenerate.
	* testsuite/binutils-all/compress.exp: Add the -WN option to
	objdump command lines that are not expecting to follow links.
	* testsuite/binutils-all/readelf.exp: Add the
	--debug-dump=no-follow-links option to tests that are not
	expecting to follow debug links.

gas	* testsuite/gas/mach-o/sections-1.d: Stop automatic debug link
        following.
	* testsuite/gas/xgate/insns-dwarf2.d: Likewise.

ld	* testsuite/ld-elf/sec64k.exp: Stop readelf from automatically
	following debug links.
2021-02-12 14:52:22 +00:00
Alan Modra
3c1d41015b gas testsuite: adjust recently added tests for hppa
Some hppa gas targets treat anything starting in the first column as a
label, so directives can't start there.  Also, binutils_assemble and
run_dump_test cleverly edit test source to suit the hppa .comm
directive which has a different syntax to most targets.  The editing
means we can't match source file names in dumps.  Finally, hppa gas
complains if instructions are emitted without a ".text" or similar
directive.

	* testsuite/gas/all/pr27381.err: Don't match source file name.
	* testsuite/gas/all/pr27381.s: Don't start directive in first column.
	* testsuite/gas/all/pr27384.err: Don't match source file name.
	Adjust line number.
	* testsuite/gas/all/pr27384.s: Add ".text" directive.
	* testsuite/gas/elf/pr27355.err: Don't match source file name.
2021-02-12 18:54:19 +10:30
Alan Modra
933feaf37e Re: Remove arm-symbianelf
gas/
	* NEWS: Mention arm-symbianelf removal.
ld/
	* NEWS: Mention arm-symbianelf removal.
2021-02-11 07:22:20 +10:30
Nick Clifton
01e8b831f5 Remove debugging code accidentally included with the fix for PR 27384
* listing.c (buffer_line): Remove debugging code accidentally
	included with the fix for PR 27384.
2021-02-10 09:56:33 +00:00
Nick Clifton
284beb431f Add a sanity check of files include by .incbin.
PR 27381
	* read.c (s_incbin): Check that the file to be included is a
	regular, non-directory file.
	* testsuite/gas/all/pr27381.s: New test source file.
	* testsuite/gas/all/pr27381.d: New test control file.
	* testsuite/gas/all/pr27381.err: Expected error output for the new test.
	* testsuite/gas/all/gas.exp: Run the new test.
2021-02-09 14:22:23 +00:00
Alan Modra
a57d17732e Remove arm-symbianelf
* configure.ac: Delete arm*-*-symbianelf* entry.
	* configure: Regenerate.
bfd/
	* config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
	* configure.ac: Delete symbian entries.
	* elf-bfd.h (enum elf_target_os): Delete is_symbian.
	* elf32-arm.c: Remove symbian support.  Formatting.
	* targets.c: Delete symbian entries.
	* configure: Regenerate.
binutils/
	* testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
	symbianelf.
gas/
	* Makefile.am (TARG_ENV_HFILES): Remove config/te-symbian.h.
	* config/tc-arm.c (elf32_arm_target_format): Remove TE_SYMBIAN
	support.
	* config/te-symbian.h: Delete.
	* configure.tgt: Remove arm-*-symbianelf*.
	* testsuite/gas/arm/arch4t-eabi.d: Don't mention symbianelf in
	target selection.
	* testsuite/gas/arm/arch4t.d: Likewise.
	* testsuite/gas/arm/got_prel.d: Likewise.
	* testsuite/gas/arm/mapdir.d: Likewise.
	* testsuite/gas/arm/mapmisc.d: Likewise.
	* testsuite/gas/arm/mapsecs.d: Likewise.
	* testsuite/gas/arm/mapshort-eabi.d: Likewise.
	* testsuite/gas/arm/thumb-eabi.d: Likewise.
	* testsuite/gas/arm/thumb.d: Likewise.
	* testsuite/gas/arm/thumbrel.d: Likewise.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am (ALL_EMULATION_SOURCES): Remove earmsymbian.c.
	Don't include symbian dep file.
	* configure.tgt: Remove arm*-*-symbianelf* entry.
	* emulparams/armsymbian.sh: Delete.
	* ld.texi: Don't mention symbian.
	* scripttempl/armbpabi.sc: Delete.
	* testsuite/ld-arm/symbian-seg1.d: Delete.
	* testsuite/ld-arm/symbian-seg1.s: Delete.
	* testsuite/ld-arm/arm-elf.exp: Don't run symbian-seg1.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2021-02-09 23:36:16 +10:30
Nick Clifton
4a68fcd7f7 Prevent a bad .Psize expression from triggering a memory access violation.
PR 27384
	* listing.c (listing_psize): Check the result of the width
	expression before assigning it to paper_width.
	* testsuite/gas/all/pr27384.s: New test source file.
	* testsuite/gas/all/pr27384.d: New test control file.
	* testsuite/gas/all/pr27384.err: Expected errors from new test.
	* testsuite/gas/all/gas.exp: Run the new test.
2021-02-09 12:53:32 +00:00
Nick Clifton
52563b0f1c Add a test for PR 27355 - where corrupt assembler .file directives could trigger a segmentation fault.
PR 27355
	* testsuite/gas/elf/pr27355.s: New test source file.
	* testsuite/gas/elf/pr27355.d: New test control file.
	* testsuite/gas/elf/pr27355.err: Expected errors from new test.
	* testsuite/gas/elf/elf.exp: Run the new test.
2021-02-09 10:51:40 +00:00
Mike Frysinger
bfd428bc12 opcodes: tic54x: namespace exported variables
The tic54x exports some fairly generic variable names that can
conflict with programs that use them, so put proper tic54x_
prefixes on all of them.
2021-02-08 18:26:08 -05:00
Nick Clifton
80b652efa2 Fix an illegal memory access when parsing a corrupt assembler file.
PR 27355
	* dwarf2dbg.c (allocate_filename_to_slot): Allocate the dirs array
	if it has not already been created.
2021-02-08 18:31:21 +00:00
Nelson Chu
24075dcc85 RISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions.
bfd/
    * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
gas/
    * config/tc-riscv.c (riscv_multi_subset_supports): Removed
    INSN_CLASS_ZB*.
    * testsuite/gas/riscv/bitmanip-insns-32.d: Removed.
    * testsuite/gas/riscv/bitmanip-insns-64.d: Removed.
    * testsuite/gas/riscv/bitmanip-insns.s: Removed.
include/
    * opcode/riscv-opc.h: Removed macros for zb* extensions.
    * opcode/riscv.h (riscv_insn_class): Removed INSN_CLASS_ZB*.
opcodes/
    * riscv-opc.c (MASK_RVB_IMM): Removed.
    (riscv_opcodes): Removed zb* instructions.
    (riscv_ext_version_table): Removed versions for zb*.
2021-02-04 16:52:13 +08:00
Andreas Krebbel
61ecbbae8e IBM Z: Add missing vector formats to .insn docs
gas/

	* doc/c-s390.texi: Document vector instruction formats.
2021-02-03 12:35:33 +01:00
Emery Hemingway
1f568f9a0d Add Genode target support
* configure.tgt: Add *-*-genode* as a target for AArch64 and x86.
2021-02-01 17:31:47 +00:00
Alan Modra
7bba67ec7c PR27283 gas for alpha fails to build with gcc 11
PR 27283
	* config/tc-alpha.c (insert_operand): Delete dead code.
2021-02-01 18:35:33 +10:30
H.J. Lu
1f583bc2fc nios2: Don't disable relaxation with --gdwarf-N
GCC 11 passes --gdwarf-5 to assembler to enable DWARF5 debug info.  Don't
disable relaxation when --gdwarf-N is specified.  The assembler generated
debug information will treat the sequence of the relaxed instructions as
a single instruction.

	PR gas/27243
	* config/tc-nios2.c (md_begin): Don't disable relaxation with
	--gdwarf-N.
	* testsuite/gas/nios2/relax.d: New file.
	* testsuite/gas/nios2/relax.s: Likewise.
2021-01-26 08:18:52 -08:00
Alan Modra
a45ef9a30b gas testsuite tidy
This replaces skip and notarget in a number of gas tests with xfail,
the idea being that running tests might expose segmentation faults or
other serious errors even when we don't expect a test to pass.  Doing
so showed a number of cases where tests now pass, which is another
reason to avoid profligate use of notarget and skip.

	* testsuite/gas/all/local-label-overflow.d: Use xfail rather than
	notarget all except hppa.  Comment.
	* testsuite/gas/all/sleb128-2.d: Use xfail rather than notarget.
	* testsuite/gas/all/sleb128-4.d: Likewise.  Don't skip msp430.
	* testsuite/gas/all/sleb128-5.d: Use xfail rather than notarget.
	* testsuite/gas/all/sleb128-7.d: Likewise.
	* testsuite/gas/all/sleb128-9.d: Likewise.
	* testsuite/gas/elf/bignums.d: Likewise.
	* testsuite/gas/elf/group0c.d: Likewise.
	* testsuite/gas/elf/group1a.d: Likewise.
	* testsuite/gas/elf/section-symbol-redef.d: Likewise.
	* testsuite/gas/elf/section15.d: Likewise.
	* testsuite/gas/elf/section4.d: Likewise.
	* testsuite/gas/elf/section7.d: Likewise.
	* testsuite/gas/macros/irp.d: Likewise.
	* testsuite/gas/macros/repeat.d: Likewise.
	* testsuite/gas/macros/rept.d: Likewise.
	* testsuite/gas/macros/test2.d: Likewise.
	* testsuite/gas/macros/vararg.d: Likewise.
	* testsuite/gas/all/string.d: Use xfail rather than skip.
	* testsuite/gas/elf/missing-build-notes.d: Likewise.
	* testsuite/gas/elf/section0.d: Likewise.
	* testsuite/gas/elf/section1.d: Likewise.
	* testsuite/gas/elf/section10.d: Likewise.
	* testsuite/gas/elf/section11.d: Likewise.
	* testsuite/gas/elf/section6.d: Likewise.
	* testsuite/gas/elf/symtab.d: Use xfail rather than skip, adjust hppa.
	* testsuite/gas/elf/symtab.s: Don't start directives in first column.
	* testsuite/gas/macros/test3.d: Don't notarget nds32.
2021-01-26 20:54:43 +10:30
Alan Modra
9886ff0319 gas byte test
skip *-*-* is a little silly, delete the test.

	* testsuite/gas/all/byte.d,
	* testsuite/gas/all/byte.l,
	* testsuite/gas/all/byte.s: Delete.
	* testsuite/gas/all/gas.exp: Don't run byte test.
2021-01-26 20:54:43 +10:30
Alan Modra
4287950e54 pr27228 testcase
This failed on ft32, hppa, and mips-irix targets.  In the case of ft32
the problem was iterating over an array in reverse and not using the
proper condition, so BFD_RELOC_NONE was not recognised.

bfd/
	* elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
gas/
	PR 27282
	* testsuite/gas/all/none.d: Replace skip with xfail, don't xfail ft32.
	* testsuite/gas/elf/pr27228.d: xfail hppa and allow OBJECT match.
2021-01-26 20:54:43 +10:30
H.J. Lu
eea133e655 gas: Add a testcase for PR gas/27228
PR gas/27228
	* testsuite/gas/elf/elf.exp: Run pr27228.
	* testsuite/gas/elf/pr27228.d: New file.
	* testsuite/gas/elf/pr27228.s: Likewise.
2021-01-24 04:14:30 -08:00
Alan Modra
68fcee4fa7 PR27228, .reloc wrong symbol emitted for undefined local symbol
Local symbols are of course supposed to be defined by their object
file, but in other cases a local symbol is promoted to global by gas
if undefined and referenced.  This patch stops gas wrongly replacing a
local undefined symbol with the undefined section symbol, resulting in
a .reloc undefined local symbol being emitted as global.

	PR 27228
	* write.c (resolve_reloc_expr_symbols): Don't assume local symbol
	is defined.
2021-01-24 16:16:45 +10:30
Alan Modra
be07043ea8 PR27221, 058430b4a1 warnings while assembling the Linux kernel
PR 27221
	* dwarf2dbg.c (dwarf2_gen_line_info_1): Don't warn about ignored
	line number info when gas is generating it.
	* testsuite/gas/elf/dwarf2-20.d: Adjust to not expect warnings.
	* testsuite/gas/m68hc11/indexed12.d: Likewise.
	* testsuite/gas/elf/elf.exp: Don't run warn-2.
	* gas/testsuite/gas/elf/warn-2.s: Delete.
2021-01-21 19:10:15 +10:30
Alan Modra
498ff0328f PR27218, memory access violation in dwarf2dbg.c
PR 27218
	* dwarf2dbg.c (dwarf2_gen_line_info): Correct setting of dwarf_level.
	(dwarf2_directive_filename, dwarf2_directive_loc): Likewise, and
	error for negative file numbers.
2021-01-21 19:10:15 +10:30
Alan Modra
4bd7c90276 PowerPC: Don't generate unused section symbols
PowerPC version of git commit d1bcae833b.

bfd/
	* elf32-ppc.c: Delete outdated comment.
	(TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
	* elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
gas/
	* testsuite/gas/ppc/power4.d: Adjust for removal of section sym.
	* testsuite/gas/ppc/test1elf32.d: Likewise.
	* testsuite/gas/ppc/test1elf64.d: Likewise.
ld/
	* testsuite/ld-powerpc/relbrlt.s: Make symbols global.
	* testsuite/ld-powerpc/relbrlt.d: Adjust to suit.
	* testsuite/ld-powerpc/tlsget.d: Adjust for reordered stubs.
	* testsuite/ld-powerpc/tlsget.wf: Likewise.
	* testsuite/ld-powerpc/tlsget2.d: Likewise.
	* testsuite/ld-powerpc/tlsget2.wf: Likewise.
	* testsuite/ld-powerpc/tlsexe.r: Adjust for removed section syms.
	* testsuite/ld-powerpc/tlsexe32.r: Likewise.
	* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
	* testsuite/ld-powerpc/tlsexeno.r: Likewise.
	* testsuite/ld-powerpc/tlsexenors.r: Likewise.
	* testsuite/ld-powerpc/tlsexers.r: Likewise.
	* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
	* testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
	* testsuite/ld-powerpc/tlsso.r: Likewise.
	* testsuite/ld-powerpc/tlsso32.r: Likewise.
	* testsuite/ld-powerpc/tlstocso.r: Likewise.
2021-01-20 16:12:06 +10:30
H.J. Lu
705989f19a as: Automatically enable DWARF5 support
Currently

$ as -o x.o x.s

fails when x.s contains DWARF5 ".file 0" or ".loc 0" directives.  Update
assembler to automatically enable DWARF5 support so that

$ gcc -S -g -c x.c
$ gcc -c x.s

works.

	PR gas/27195
	* dwarf2dbg.c (dwarf2_gen_line_info): Set dwarf_level to 5 if
	needed.
	(dwarf2_directive_filename): Likewise.
	(dwarf2_directive_loc): Likewise.
	* testsuite/gas/elf/dwarf-5-file0.d: Pass --gdwarf-3.
	* testsuite/gas/lns/lns-diag-1.l: Remove the
	"Error: file number less than one" errors.
2021-01-18 06:25:17 -08:00
Alan Modra
44365e88c0 PR27198, segv in S_IS_WEAK
Fix a NULL dereference seen when assembling invalid input.

	PR 27198
	* config/tc-i386.c (need_plt32_p): Return FALSE for NULL symbol.
	* testsuite/gas/i386/pr27198.d,
	* gas/testsuite/gas/i386/pr27198.err,
	* gas/testsuite/gas/i386/pr27198.s: New test.
	* gas/testsuite/gas/i386/i386.exp: Run it.
2021-01-18 15:13:10 +10:30
Nelson Chu
1942a04836 RISC-V: Indent and GNU coding standards tidy, also aligned the code.
bfd/
    * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
    also aligned the code.
gas/
    * config/tc-riscv.c: Indent and GNU coding standards tidy,
    also aligned the code.
    * config/tc-riscv.h: Likewise.
include/
    * opcode/riscv.h: Indent and GNU coding standards tidy,
    also aligned the code.
opcodes/
    * riscv-opc.c (riscv_gpr_names_abi): Aligned the code.
    (riscv_fpr_names_abi): Likewise.
    (riscv_opcodes): Likewise.
    (riscv_insn_types): Likewise.
2021-01-15 17:41:18 +08:00
Nelson Chu
b800637e76 RISC-V: Error and warning messages tidy.
Error and warning messages usually starting with lower case letter,
and without the period at the end.  Besides, add the prefixed "internel:"
at the beginning of the messages when they are caused internally.
Also fix indents and typos.

bfd/
    * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
gas/
    * config/tc-riscv.c: Error and warning messages tidy.
    * testsuite/gas/riscv/priv-reg-fail-fext.l: Updated.
    * testsuite/gas/riscv/priv-reg-fail-read-only-01.l: Likewise.
    * testsuite/gas/riscv/priv-reg-fail-read-only-02.l: Likewise.
    * testsuite/gas/riscv/priv-reg-fail-rv32-only.l: Likewise.
    * testsuite/gas/riscv/priv-reg-fail-version-1p10.l: Likewise.
    * testsuite/gas/riscv/priv-reg-fail-version-1p11.l: Likewise.
    * testsuite/gas/riscv/priv-reg-fail-version-1p9p1.l: Likewise.
ld/
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Updated.
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d: Likewise.
opcodes/
    * riscv-dis.c (parse_riscv_dis_option): Fix typos of message.
2021-01-15 17:33:59 +08:00
Nelson Chu
dcd709e056 RISC-V: Comments tidy and improvement.
The GNU coding standards said the comments should be complete sentences
and end with a period and two spaces.  But sometimes it should be more
cleaner when the comments only include a word or codes.  Therefore, I made
the following changes after referring to other target/generic codes,

* Try to write sentences in comments, must end with a period and two spaces.
* End with two spaces without a period for codes/instructions only.
* End with one space without a period for a single word/variable only.

Besids, also rewrite/remove some comments which are obsolete or too long,
and fix indents for comments.

bfd/
    * elfnn-riscv.c: Comments tidy and improvement.
    * elfxx-riscv.c: Likewise.
    * elfxx-riscv.h: Likewise.
gas/
    * config/tc-riscv.c: Comments tidy and improvement.  Also update
    comment "fallthru" to "Fall through" that end with a period and
    two spaces.
include/
    * elf/riscv.h: Comments tidy and improvement.
    * opcode/riscv-opc.h: Likewise.
    * opcode/riscv.h: Likewise.
opcodes/
    * riscv-dis.c: Comments tidy and improvement.
    * riscv-opc.c: Likewise.
2021-01-15 17:28:07 +08:00
Mike Frysinger
5fda40b28f gas: make [248]byte directives available everywhere
These aren't specific to ELF at all, and seem generally useful.
So pull them out of the ELF backend and into the common core.
2021-01-14 20:43:40 -05:00
Mike Frysinger
abad28152e gas: bfin: build lexer with -Werror
The makefile has comments about old versions of bison/yacc generating
warnings, but that doesn't apply to the lexer which comes from flex.
As far as I can tell, the warnings in the Blackfin lexer can be fixed
with defines that have been supported back through flex in 2002.  So
lets turn on -Werror for it and see if anyone notices.  If they do,
they can report their exact tool versions so we can record that here.
2021-01-14 01:07:13 -05:00
Mike Frysinger
adb0bd8fda gas: bfin: fix build time warnings 2021-01-14 00:53:13 -05:00
H.J. Lu
844bf810cf x86: Don't generate GOT_symbol for PLT relocations
Don't generate the _GLOBAL_OFFSET_TABLE_ symbol for PLT relocations
since it isn't needed.

	PR gas/27178
	* config/tc-i386.c (lex_got::gotrel): Add need_GOT_symbol.
	Don't generate GOT_symbol for PLT relocations.
	* testsuite/gas/i386/i386.exp: Run PR gas/27178 tests.
	* testsuite/gas/i386/no-got.d: New file.
	* testsuite/gas/i386/no-got.s: Likewise.
	* testsuite/gas/i386/x86-64-no-got.d: Likewise.
	* testsuite/gas/i386/x86-64-no-got.s: Likewise.
2021-01-13 05:42:27 -08:00
Alan Modra
5347ed60c5 Regen Makefile.in for jobserver.m4 aclocal.m4 dependency
bfd/
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
binutils/
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
gas/
	* Makefile.in: Regenerate.
	* Makefile.in: Regenerate.
gprof/
	* Makefile.in: Regenerate.
ld/
	* Makefile.in: Regenerate.
libctf/
	* Makefile.in: Regenerate.
opcodes/
	* Makefile.in: Regenerate.
2021-01-13 22:06:02 +10:30
H.J. Lu
d546b61084 Implement a workaround for GNU mak jobserver
Compiling binutils using -flto=jobserver with GCC 11 leads to

libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wwrite-strings -I../../gas/../zlib -g -O2 -fprofile-generate -flto=jobserver -o as-new app.o as.o atof-generic.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o config/tc-i386.o config/obj-elf.o config/atof-ieee.o  ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a -L/tmp/binutils-gdb/objdir/zlib -lz ../libiberty/libiberty.a -ldl
lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS'

since the '+' is missing on the recipe line in Makefiles generated by
automake.  Add the '+' to the recipe line by hand.

bfd/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

binutils/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

config/

	PR binutils/26792
	* jobserver.m4: New file.

gas/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

gprof/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

ld/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

libctf/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.

opcodes/

	PR binutils/26792
	* configure.ac: Use GNU_MAKE_JOBSERVER.
	* aclocal.m4: Regenerated.
	* configure: Likewise.
2021-01-12 05:45:44 -08:00
Nick Clifton
6d104cac0a Updated translations for some subdirectories 2021-01-12 13:18:50 +00:00
H.J. Lu
83b33c6cb9 Binutils: Check if AR works with --plugin and rc
Check if AR works with --plugin and rc before passing --plugin to AR and
RANLIB.

bfd/

	PR ld/27173

binutils/

	PR ld/27173
	* configure: Regenerated.

gas/

	PR ld/27173
	* configure: Regenerated.

gprof/

	PR ld/27173
	* configure: Regenerated.

ld/

	PR ld/27173
	* configure: Regenerated.

libctf/

	PR ld/27173
	* configure: Regenerated.

opcodes/

	PR ld/27173
	* configure: Regenerated.
2021-01-11 16:29:45 -08:00
Kyrylo Tkachov
82c70b08df aarch64: Remove support for CSRE
This patch removes support for the CSRE extension from aarch64
gas/objdump.
CSRE (FEAT_CSRE) is part of the Future Architecture Technologies program
and at this time Arm is withdrawing this particular feature.

The patch removes the system registers and the CSR PDEC instruction.

gas/ChangeLog
	* NEWS: Remove CSRE.
	* config/tc-aarch64.c (parse_csr_operand): Delete.
	(parse_operands): Delete handling of AARCH64_OPND_CSRE_CSR.
	(aarch64_features): Remove csre.
	* doc/c-aarch64.texi: Remove CSRE.
	* testsuite/gas/aarch64/csre.d: Delete.
	* testsuite/gas/aarch64/csre-invalid.s: Likewise.
	* testsuite/gas/aarch64/csre-invalid.d: Likewise.
	* testsuite/gas/aarch64/csre_csr.s: Likewise.
	* testsuite/gas/aarch64/csre_csr.d: Likewise.
	* testsuite/gas/aarch64/csre_csr-invalid.s: Likewise.
	* testsuite/gas/aarch64/csre_csr-invalid.l: Likewise.
	* testsuite/gas/aarch64/csre_csr-invalid.d: Likewise.

include/ChangeLog

	* opcode/aarch64.h (AARCH64_FEATURE_CSRE): Delete.
	(aarch64_opnd): Delete AARCH64_OPND_CSRE_CSR.

opcodes/ChangeLog

	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Likewise.
	* aarch64-opc-2.c: Likewise.
	* aarch64-opc.c (aarch64_print_operand): Delete handling of
	AARCH64_OPND_CSRE_CSR.
	* aarch64-tbl.h (aarch64_feature_csre): Delete.
	(CSRE): Likewise.
	(_CSRE_INSN): Likewise.
	(aarch64_opcode_table): Delete csr.
2021-01-11 15:01:09 +00:00
Nick Clifton
a8aa72b913 Updated translations for multiple subdirectories 2021-01-11 12:55:33 +00:00
H.J. Lu
a4966cd965 Binutils: Pass --plugin to AR and RANLIB
Detect GCC LTO plugin.  Pass --plugin to AR and RANLIB to support LTO
build.

bfd/

	* configure: Regenerated.

binutils/

	* configure: Regenerated.

gas/

	* configure: Regenerated.

gprof/

	* configure: Regenerated.

ld/

	* configure: Regenerated.

libctf/

	* configure: Regenerated.

opcodes/

	* configure: Regenerated.
2021-01-09 06:51:51 -08:00
Nick Clifton
573fe3fbc1 Change version number to 2.36.50 and regenerate files 2021-01-09 11:01:01 +00:00
Nick Clifton
055bc77a80 Add Changelog entries and NEWS entries for 2.36 branch 2021-01-09 10:40:28 +00:00
Peter Bergner
aae7fcb8d7 POWER10: Add Return-Oriented Programming instructions
POWER10 adds some return-oriented programming (ROP) instructions and
this patch adds support for them.  You will notice that they are enabled
for POWER8 and later, not just POWER10 and later.  This is on purpose.
This allows the instructions to be added to POWER8 binaries that can be
run on POWER8, POWER9 and POWER10 cpus.  On POWER8 and POWER9, these
instructions just act as nop's.

opcodes/
	* ppc-opc.c (insert_dw, (extract_dw): New functions.
	(DW, (XRC_MASK): Define.
	(powerpc_opcodes) <hashchk, hashchkp, hashst, haststp>: New mnemonics.
gas/
	* testsuite/gas/ppc/rop-checks.d,
	* testsuite/gas/ppc/rop-checks.l,
	* testsuite/gas/ppc/rop-checks.s,
	* testsuite/gas/ppc/rop.d,
	* testsuite/gas/ppc/rop.s: New tests.
	* testsuite/gas/ppc/ppc.exp: Run them.
2021-01-09 15:16:13 +10:30