binutils-gdb/include
Jose E. Marchesi 1e18ffc991 bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flags
This patch adds support for EF_BPF_CPUVER bits in the ELF
machine-dependent header flags.  These bits encode the BPF CPU
version for which the object file has been compiled for.

The BPF assembler is updated so it annotates the object files it
generates with these bits.

The BPF disassembler is updated so it honors EF_BPF_CPUVER to use the
appropriate ISA version if the user didn't specify an explicit ISA
version in the command line.  Note that a value of zero in
EF_BPF_CPUVER is interpreted by the disassembler as "use the later
supported version" (the BPF CPU versions start with v1.)

The readelf utility is updated to pretty print EF_BPF_CPUVER when it
prints out the ELF header:

   $ readelf -h a.out
   ELF Header:
     ...
     Flags:                             0x4, CPU Version: 4

Tested in bpf-unknown-none.

include/ChangeLog:

2023-07-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* elf/bpf.h (EF_BPF_CPUVER): Define.
	* opcode/bpf.h (BPF_XBPF): Change from 0xf to 0xff so it fits in
	EF_BPF_CPUVER.

binutils/ChangeLog:

2023-07-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* readelf.c (get_machine_flags): Recognize and pretty print BPF
	machine flags.

opcodes/ChangeLog:

2023-07-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* bpf-dis.c: Initialize asm_bpf_version to -1.
	(print_insn_bpf): Set BPF ISA version from the cpu version ELF
	header flags if no explicit version set in the command line.
	* disassemble.c (disassemble_init_for_target): Remove unused code.

gas/ChangeLog:

2023-07-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* config/tc-bpf.h (elf_tc_final_processing): Define.
	* config/tc-bpf.c (bpf_elf_final_processing): New function.
2023-07-30 22:39:30 +02:00
..
aout Delete include/aout/encap.h 2023-05-30 12:51:22 +09:30
cgen Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
coff AIX_WEAK_SUPPORT 2023-07-14 11:43:52 +09:30
elf bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flags 2023-07-30 22:39:30 +02:00
gdb Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
mach-o Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
opcode bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flags 2023-07-30 22:39:30 +02:00
sim sim: info: convert verbose field to a bool 2023-01-18 20:47:55 -05:00
som Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
vms Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
alloca-conf.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
ansidecl.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
bfdlink.h ppc32 and "LOAD segment with RWX permissions" 2023-02-06 23:06:44 +10:30
binary-io.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
bout.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
ChangeLog bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flags 2023-07-30 22:39:30 +02:00
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-2019 ChangeLog rotation 2020-01-01 18:12:08 +10:30
ChangeLog-2020 ChangeLog rotation 2021-01-01 10:31:02 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
collectorAPI.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
COPYING
COPYING3
ctf-api.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
ctf.h ctf: fix various dreadful typos in the ctf_archive format comments 2023-01-12 14:40:47 +00:00
demangle.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
diagnostics.h gdbsupport: ignore -Wenum-constexpr-conversion in enum-flags.h 2023-03-06 21:00:52 -05:00
dis-asm.h DesCGENization of the BPF binutils port 2023-07-21 12:20:40 +02:00
dwarf2.def Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
dwarf2.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
dyn-string.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
environ.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
fibheap.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
filenames.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
floatformat.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
fnmatch.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
fopen-bin.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
fopen-same.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
fopen-vms.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
gcc-c-fe.def Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
gcc-c-interface.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
gcc-cp-fe.def Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
gcc-cp-interface.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
gcc-interface.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
getopt.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
hashtab.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
hp-symtab.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
leb128.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
libcollector.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
libfcollector.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
libiberty.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
longlong.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
lto-symtab.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
MAINTAINERS Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
md5.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
oasys.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
objalloc.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
obstack.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
os9k.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
partition.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
plugin-api.h PR29961, plugin-api.h: "Could not detect architecture endianess" 2023-05-17 11:21:43 +09:30
safe-ctype.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
sframe-api.h sframe: bfd: gas: ld: format bump to SFrame version 2 2023-06-29 16:31:58 -07:00
sframe.h sframe: bfd: gas: ld: format bump to SFrame version 2 2023-06-29 16:31:58 -07:00
sha1.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
simple-object.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
sort.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
splay-tree.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
symcat.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
timeval-utils.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
vtv-change-permission.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
xregex2.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xtensa-config.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
xtensa-dynconfig.h gcc-4.5 build fixes 2023-05-17 11:21:43 +09:30
xtensa-isa-internal.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30
xtensa-isa.h Update year range in copyright notice of binutils files 2023-01-01 21:50:11 +10:30