Commit Graph

858 Commits

Author SHA1 Message Date
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 fb70ec1714 Reinstate readelf decoding of i860 and i960 machine names
Decoding of EM_* ought to continue.

	* readelf.c (get_machine_name): Revert 2018-04-11 change.
2018-04-14 10:50:16 +09:30
Nick Clifton 86c6c6df00 Fix the loading of the dynamic string table in a file without sections.
PR 23050
	* readelf.c (process_dynamic_section): Correct dynamic string
	table size calculation.
2018-04-12 15:41:07 +01:00
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
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
H.J. Lu b1202ffa53 DT_FLAGS_1: Add Solaris bits
The following bits in DT_FLAGS_1 are used by Solaris:

 #define DF_1_KMOD       0x10000000 /* kernel module */
 #define DF_1_WEAKFILTER 0x20000000 /* apply weak binding to DT_FILTER */
 #define DF_1_NOCOMMON   0x40000000 /* no COMMON symbols exist */

binutils/

	* readelf.c (process_dynamic_section): Also dump DF_1_KMOD,
	DF_1_WEAKFILTER and DF_1_NOCOMMON.

include/

	* elf/common.h (DF_1_KMOD): New.
	(DF_1_WEAKFILTER): Likewise.
	(DF_1_NOCOMMON): Likewise.
2018-03-21 12:55:52 -07:00
Paul Pluzhnikov 6d4f21f6ee Fix PR binutils/22923.
A static buffer in get_ver_flags may overflow when e.g. German translation
is longer than English original. Avoid that by expanding the buffer.
2018-03-07 18:18:25 -08:00
Nick Clifton 68807c3cd6 Replace reachable assertion with a test and return of NULL.
PR 22793
	* readelf.c (find_section): Replace assertion with test and return
	of NULL.
	(find_section_by_address): Add test of section header table
	existance.
	(find_section_by_type): Likewise.
	(find_section_in_set): Likewise.
2018-02-06 16:05:13 +00:00
Nick Clifton 6f156d7a4a Add support for v3 binary annotation notes.
I am checking in the attached patch which updates the binutils
  support for version 3 binary annotation notes.  (Version 3 adds
  an end address to the ranges covered by the notes, so that it
  is possible to detect gaps in the coverage).

  This patch also stops the note merging feature of objcopy from
  executing if the notes have relocations against them.  This makes the
  code simpler, and prevents the problems with architectures which have
  unusual relocation management issues.

	* objcopy.c (objcopy_internal_note): New structure.
	(gap_exists): New function.
	(is_open_note): New function.
	(is_func_note): New function.
	(is_64bit): New function.
	(merge_gnu_build_notes): Handle v3 notes.  Do not merge
	if there are relocations against the notes.
	* readelf.c (get_note_type): Use short names for build attribute
	notes.
	(print_symbol_for_build_attribute): Rename to
	get_symbol_for_build_attribute.  Returns the found symbol rather
	than printing it.
	(print_gnu_build_attribute_description): Maintain address ranges
	for function notes as well as global notes.  Handle v3 notes.
	(print_gnu_build_attribute_name): Use more space for printing the
	name in wide mode.
	* testsuite/binutils-all/note-2-32.s: Use .dc.l instead of .word.
	Eliminate symbol references in order to remove the need for
	relocations.
	* testsuite/binutils-all/note-2-64.s: Likewise.
	* testsuite/binutils-all/note-3-32.s: Add a size to the note_1
	symbol.
	* testsuite/binutils-all/note-3-64.s: Likewise.
	* testsuite/binutils-all/mips/mips-note-2r-n32.d: Update expected
	output.
	* testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2r.d: Likewise.
	* testsuite/binutils-all/note-2-32.d: Likewise.
	* testsuite/binutils-all/note-2-64.d: Likewise.
	* testsuite/binutils-all/note-3-32.d: Likewise.
	* testsuite/binutils-all/note-3-64.d: Likewise.
	* testsuite/binutils-all/note-4-64.s: New test.  Checks v3 notes.
	* testsuite/binutils-all/note-4-32.s: New test.
	* testsuite/binutils-all/note-4-64.d: New test result file.
	* testsuite/binutils-all/note-4-32.d: New test result file.
2018-01-03 10:30:07 +00:00
Alan Modra 219d1afa89 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
Nick Clifton bef7475fbd Stop readelf from complaining about relocation sections with an sh_info field of 0 in dynamic executables.
PR 22587
	* readelf.c (process_section_headers): Do not complain about an
	sh_info field of 0 in relocation sections of ET_EXEC or ET_DYN
	type executables.
2017-12-19 09:48:40 +00:00
Alan Modra 9c1ce10850 PR22552, readelf heap buffer overflow in load_debug_section
PR 22552
	* readelf.c (process_file_header): Don't assume XINDEX case
	value for e_shstrndx is within bounds.
	(load_debug_section): Sanity test e_shstrndx before attempting
	to read .shstrtab.  Wrap long lines.
2017-12-06 18:05:18 +10:30
Nick Clifton f425ec6600 Prevent an illegal memory access in readelf when attempting to parse a corrupt ELF file.
PR 22510
	* readelf.c (load_debug_section): Fail if there are no section
	headers available.
2017-11-30 10:25:01 +00:00
H.J. Lu 82ed9683ec Properly handle note sections and segments
When dumping notes, get note alignment from either note section or note
segment.  To support notes generated by assemblers with

https://sourceware.org/bugzilla/show_bug.cgi?id=22492

we treate alignment as 4 bytes if it is less than 4.  Otherwise, we skip
notes if alignment isn't 4 nor 8 bytes.

We should call load_separate_debug_file only if e_shstrndx != SHN_UNDEF.

	PR binutils/22490
	* readelf.c (process_notes_at): Add an argument for note
	alignment.  If note alignment is less than 4, use 4 byte
	alignment.  Otherwise, skip notes if alignment isn't 4 nor
	8 bytes.
	(process_corefile_note_segments): Pass segment alignment to
	process_notes_at.
	(process_note_sections): Pass section alignment to
	process_notes_at.
	(process_object): Call load_separate_debug_file only if
	e_shstrndx != SHN_UNDEF.
2017-11-28 08:18:46 -08:00
Nick Clifton 4dff97b2ce Fix a seg-fault when displaying notes from a prorgam segment. Check for a NULL string section before attempting compute the name of a separate debug info file.
PR 22490
	* readelf.c (dump_section_as_bytes): Check for a NULL string
	section pointer.
	(process_notes_at): Compute the alignment to use if displaying
	notes from a segment.
2017-11-27 11:05:39 +00:00
H.J. Lu 276da9b31b Re-apply "elf: Properly compute offsets of note descriptor and next note"
CORE PT_NOTE segments may have p_align values of 0 or 1.  gABI specifies
that PT_NOTE alignment should be aligned to 4 bytes for 32-bit objects
and to 8 bytes for 64-bit objects.  If segment alignment is less than 4,
we use 4 byte alignment.
2017-11-24 14:52:15 -08:00
Simon Marchi 4e25ac038e Revert "elf: Properly compute offsets of note descriptor and next note"
This reverts commit 650444eb54.

With this patch, running the GDB test case gdb.base/auxv.exp is stuck in
an infinite loop, consuming memory to the point that it renders the
machine unusable. I am reverting it so we can take our time to
investigate while not killing all the developers' machines.
2017-11-24 15:43:51 -05:00
H.J. Lu 650444eb54 elf: Properly compute offsets of note descriptor and next note
According to gABI, in a note entry, the note name field, not note name
size, is padded for the note descriptor.  And the note descriptor field,
not note descriptor size, is padded for the next note entry.  Also notes
are aligned to 4 bytes in 32-bit objects and 8 bytes in 64-bit objects.
Since on Linux, .note.ABI-tag and .note.gnu.build-id notes are always
aligned to 4 bytes, we need to use alignment of note section or note
segment, instead of assuming alignment based on ELF file class.

Tested on i686 and x86-64.

bfd/

	PR binutils/22444
	* elf.c (elf_read_notes): Add an argument for note aligment.
	(elf_parse_notes): Likewise.
	(_bfd_elf_make_section_from_shdr): Pass section aligment to
	elf_parse_notes.
	(bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
	(elf_parse_notes): Add an argument for note aligment.  Use
	ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
	Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
	entry.
	(elf_read_notes): Add an argument for note aligment and pass it
	to elf_parse_notes.

binutils/

	PR binutils/22444
	* readelf.c (process_notes_at): Use ELF_NOTE_DESC_OFFSET to get
	the offset of the note descriptor.  Use ELF_NOTE_NEXT_OFFSET to
	get the offset of the next note entry.

include/

	PR binutils/22444
	* elf/external.h (ELF_ALIGN_UP): New.
	(ELF_NOTE_DESC_OFFSET): Likewise.
	(ELF_NOTE_NEXT_OFFSET): Likewise.
2017-11-24 06:41:52 -08:00
Pavel I. Kryukov eb02c04dc3 Avoid bogus compile time warning from clang by initialising local data structure using memset.
PR 22485
	* readelf.c (process_archive): Use memset to initiaise
	thin_filedata structure.
2017-11-23 15:53:04 +00:00
Nick Clifton d85bf2ba86 Add ability to follow dwo links to readelf/objdump.
* dwarf.c (dwo_name, dwo_dir, dwo_id, dwo_id_len): New variables.
	(read_and_display_attr_value): Record dwo variables if requested.
	(display_augmentation_data): Rename to display_data and make
	generic.
	(load_dwo_file): New function.  Loads a separate dwarf object
	file.
	(load_separate_debug_file): Add reporting and loading of separate
	dwarf objet files.
	* readelf.c (process_section_headers): Add do_debug_links to list
	of flags requiring a debug dump.
	(display_debug_section): Tidy up code.
	* doc/debug.options.texi: Add note that dwo links will also be
	followed.
	* testsuite/binutils-all/debuglink.s: Tidy code.
	* testsuite/binutils-all/dwo.s: New test file.
	* testsuite/binutils-all/readelf.wk2: New file - expected output
	from readelf.
	* testsuite/binutils-all/readelf.exp: Run the new test.
2017-11-21 13:12:04 +00:00
Jim Wilson 033366417d Finish fixing riscv gas lns-common-1 failure, and lns-duplicate.
binutils/
	* readelf.c (elf/riscv.h): Alphabetize include.
	(is_32bit_inplace_add_reloc, is_32bit_inplace_sub_reloc)
	(is_64bit_inplace_add_reloc, is_64bit_inplace_sub_reloc)
	(is_16bit_inplace_add_reloc, is_16bit_inplace_sub_reloc)
	(is_8bit_inplace_add_reloc, is_8bit_inplace_sub_reloc): New.
	(apply_relocations): New locals reloc_inplace and reloc_subtract.
	Call the new functions and set the new locals.  Call byte_get if
	reloc_inplace.  Subtract sym->st_value if reloc_subtract.
2017-11-17 14:47:52 -08:00
Nick Clifton 6a6196fc71 Fix a snafu in a previous update to readelf that stopped it from printing archive member names along with the archive file name.
--
This patch causes problems for glibc linknamespace tests because of how it
changes the output format of readelf on .a files.

Previously, "readelf -W -s libc.a" would produce output starting e.g.:

File: /scratch/jmyers/glibc/many8/build/glibcs/x86_64-linux-gnu/glibc/libc.a(init-first.o)

Symbol table '.symtab' contains 30 entries:

and continuing with symbol information for each object in that .a file.
After this commit, instead it starts:

File: /scratch/jmyers/glibc/many8/build/glibcs/x86_64-linux-gnu/glibc/libc.a

Symbol table '.symtab' contains 30 entries:

and every object's symbol information starts with the same File: line,
missing any information about which object's symbols (within libc.a) are
being listed.

I think the previous File: lines that said libc.a(init-first.o) etc.,
identifying the particular object within libc.a, were clearly preferable,
and the glibc linknamespace tests rely on having that information about
the individual object within libc.a.
--

binutils * readelf.c (process_archive): Include member name in the
	file_name of the filedata structure.
2017-11-17 12:05:34 +00:00
Nick Clifton dda8d76d0d Add support to readelf and objdump for following links to separate debug information files.
Hi Guys,

  I am applying the rather large patch attached to this email to enhance
  the readelf and objdump programs so that they now have the ability to
  follow links to separate debug info files.  (As requested by PR
  15152).  So for example whereas before we had this output:

    $ readelf -wi main.exe

    Contents of the .debug_info section:
    [...]
    <15>   DW_AT_comp_dir    : (alt indirect string, offset: 0x30c)
    [...]

  With the new option enabled we get:

    $ readelf -wiK main.exe

    main.exe: Found separate debug info file: dwz.debug
    Contents of the .debug_info section (loaded from main.exe):
    [...]
    <15>   DW_AT_comp_dir    : (alt indirect string, offset: 0x30c) /home/nickc/Downloads/dwzm
    [...]

  The link following feature also means that we can get two lots of
  output if the same section exists in both the main file and the
  separate debug info file:

    $ readelf -wiK main.exe
    main.exe: Found separate debug info file: dwz.debug
    Contents of the .debug_info section (loaded from main.exe):
    [...]
    Contents of the .debug_info section (loaded from dwz.debug):
    [...]

  The patch also adds the ability to display the contents of debuglink
  sections:

    $ readelf -wk main.exe
    Contents of the .gnu_debugaltlink section:

      Separate debug info file: dwz.debug
      Build-ID (0x14 bytes):
     c4 a8 89 8d 64 cf 70 8a 35 68 21 f2 ed 24 45 3e 18 7a 7a 93

  Naturally there are long versions of these options (=follow-links and
  =links).  The documentation has been updated as well, and since both
  readelf and objdump use the same set of debug display options, I have
  moved the text into a separate file.  There are also a couple of new
  binutils tests to exercise the new behaviour.

  There are a couple of missing features in the current patch however,
  although I do intend to address them in follow up submissions:

  Firstly the code does not check the build-id inside separate debug
  info files when it is searching for a file specified by a
  .gnu_debugaltlink section.  It just assumes that if the file is there,
  then it contains the information being sought.

  Secondly I have not checked the DWARF-5 version of these link
  features, so there will probably be code to add there.

  Thirdly I have only implemented link following for the
  DW_FORM_GNU_strp_alt format.  Other alternate formats (eg
  DW_FORM_GNU_ref_alt) have yet to be implemented.

  Lastly, whilst implementing this feature I found it necessary to move
  some of the global variables used by readelf (eg section_headers) into
  a structure that can be passed around.  I have moved all of the global
  variables that were necessary to get the patch working, but I need to
  complete the operation and move the remaining, file-specific variables
  (eg dynamic_strings).

Cheers
  Nick

binutils	PR 15152
	* dwarf.h (enum dwarf_section_display_enum): Add gnu_debuglink,
	gnu_debugaltlink and separate_debug_str.
	(struct dwarf_section): Add filename field.
	Add prototypes for load_separate_debug_file, close_debug_file and
	open_debug_file.
	* dwarf.c (do_debug_links): New.
	(do_follow_links): New.
	(separate_debug_file, separate_debug_filename): New.
	(fetch_alt_indirect_string): New function.  Retrieves a string
	from the debug string table in the separate debug info file.
	(read_and_display_attr_value): Use it with DW_FORM_GNU_strp_alt.
	(load_debug_section_with_follow): New function.  Like
	load_debug_section, but if the first attempt fails, then tries
	again in the separate debug info file.
	(introduce): New function.
	(process_debug_info): Use load_debug_section_with_follow and
	introduce.
	(load_debug_info): Likewise.
	(display_debug_lines_raw): Likewise.
	(display_debug_lines_decoded): Likewise.
	(display_debug_macinfo): Likewise.
	(display_debug_macro): Likewise.
	(display_debug_abbrev): Likewise.
	(display_debug_loc): Likewise.
	(display_debug_str): Likewise.
	(display_debug_aranges): Likewise.
	(display_debug_addr); Likewise.
	(display_debug_frames): Likewise.
	(display_gdb_index): Likewise.
	(process_cu_tu_index): Likewise.
	(load_cu_tu_indexes): Likewise.
	(display_debug_links): New function.  Displays the contents of a
	.gnu_debuglink or .gnu_debugaltlink section.
	(calc_gnu_debuglink_ctc32):New function.  Calculates a CRC32
	value.
	(check_gnu_debuglink): New function.  Checks the CRC of a
	potential separate debug info file.
	(parse_gnu_debuglink): New function.  Reads a CRC value out of a
	.gnu_debuglink section.
	(check_gnu_debugaltlink): New function.
	(parse_gnu_debugaltlink): New function.  Reads the build-id value
	out of a .gnu_debugaltlink section.
	(load_separate_debug_info): New function.  Finds and loads a
	separate debug info file.
	(load_separate_debug_file): New function. Attempts to find and
	follow a link to a separate debug info file.
	(free_debug_memory): Free the separate debug info file
	information.
	(opts_table): Add "follow-links" and "links".
	(dwarf_select_sections_by_letters): Add "k" and "K".
	(debug_displays): Reformat.  Add .gnu-debuglink and
	.gnu_debugaltlink.
	Add an extra entry for .debug_str in a separate debug info file.
	* doc/binutils.texi: Move description of debug dump features
	common to both readelf and objdump into...
	* objdump.c (usage): Add -Wk and -WK.
	(load_specific_debug_section): Initialise the filename field in
	the dwarf_section structure.
	(close_debug_file): New function.
	(open_debug_file): New function.
	(dump_dwarf): Load and dump the separate debug info sections.
	* readelf.c (struct filedata): New structure.  Contains various
	variables that used to be global:
	(current_file_size, string_table, string_table_length, elf_header)
	(section_headers, program_headers, dump_sects, num_dump_sects):
	Move into filedata structure.
	(cmdline): New global variable.  Contains list of sections to dump
	by number, as specified on the command line.
	Add filedata parameter to most functions.
	(load_debug_section): Load the string table if it has not already
	been retrieved.
	(close_file): New function.
	(close_debug_file): New function.
	(open_file): New function.
	(open_debug_file): New function.
	(process_object): Process sections in any separate debug info files.
	* doc/debug.options.texi: New file.  Add description of =links and
	=follow-links options.
	* NEWS: Mention the new feature.
	* elfcomm.c: Have the byte gte functions take a const pointer.
	* elfcomm.h: Update prototypes.
	* testsuite/binutils-all/dw5.W: Update expected output.
	* testsuite/binutils-all/objdump.WL: Update expected output.
	* testsuite/binutils-all/objdump.exp: Add test of -WK and -Wk.
	* testsuite/binutils-all/readelf.exp: Add test of -wK and -wk.
	* testsuite/binutils-all/readelf.k: New file.
	* testsuite/binutils-all/objdump.Wk: New file.
	* testsuite/binutils-all/objdump.WK2: New file.
	* testsuite/binutils-all/linkdebug.s: New file.
	* testsuite/binutils-all/debuglink.s: New file.

gas	* testsuite/gas/avr/large-debug-line-table.d: Update expected
	output.
	* testsuite/gas/elf/dwarf2-11.d: Likewise.
	* testsuite/gas/elf/dwarf2-12.d: Likewise.
	* testsuite/gas/elf/dwarf2-13.d: Likewise.
	* testsuite/gas/elf/dwarf2-14.d: Likewise.
	* testsuite/gas/elf/dwarf2-15.d: Likewise.
	* testsuite/gas/elf/dwarf2-16.d: Likewise.
	* testsuite/gas/elf/dwarf2-17.d: Likewise.
	* testsuite/gas/elf/dwarf2-18.d: Likewise.
	* testsuite/gas/elf/dwarf2-5.d: Likewise.
	* testsuite/gas/elf/dwarf2-6.d: Likewise.
	* testsuite/gas/elf/dwarf2-7.d: Likewise.

ld	* testsuite/ld-avr/gc-section-debugline.d: Update expected
	output.
2017-11-15 11:34:03 +00:00
Alan Modra d3a49aa80b readelf ngettext fixes
This patch is a first pass at fixing readelf message pluralization.
I've deliberately not fixed the "out of memory" errors since it's very
unlikely that they will ever be complaining about not being able to
allocate for a single entry, and a few others where the size is very
unlikely to be 1 byte.

Then there are messages like this one:
"Out of %lu items there are %zu bucket clashes (longest of %zu entries).\n"
I suppose this could be split into three parts, "Of %lu items ",
"there are %zu bucket clashes ", and "(longest of %zu entries).\n",
each part being printed separately, but that might not be ideal for
sentence construction in other languages.  For now I'm punting on this
one.

Changes to readelf output require lots of testsuite adjustment..

binutils/
	* dwarf.c (read_uleb128): Properly pluralize messages.
	(display_debug_lines_raw, display_debug_loc): Likewise.
	(display_debug_names, process_cu_tu_index): Likewise.
	* od-macho.c (dump_code_signature_superblob): Likewise.
	* readelf.c (process_program_headers): Likewise.
	(process_section_header, process_relocs): Likewise.
	(hppa_process_unwind, arm_process_unwind): Likewise.
	(process_dynamic_section, process_version_sections): Likewise.
	(process_symbol_table, process_syminfo): Likewise.
	(apply_relocations, process_mips_specific): Likewise.
	(process_gnu_liblist, process_notes_at): Likewise.
	(process_archive): Likewise.
	* testsuite/binutils-all/dw2-1.W,
	* testsuite/binutils-all/dw2-3.W,
	* testsuite/binutils-all/dw2-3gabi.W,
	* testsuite/binutils-all/dw5.S,
	* testsuite/binutils-all/dw5.W,
	* testsuite/binutils-all/i386/compressed-1a.d,
	* testsuite/binutils-all/libdw2-compressedgabi.out,
	* testsuite/binutils-all/objdump.W,
	* testsuite/binutils-all/readelf.r,
	* testsuite/binutils-all/readelf.r-64,
	* testsuite/binutils-all/x86-64/compressed-1a.d: Update
	for pluralization fixes.
gas/
	* testsuite/gas/arm/got_prel.d,
	* testsuite/gas/elf/dwarf2-1.d,
	* testsuite/gas/elf/dwarf2-2.d,
	* testsuite/gas/elf/dwarf2-3.d,
	* testsuite/gas/elf/dwarf2-5.d,
	* testsuite/gas/elf/dwarf2-6.d,
	* testsuite/gas/i386/debug1.d,
	* testsuite/gas/i386/dw2-compress-1.d,
	* testsuite/gas/i386/dw2-compress-3a.d,
	* testsuite/gas/i386/dw2-compress-3b.d,
	* testsuite/gas/i386/dw2-compressed-1.d,
	* testsuite/gas/i386/dw2-compressed-3a.d,
	* testsuite/gas/i386/dw2-compressed-3b.d,
	* testsuite/gas/i386/ilp32/x86-64-localpic.d,
	* testsuite/gas/i386/localpic.d,
	* testsuite/gas/i386/x86-64-localpic.d,
	* testsuite/gas/ia64/pr13167.d,
	* testsuite/gas/mips/loc-swap-2.d,
	* testsuite/gas/mips/loc-swap.d,
	* testsuite/gas/mips/micromips@loc-swap-2.d,
	* testsuite/gas/mips/micromips@loc-swap.d,
	* testsuite/gas/mips/mips16-dwarf2-n32.d,
	* testsuite/gas/mips/mips16-dwarf2.d,
	* testsuite/gas/mips/mips16@loc-swap-2.d,
	* testsuite/gas/mips/mips16@loc-swap.d,
	* testsuite/gas/mips/mips16e@loc-swap.d,
	* testsuite/gas/mmix/bspec-1.d,
	* testsuite/gas/mmix/bspec-2.d,
	* testsuite/gas/tic6x/unwind-1.d,
	* testsuite/gas/tic6x/unwind-2.d,
	* testsuite/gas/tic6x/unwind-3.d: Update for pluralization
	fixes.
ld/
	* testsuite/ld-aarch64/ifunc-13.d,
	* testsuite/ld-aarch64/ifunc-15.d,
	* testsuite/ld-aarch64/ifunc-20.d,
	* testsuite/ld-alpha/tlsbin.rd,
	* testsuite/ld-alpha/tlspic.rd,
	* testsuite/ld-arm/ifunc-3.rd,
	* testsuite/ld-arm/ifunc-9.rd,
	* testsuite/ld-arm/unwind-mix.d,
	* testsuite/ld-arm/unwind-rel.d,
	* testsuite/ld-cris/hiddef1.d,
	* testsuite/ld-cris/libdso-13.d,
	* testsuite/ld-cris/libdso-2.d,
	* testsuite/ld-cris/pr16044.d,
	* testsuite/ld-cris/tls-local-63.d,
	* testsuite/ld-cris/tls-local-64.d,
	* testsuite/ld-cris/tls-und-38.d,
	* testsuite/ld-cris/tls-und-42.d,
	* testsuite/ld-cris/tls-und-46.d,
	* testsuite/ld-cris/tls-und-50.d,
	* testsuite/ld-cris/weakref3.d,
	* testsuite/ld-cris/weakref4.d,
	* testsuite/ld-elf/comm-data2r.rd,
	* testsuite/ld-elf/discard1.d,
	* testsuite/ld-elf/discard2.d,
	* testsuite/ld-elf/pr19539.d,
	* testsuite/ld-elf/pr22374-1.r,
	* testsuite/ld-elf/pr22374-2.r,
	* testsuite/ld-i386/combreloc.d,
	* testsuite/ld-i386/emit-relocs-nacl.rd,
	* testsuite/ld-i386/emit-relocs.rd,
	* testsuite/ld-i386/pr13302.d,
	* testsuite/ld-i386/pr17709-nacl.rd,
	* testsuite/ld-i386/pr17709.rd,
	* testsuite/ld-i386/pr19539.d,
	* testsuite/ld-i386/pr19615.d,
	* testsuite/ld-i386/pr19636-1a.d,
	* testsuite/ld-i386/pr19636-1e.d,
	* testsuite/ld-i386/pr19636-1f.d,
	* testsuite/ld-i386/pr19636-2a.d,
	* testsuite/ld-i386/pr19636-2b.d,
	* testsuite/ld-i386/pr19636-2d-nacl.d,
	* testsuite/ld-i386/pr19636-2e-nacl.d,
	* testsuite/ld-i386/pr19636-3a.d,
	* testsuite/ld-i386/pr19636-3d.d,
	* testsuite/ld-i386/pr19636-3e.d,
	* testsuite/ld-i386/pr19636-4a.d,
	* testsuite/ld-i386/pr19645.d,
	* testsuite/ld-i386/pr19827-nacl.rd,
	* testsuite/ld-i386/pr19827.rd,
	* testsuite/ld-i386/pr20253-4a.d,
	* testsuite/ld-i386/pr20253-4b.d,
	* testsuite/ld-i386/pr20253-5.d,
	* testsuite/ld-i386/tlsbin-nacl.rd,
	* testsuite/ld-i386/tlsbin.rd,
	* testsuite/ld-i386/tlspic-nacl.rd,
	* testsuite/ld-i386/tlspic.rd,
	* testsuite/ld-i386/undefweakb.d,
	* testsuite/ld-ia64/tlsbin.rd,
	* testsuite/ld-ia64/tlspic.rd,
	* testsuite/ld-ifunc/ifunc-13-i386.d,
	* testsuite/ld-ifunc/ifunc-13-x86-64.d,
	* testsuite/ld-ifunc/ifunc-15-i386.d,
	* testsuite/ld-ifunc/ifunc-15-x86-64.d,
	* testsuite/ld-ifunc/ifunc-20-i386.d,
	* testsuite/ld-ifunc/ifunc-20-x86-64.d,
	* testsuite/ld-ifunc/ifunc-23a-x86.d,
	* testsuite/ld-ifunc/ifunc-23b-x86.d,
	* testsuite/ld-ifunc/ifunc-23c-x86.d,
	* testsuite/ld-ifunc/ifunc-24a-x86.d,
	* testsuite/ld-ifunc/ifunc-24b-x86.d,
	* testsuite/ld-ifunc/ifunc-24c-x86.d,
	* testsuite/ld-ifunc/ifunc-25a-x86.d,
	* testsuite/ld-ifunc/ifunc-25b-x86.d,
	* testsuite/ld-ifunc/ifunc-25c-x86.d,
	* testsuite/ld-m68k/got-1.d,
	* testsuite/ld-mips-elf/vxworks1.rd,
	* testsuite/ld-powerpc/ambiguousv1.d,
	* testsuite/ld-powerpc/ambiguousv1b.d,
	* testsuite/ld-powerpc/ambiguousv2.d,
	* testsuite/ld-powerpc/ambiguousv2b.d,
	* testsuite/ld-powerpc/tlsexe.r,
	* testsuite/ld-powerpc/tlsexe32.r,
	* testsuite/ld-powerpc/tlsexetoc.r,
	* testsuite/ld-powerpc/tlsso.r,
	* testsuite/ld-powerpc/tlsso32.r,
	* testsuite/ld-powerpc/tlstocso.r,
	* testsuite/ld-powerpc/vle-multiseg-1.d,
	* testsuite/ld-powerpc/vle-multiseg-2.d,
	* testsuite/ld-powerpc/vle-multiseg-3.d,
	* testsuite/ld-s390/tlsbin.rd,
	* testsuite/ld-s390/tlsbin_64.rd,
	* testsuite/ld-s390/tlspic.rd,
	* testsuite/ld-s390/tlspic_64.rd,
	* testsuite/ld-sh/ld-r-1.d,
	* testsuite/ld-sh/sh64/gotplt.d,
	* testsuite/ld-sh/shared-1.d,
	* testsuite/ld-sh/tlsbin-2.d,
	* testsuite/ld-sh/tlspic-2.d,
	* testsuite/ld-sparc/gotop32.rd,
	* testsuite/ld-sparc/gotop64.rd,
	* testsuite/ld-sparc/tlssunpic32.rd,
	* testsuite/ld-sparc/tlssunpic64.rd,
	* testsuite/ld-sparc/vxworks1-lib.rd,
	* testsuite/ld-tic6x/shlib-app-1.rd,
	* testsuite/ld-tic6x/shlib-app-1b.rd,
	* testsuite/ld-tic6x/shlib-app-1r.rd,
	* testsuite/ld-tic6x/shlib-app-1rb.rd,
	* testsuite/ld-tic6x/shlib-noindex.rd,
	* testsuite/ld-vax-elf/export-class-data.rd,
	* testsuite/ld-x86-64/pr13082-1a.d,
	* testsuite/ld-x86-64/pr13082-1b.d,
	* testsuite/ld-x86-64/pr13082-2a.d,
	* testsuite/ld-x86-64/pr13082-2b.d,
	* testsuite/ld-x86-64/pr13082-3a.d,
	* testsuite/ld-x86-64/pr13082-3c.d,
	* testsuite/ld-x86-64/pr13082-4a.d,
	* testsuite/ld-x86-64/pr13082-5a.d,
	* testsuite/ld-x86-64/pr13082-5b.d,
	* testsuite/ld-x86-64/pr13082-6a.d,
	* testsuite/ld-x86-64/pr13082-6b.d,
	* testsuite/ld-x86-64/pr17709-nacl.rd,
	* testsuite/ld-x86-64/pr17709.rd,
	* testsuite/ld-x86-64/pr19539a.d,
	* testsuite/ld-x86-64/pr19539b.d,
	* testsuite/ld-x86-64/pr19615.d,
	* testsuite/ld-x86-64/pr19636-1a.d,
	* testsuite/ld-x86-64/pr19636-1d.d,
	* testsuite/ld-x86-64/pr19636-1e.d,
	* testsuite/ld-x86-64/pr19636-2a.d,
	* testsuite/ld-x86-64/pr19636-2e.d,
	* testsuite/ld-x86-64/pr19636-2f.d,
	* testsuite/ld-x86-64/pr19636-3a.d,
	* testsuite/ld-x86-64/pr19645.d,
	* testsuite/ld-x86-64/pr19807-2b.d,
	* testsuite/ld-x86-64/pr19807-2d.d,
	* testsuite/ld-x86-64/pr19827-nacl.rd,
	* testsuite/ld-x86-64/pr19827.rd,
	* testsuite/ld-x86-64/pr20253-4a.d,
	* testsuite/ld-x86-64/pr20253-4b.d,
	* testsuite/ld-x86-64/pr20253-4d.d,
	* testsuite/ld-x86-64/pr20253-4e.d,
	* testsuite/ld-x86-64/pr20253-5a.d,
	* testsuite/ld-x86-64/pr20253-5b.d,
	* testsuite/ld-x86-64/tlsbin-nacl.rd,
	* testsuite/ld-x86-64/tlsbin.rd,
	* testsuite/ld-x86-64/tlspic-nacl.rd,
	* testsuite/ld-x86-64/tlspic.rd,
	* testsuite/ld-x86-64/tlspic2-nacl.rd: Update for
	pluralization fixes.
2017-11-07 17:01:16 +10:30
Mingi Cho 6ab2c4ed51 Work around integer overflows when readelf is checking for corrupt ELF notes when run on a 32-bit host.
PR 22384
	* readelf.c (print_gnu_property_note): Improve overflow checks so
	that they will work on a 32-bit host.
2017-11-02 17:01:08 +00:00
James Bowman 81b42bcab1 FT32B is a new FT32 family member. It has a code compression scheme, which requires the use of linker relaxations. The change is quite large, so submission is in several parts.
Part 2 adds a relaxation pass, which actually implements the code compression scheme.

bfd	* archures.c: Add bfd_mach_ft32b.
	* cpu-ft32.c: Add arch_info_struct.
	* elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
	DIFF32. (ft32_elf_relocate_section): Add clauses
	for R_FT32_SC0, SC1, DIFF32.  (ft32_reloc_shortable,
	elf32_ft32_is_diff_reloc, elf32_ft32_adjust_diff_reloc_value,
	elf32_ft32_adjust_reloc_if_spans_insn,
	elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target,
	ft32_elf_relax_section): New function.
	* reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

gas	* config/tc-ft32.c (md_assemble): add relaxation reloc
	BFD_RELOC_FT32_RELAX.  (md_longopts): Add "norelax" and
	"no-relax". (md_apply_fix): Add reloc BFD_RELOC_FT32_DIFF32.
	(relaxable_section, ft32_validate_fix_sub, ft32_force_relocation,
	ft32_allow_local_subtract): New function.
	* config/tc-ft32.h: remove unused MD_PCREL_FROM_SECTION.
	* testsuite/gas/ft32/insnsc.s: New test exercising all FT32B
	shortcodes.

include	* elf/ft32.h: Add R_FT32_RELAX, SC0, SC1, DIFF32.
2017-11-01 15:33:24 +00:00
Nick Clifton 45ac8f4f10 Remind users to use the --use-dynamic command line option to dump dynamic relocations.
* readelf.c (process_relocs): Tell users if no static relocs were
	found, but if they had added --use-dynamic to the command line
	then relocs would have been displayed.
2017-10-31 13:48:03 +00:00
Alan Modra 5396a86e43 PR22303, print_core_note out of bounds read
The print_core_note change here fixes the PR, the rest is making
readelf a little more bombproof against maliciously crafted binaries.

	PR 22303
	* readelf.c (print_core_note): Ensure "count" sanity check
	calculation doesn't overflow.
	(process_notes_at): Perform note namesz and descsz checks
	using unsigned comparisons against data remaining.  Catch
	alignment overflow of namesz and descsz too.  Don't allocate a
	temp for terminating "name" when there is space available
	before descdata.
2017-10-18 12:50:45 +10:30
Joseph Myers 97953bab05 Avoid spurious readelf error status from decode_arm_unwind.
readelf.c:decode_arm_unwind has a variable res that is used as a
return value, with FALSE meaning unsuccessful and TRUE meaning
successful.  This is initialized to FALSE (and then various code in
the function sets it to FALSE again on error), meaning that when the
function is successful, if it reaches returning res is still returns
FALSE, resulting eventually in exit status 1 from readelf without any
error message to indicate an error.

This patch fixes the initialization to use TRUE, so avoiding those
spurious errors.  I don't have a self-contained test for this issue;
it was observed as many prelink tests failing without the patch and
passing with it.

	* readelf.c (decode_arm_unwind): Initialize res to TRUE.
2017-10-05 14:19:39 +00:00
Nick Clifton 5c144731ed Change readelf so that when --wide is active a relocation's full name is displayed.
PR 22262
binutils* readelf.c (dump_relocations): Do not truncate reloc names when
	displaying output in wide mode.

ld	* testsuite/ld-powerpc/relocsort.d: Update expected output (for
	longer reloc names).
2017-10-05 13:25:44 +01:00
Alan Modra 6bd6a03d69 PR22216, infinite loop in readelf process_symbol_table
This should make readelf bombproof given a fuzzed DT_HASH.  Also
removes a bogus check that would have resulted in wrong histograms.

	PR 22216
	* readelf.c (process_symbol_table): Check that DT_HASH symbol
	chains are only visited once, and report an error if not.  Display
	invalid symbol index if chain is out of range.  Use the same logic
	when calculating histograms rather than the PR 17531 fix.  Delete
	bogus check that chained index is less than number of buckets.
2017-09-27 15:54:18 +09:30
Alan Modra 66cfc0fd0d PR21732, String-concatenated message can not be translated
Preprocessor tokens like DWARF_VMA_FMT and BFD_VMA_FMT are not
understood by gettext, and cause the translation string to be
truncated.  Even if it were not truncated, we wouldn't want a value
that changes depending on host or configure options to be put in a
translation string.

	PR 21732
	* dwarf.c (READ_ULEB): Don't use DWARF_VMA_FMT in translated string.
	(READ_SLEB): Likewise.
	* readelf.c (bfd_vmatoa): New function.
	(get_data, get_dynamic_data): Use it for printing error messages.
2017-09-26 13:39:35 +09:30
Maciej W. Rozycki ef272caa74 readelf: Handle E_MIPS_MACH_5900
Fix commit e407c74b5b ("Support for MIPS R5900 (Sony Playstation 2)"),
<https://sourceware.org/ml/binutils/2012-12/msg00240.html>, and add the
handling of E_MIPS_MACH_5900, correctly showing `5900' among `Flags:' in
the output of `-h' rather than `unknown CPU'.

	binutils/
	* readelf.c (get_machine_flags) <E_MIPS_MACH_5900>: New case.

	gas/
	* testsuite/gas/mips/elf_mach_5900.d: New test.
	* testsuite/gas/mips/mips.exp: Run it.
2017-09-22 00:54:19 +01:00
Nick Clifton f17e9d8ab5 Fix a buffer overrun when parsing a corrupt MIPS ELF binary.
PR 21995
	* readelf.c (process_mips_specific): Add checks for a NULL data
	pointer.
2017-09-05 12:09:14 +01:00
Alexander Fedotov-B55613 83eef88358 Missing relocation R_PPC_VLE_ADDR20 and add VLE flag to details in readelf
include/
	* elf/ppc.h (R_PPC_VLE_ADDR20): New relocation.
bfd/
	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
	(ppc_elf_check_relocs): Handle it.
	(ppc_elf_vle_split20): New function.
	(ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
binutils/
	* readelf.c (get_elf_section_flags): Add VLE.
	(process_section_headers): Add VLE key to details.
gas/
	* config/tc-ppc.c (md_parse_option): Handle "mno-vle" flag.
	(ppc_elf_section_letter): New function.
	* config/tc-ppc.h (md_elf_section_letter): New.
	* testsuite/gas/elf/section10.d: Adjust for VLE.
2017-09-05 08:42:27 +09:30
Alan Modra 1445030f31 PR21994, readelf looping on verdefs
PR 21994
	* readelf.c (process_version_sections <SHT_GNU_verdef>): Check
	vd_aux and vda_next for sanity.  Delete "end".  Correct overflow
	checks.
	(process_version_sections <SHT_GNU_verneed>): Correct overflow
	check.  Don't report invalid vna_next on overflow.  Do report
	invalid vna_next on size less than aux info.
2017-08-25 12:23:30 +09:30
Alan Modra 452bf675ea PR21990, Integer overflow in process_version_sections
This tidies some of the overflow checking when processing verneed
and verdef sections.

	PR 21990
	* readelf.c (process_version_sections <SHT_GNU_verneed>): Check
	for invalid vn_next field before adding to idx.  Use unsigned
	long for index vars.  Move index checks.
	<SHT_GNU_verdef>: Likewise for vd_next.
2017-08-23 19:47:29 +09:30
Nick Clifton 714da62f64 Add test of V2 GNU build attribute notes.
* testsuite/binutils-all/note-3-64.s: New test.  Checks assembly
	and decoding of version2 GNU build attribute notes.
	* testsuite/binutils-all/note-3-32.s: New test.  32-bit version of
	the above test.
	* testsuite/binutils-all/note-3-64.d: New test driver.
	* testsuite/binutils-all/note-3-32.d: New test driver.
	* testsuite/binutils-all/objcopy.exp: Run the new test.
	* readelf.c (is_64bit_abs_reloc): Add R_SPARC_64.
2017-08-17 14:51:31 +01:00
Gustavo Romero 66c3b5f87c Add new NT_PPC_* available since Linux 4.8
Add new note types available since Linux 4.8 to elf/common.h and
make the 'readelf' tool aware of it.

include/
	* elf/common.h (NT_PPC_TAR): New macro.
	(NT_PPC_PPR): Likewise.
	(NT_PPC_DSCR): Likewise.
	(NT_PPC_EBB): Likewise.
	(NT_PPC_PMU): Likewise.
	(NT_PPC_TM_CGPR): Likewise.
	(NT_PPC_TM_CFPR): Likewise.
	(NT_PPC_TM_CVMX): Likewise.
	(NT_PPC_TM_CVSX): Likewise.
	(NT_PPC_TM_SPR): Likewise.
	(NT_PPC_TM_CTAR): Likewise.
	(NT_PPC_TM_CPPR): Likewise.
	(NT_PPC_TM_CDSCR): Likewise.
binutils/
	* readelf.c (get_note_type): Handle PPC note types available
	since Linux 4.8.
2017-08-16 07:45:28 +09:30
Alan Modra 483767a333 Collision between NT_GNU_BUILD_ATTRIBUTE_OPEN and NT_PPC_VMX
* readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes
	by name data.
2017-08-12 17:45:39 +09:30
Alan Modra 262cdac76d Teach readelf about IA64 MSB relocs.
* readelf.c (is_32bit_abs_reloc): Add R_IA64_SECREL32MSB and
	R_IA64_DIR32MSB.
	(is_64bit_abs_reloc): Add R_IA64_DIR64MSB.
	(is_64bit_pcrel_reloc): Add R_IA64_PCREL64MSB.
2017-08-02 16:36:57 +09:30
Nick Clifton c6b78c965a Stop readelf from returning an error status if asked to dump an emoty section.
PR 21820
	* readelf.c (dump_section_as_strings): Do not fail if the section
	was empty.
	(dump_section_as_bytes): Likewise.
2017-07-25 09:37:34 +01:00
Yuri Chornovian de194d8575 Fix spelling typos. 2017-07-18 16:58:14 +01:00
Andreas Schwab 04ac15ab07 Add missing newlines in readelf -n output
* readelf.c (process_note): Print newline after description data
	in narrow mode.
	(print_core_note): Print newline if nothing was printed in wide
	mode.
2017-07-11 17:40:24 +02:00
John Baldwin 0b9305edf1 Recognize the recently-added FreeBSD core dump note for LWP info.
This core dump note contains the same information returned by the
ptrace PT_LWPINFO operation for each LWP belonging to a process.

binutils/ChangeLog:

	* readelf.c (get_freebsd_elfcore_note_type): Handle
	NT_FREEBSD_PTLWPINFO.

include/ChangeLog:

	* elf/common.h (NT_FREEBSD_PTLWPINFO): Define.
2017-07-07 16:10:47 -07:00
Jan Kratochvil 613643582c DWARF-5: readelf: .debug_names
Display DWARF-5 .debug_names (standardized .gdb_index).

binutils/ChangeLog
2017-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* dwarf.c: Include assert.h.
	(MAX, MIN, get_IDX_name, display_debug_names): New.
	(debug_displays): Add .debug_names.
	* dwarf.h: (enum dwarf_section_display_enum): Add debug_names.
	* readelf.c (process_section_headers): Add ".debug_names".
2017-07-02 22:15:05 +02:00
Andreas Arnez 88ab90e860 S390: Support guarded-storage core note sections
Newer Linux kernel versions offer two new register sets in support of the
z/Architecture's guarded storage facility: NT_S390_GS_CB, the
"guarded-storage registers", and NT_S390_GS_BC, the "guarded-storage
broadcast control block".  This patch adds support for the respective core
notes sections to binutils.

bfd/ChangeLog:
	* elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
	(elfcore_write_s390_gs_bc): Likewise.
	* elf.c (elfcore_grok_s390_gs_cb): New function.
	(elfcore_grok_s390_gs_bc): New function.
	(elfcore_grok_note): Call them.
	(elfcore_write_s390_gs_cb): New function.
	(elfcore_write_s390_gs_bc): New function.
	(elfcore_write_register_note): Call them.

binutils/ChangeLog:
	* readelf.c (get_note_type): Add NT_S390_GS_CB and NT_S390_GS_BC.

include/ChangeLog:
	* elf/common.h (NT_S390_GS_CB): New macro.
	(NT_S390_GS_BC): Likewise.
2017-06-29 10:30:09 +02:00
Nick Clifton 88305e1b9f Add support for version 2 of the GNU Build Attribute note specification.
* objcopy.c (merge_gnu_build_notes): Add support for version 2 notes.
	* readelf.c (print_gnu_build_attribute_name): Likewise.
2017-06-28 14:52:12 +01:00
Maciej W. Rozycki 38bf472a15 MIPS: Add Imagination interAptiv MR2 MIPS32r3 processor support
Add support for the Imagination interAptiv MR2 MIPS32r3 processor with
the MIPS16e2 ASE as per documentation, including in particular:

1. Support for implementation-specific interAptiv MR2 COPYW and UCOPYW
   MIPS16e2 instructions[1], for assembly and disassembly,

2. Support for implementation-specific interAptiv MR2 SAVE and RESTORE
   regular MIPS instructions[2], for assembly and disassembly,

3. ELF binary file annotation for the interAptiv MR2 MIPS architecture
   extension.

4. Support for interAptiv MR2 architecture selection for assembly, in
   the form of the `-march=interaptiv-mr2' command-line option and its
   corresponding `arch=interaptiv-mr2' setting for the `.set' and
   `.module' pseudo-ops.

5. Support for interAptiv MR2 architecture selection for disassembly,
   in the form of the `mips:interaptiv-mr2' target architecture, for
   use e.g. with the `-m' command-line option for `objdump'.

Parts of this change by Matthew Fortune and Andrew Bennett.

References:

[1] "MIPS32 interAptiv Multiprocessing System Software User's Manual",
    Imagination Technologies Ltd., Document Number: MD00904, Revision
    02.01, June 15, 2016, Section 24.3 "MIPS16e2 Implementation Specific
    Instructions", pp. 878-883

[2] same, Chapter 25 "Implementation-specific Instructions", pp. 911-917

	include/
	* elf/mips.h (E_MIPS_MACH_IAMR2): New macro.
	(AFL_EXT_INTERAPTIV_MR2): Likewise.
	* opcode/mips.h: Document new operand codes defined.
	(INSN_INTERAPTIV_MR2): New macro.
	(INSN_CHIP_MASK): Adjust accordingly.
	(CPU_INTERAPTIV_MR2): New macro.
	(cpu_is_member) <CPU_INTERAPTIV_MR2>: New case.
	(MIPS16_ALL_ARGS): Rename to...
	(MIPS_SVRS_ALL_ARGS): ... this.
	(MIPS16_ALL_STATICS): Rename to...
	(MIPS_SVRS_ALL_STATICS): ... this.

	bfd/
	* archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
	* cpu-mips.c (I_interaptiv_mr2): New enum value.
	(arch_info_struct): Add "mips:interaptiv-mr2" entry.
	* elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
	case.
	(mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
	(bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
	(print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
	(mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
	`bfd_mach_mips_interaptiv_mr2' entries.
	* bfd-in2.h: Regenerate.

	opcodes/
	* mips-formats.h (INT_BIAS): New macro.
	(INT_ADJ): Redefine in INT_BIAS terms.
	* mips-dis.c (mips_arch_choices): Add "interaptiv-mr2" entry.
	(mips_print_save_restore): New function.
	(print_insn_arg) <OP_SAVE_RESTORE_LIST>: Update comment.
	(validate_insn_args) <OP_SAVE_RESTORE_LIST>: Remove `abort'
	call.
	(print_insn_args): Handle OP_SAVE_RESTORE_LIST.
	(print_mips16_insn_arg): Call `mips_print_save_restore' for
	OP_SAVE_RESTORE_LIST handling, factored out from here.
	* mips-opc.c (decode_mips_operand) <'-'> <'m'>: New case.
	(RD_31, RD_SP, WR_SP, MOD_SP, IAMR2): New macros.
	(mips_builtin_opcodes): Add "restore" and "save" entries.
	* mips16-opc.c (decode_mips16_operand) <'n', 'o'>: New cases.
	(IAMR2): New macro.
	(mips16_opcodes): Add "copyw" and "ucopyw" entries.

	binutils/
	* readelf.c (get_machine_flags) <E_MIPS_MACH_IAMR2>: New case.
	(print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
	* NEWS: Mention Imagination interAptiv MR2 processor support.

	gas/
	* config/tc-mips.c (validate_mips_insn): Handle
	OP_SAVE_RESTORE_LIST specially.
	(mips_encode_save_restore, mips16_encode_save_restore): New
	functions.
	(match_save_restore_list_operand): Factor out SAVE/RESTORE
	operand insertion into the instruction word or halfword to these
	new functions.
	(mips_cpu_info_table): Add "interaptiv-mr2" entry.

	* doc/c-mips.texi (MIPS Options): Add `interaptiv-mr2' to the
	`-march=' argument list.
2017-06-28 02:07:36 +01:00
Thomas Preud'homme ced40572e4 [ARM] Add support for ARMv8-R in assembler and readelf
=== Context ===

This patch is part of a patch series to add support for ARMv8-R
architecture. Its purpose is to add support for ARMv8-R in GAS:
instructions, build attributes and readelf.

=== Patch description ===

Although some differences exist for system registers, from GAS point of
view ARMv8-R supports the same instructions as ARMv8-A Aarch32 state
and a subset of its extensions. This patch therefore introduce a new
feature bit to distinguish the availability of the pan, ras and rdma
extensions between ARMv8-A and ARMv8-R and allow crypto, fp and simd
extensions to be used by ARMv8-R.

Most of the changes are then in the testsuite to (i) rename source files
and error output to be shared between ARMv8-A and ARMv8-R, (ii) rename
files with expected output for ARMv8-A build attributes and (iii) add
new files with expected output for ARMv8-R build attributes.

2017-06-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

binutils/
	* readelf.c (arm_attr_tag_CPU_arch): Fill value for ARMv8-R.

gas/
	* NEWS: Mention support for ARMv8-R architecture.
	* config/tc-arm.c (arm_archs): Add entry for ARMv8-R.
	(arm_extensions): Restrict pan, ras and rdma extension to
	ARMv8-A and make crypto, fp and simd extensions available to
	ARMv8-R.
	(cpu_arch_ver): Add entry for ARMv8-R.
	(aeabi_set_public_attributes): Update gas_assert for Tag_DIV_use
	logic.
	* testsuite/gas/arm/armv8-a+fp.s: Rename into ...
	* testsuite/gas/arm/armv8-ar+fp.s: This.  Remove .arch directive.
	* testsuite/gas/arm/armv8-a+fp.d: Specify source to assemble and
	architecture to assemble for.
	* testsuite/gas/arm/armv8-r+fp.d: New.
	* testsuite/gas/arm/armv8-a+simd.s: Rename into ...
	* testsuite/gas/arm/armv8-ar+simd.s: This.  Remove .arch directive.
	* testsuite/gas/arm/armv8-a+simd.d: Specify source to assemble and
	architecture to assemble for.
	* testsuite/gas/arm/armv8-r+simd.d: New.
	* testsuite/gas/arm/armv8-a-bad.s: Rename into ...
	* testsuite/gas/arm/armv8-ar-bad.s: This.  Remove .arch directive.
	* testsuite/gas/arm/armv8-a-bad.l: Rename into ...
	* testsuite/gas/arm/armv8-ar-bad.l: This.  Decrement line number by 1.
	* testsuite/gas/arm/armv8-a-bad.d: Specify source to assemble,
	architecture to assemble for and adjust error output file.
	* testsuite/gas/arm/armv8-r-bad.d: New.
	* testsuite/gas/arm/armv8-a-barrier.s: Rename into ...
	* testsuite/gas/arm/armv8-ar-barrier.s: This.
	* testsuite/gas/arm/armv8-a-barrier-arm.d: Adjust source.
	* testsuite/gas/arm/armv8-a-barrier-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-r-barrier-arm.d: New.
	* testsuite/gas/arm/armv8-r-barrier-thumb.d: New.
	* testsuite/gas/arm/armv8-a-it-bad.s: Rename into ...
	* testsuite/gas/arm/armv8-ar-it-bad.s: This.  Remove .arch directive.
	* testsuite/gas/arm/armv8-a-it-bad.l: Rename into ...
	* testsuite/gas/arm/armv8-ar-it-bad.l: This.  Decrement line number
	by 1.
	* testsuite/gas/arm/armv8-a-it-bad.d: Specify source to assemble,
	architecture to assemble for and adjust error output file.
	* testsuite/gas/arm/armv8-r-it-bad.d: New.
	* testsuite/gas/arm/armv8-a.s: Rename into ...
	* testsuite/gas/arm/armv8-ar.s: This.  Remove .arch directive.
	* testsuite/gas/arm/armv8-a.d: Specify source to assemble and
	architecture to assemble for.
	* testsuite/gas/arm/armv8-r.d: New.
	* testsuite/gas/arm/attr-march-armv8-r+crypto.d: New.
	* testsuite/gas/arm/attr-march-armv8-r+fp.d: New.
	* testsuite/gas/arm/attr-march-armv8-r+simd.d: New.
	* testsuite/gas/arm/attr-march-armv8-r.d: New.
	* testsuite/gas/arm/crc32.s: Rename into ...
	* testsuite/gas/arm/crc32-armv8-ar.s: This.
	* testsuite/gas/arm/crc32.d: Rename into ...
	* testsuite/gas/arm/crc32-armv8-a.d: This.  Specify source to assemble.
	* testsuite/gas/arm/crc32-armv8-r.d: New.
	* testsuite/gas/arm/crc32-bad.s: Rename into ...
	* testsuite/gas/arm/crc32-armv8-ar-bad.s: This.
	* testsuite/gas/arm/crc32-bad.d: Rename into ...
	* testsuite/gas/arm/crc32-armv8-a-bad.d: This.  Specify source to
	assemble.
	* testsuite/gas/arm/crc32-armv8-r-bad.d: New.
	* testsuite/gas/arm/mask_1.s: Rename into ...
	* testsuite/gas/arm/mask_1-armv8-ar.s: This.
	* testsuite/gas/arm/mask_1.d: Rename into ...
	* testsuite/gas/arm/mask_1-armv8-a.d: This.  Specify source to
	assemble.
	* testsuite/gas/arm/mask_1-armv8-r.d: new.

include/
	* elf/arm.h (TAG_CPU_ARCH_V8R): New macro.
	* opcode/arm.h (ARM_EXT2_V8A): New macro.
	(ARM_AEXT2_V8A): Rename into ...
	(ARM_AEXT2_V8AR): This.
	(ARM_AEXT2_V8A): New macro.
	(ARM_AEXT_V8R): New macro.
	(ARM_AEXT2_V8R): New macro.
	(ARM_ARCH_V8R): New macro.
2017-06-24 10:37:47 +01:00