binutils-gdb/bfd
Nelson Chu c9f2799101 RISC-V: Merged extension string tables and their version tables into one.
There are two main reasons for this patch,

* In the past we had two extension tables, one is used to record all
supported extensions in bfd/elfxx-riscv.c, another is used to get the
default extension versions in gas/config/tc-riscv.c.  It is hard to
maintain lots of tables in different files, but in fact we can merge
them into just one table.  Therefore, we now define many riscv_supported_std*
tables, which record names and versions for all supported extensions.
We not only use these tables to initialize the riscv_ext_order, but
also use them to get the default versions of extensions, and decide if
the extensions should be enbaled by default.

* We add a new filed `default_enable' for the riscv_supported_std* tables,
to decide if the extension should be enabled by default.  For now if the
`default_enable' field of the extension is set to EXT_DEFAULT, then we
should enable the extension when the -march and elf architecture attributes
are not set.  In the future, I suppose the `default_enable' can be set
to lots of EXT_<VENDOR>, each vendor can decide to open which extensions,
when the target triple of vendor is chosen.

The elf/linux regression tests of riscv-gnu-toolchain are passed.

bfd/
	* elfnn-riscv.c (cpu-riscv.h): Removed sine it is included in
	bfd/elfxx-riscv.h.
	(riscv_merge_std_ext): Updated since the field of rpe is changed.
	* elfxx-riscv.c (cpu-riscv.h): Removed.
	(riscv_implicit_subsets): Added implicit extensions for g.
	(struct riscv_supported_ext): Used to be riscv_ext_version.  Moved
	from gas/config/tc-riscv.c, and added new field `default_enable' to
	decide if the extension should be enabled by default.
	(EXT_DEFAULT): Defined for `default_enable' field.
	(riscv_supported_std_ext): It used to return the supported standard
	architecture string, but now we move ext_version_table from
	gas/config/tc-riscv.c to here, and rename it to riscv_supported_std_ext.
	Currently we not only use the table to initialize riscv_ext_order, but
	also get the default versions of extensions, and decide if the extensions
	should be enbaled by default.
	(riscv_supported_std_z_ext): Likewise, but is used for z* extensions.
	(riscv_supported_std_s_ext): Likewise, but is used for s* extensions.
	(riscv_supported_std_h_ext): Likewise, but is used for h* extensions.
	(riscv_supported_std_zxm_ext): Likewise, but is used for zxm* extensions.
	(riscv_all_supported_ext): Includes all supported extension tables.
	(riscv_known_prefixed_ext): Updated.
	(riscv_valid_prefixed_ext): Updated.
	(riscv_init_ext_order): Init the riscv_ext_order table according to
	riscv_supported_std_ext.
	(riscv_get_default_ext_version): Moved from gas/config/tc-riscv.c.
	Get the versions of extensions from riscv_supported_std* tables.
	(riscv_parse_add_subset): Updated.
	(riscv_parse_std_ext): Updated.
	(riscv_set_default_arch): Set the default subset list according to
	the default_enable field of riscv_supported_*ext tables.
	(riscv_parse_subset): If the input ARCH is NULL, then we call
	riscv_set_default_arch to set the default subset list.
	* elfxx-riscv.h (cpu-riscv.h): Included.
	(riscv_parse_subset_t): Removed get_default_version field, and added
	isa_spec field to replace it.
	(extern riscv_supported_std_ext): Removed.
gas/
	* (bfd/cpu-riscv.h): Removed.
	(struct riscv_ext_version): Renamed and moved to bfd/elfxx-riscv.c.
	(ext_version_table): Likewise.
	(riscv_get_default_ext_version): Likewise.
	(ext_version_hash): Removed.
	(init_ext_version_hash): Removed.
	(riscv_set_arch): Updated since the field of rps is changed.  Besides,
	report error when the architecture string is empty.
	(riscv_after_parse_args): Updated.
2021-09-17 16:33:54 +08:00
..
doc chew ubsan warning 2021-08-06 23:06:53 +09:30
hosts
po Deprecate a.out support for NetBSD targets. 2021-08-11 13:17:54 +01:00
.gitignore
acinclude.m4
aclocal.m4
aix5ppc-core.c
aix386-core.c
aout32.c
aout64.c
aout-cris.c
aout-ns32k.c
aout-target.h
aoutx.h PR27844, Unstable symbol name in objdump outputs 2021-05-11 21:38:39 +09:30
arc-got.h arc: Fix potential invalid pointer access when fixing got symbols. 2021-09-14 12:10:54 +03:00
arc-plt.def
arc-plt.h
archive64.c
archive.c PR28328, dlltool ice 2021-09-15 10:04:17 +09:30
archures.c bfd: fix incorrect type used in sizeof 2021-09-15 11:32:33 +01:00
bfd-in2.h PTR_ADD and NPTR_ADD for bfd.h 2021-09-02 13:48:21 +09:30
bfd-in.h PTR_ADD and NPTR_ADD for bfd.h 2021-09-02 13:48:21 +09:30
bfd.c Externalize the _bfd_set_gp_value function 2021-07-28 13:36:58 +09:30
bfd.m4
bfdio.c
bfdwin.c
binary.c
cache.c
cf-i386lynx.c
ChangeLog bfd: fix incorrect type used in sizeof 2021-09-15 11:32:33 +01:00
ChangeLog-0001
ChangeLog-0203
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-9193
ChangeLog-9495
ChangeLog-9697
ChangeLog-9899
cisco-core.c
coff64-rs6000.c PR 28053: Fix spelling mistakes: usupported -> unsupported and relocatation -> relocation. 2021-07-06 14:56:05 +01:00
coff-alpha.c
coff-arm.c
coff-arm.h
coff-bfd.c gas: improve C_BSTAT and C_STSYM symbols handling on XCOFF 2021-07-29 10:55:22 +02:00
coff-bfd.h
coff-go32.c
coff-i386.c
coff-ia64.c
coff-mcore.c
coff-mips.c
coff-rs6000.c objdump: add DWARF support for AIX 2021-07-14 21:40:05 +09:30
coff-sh.c
coff-stgo32.c
coff-tic4x.c
coff-tic30.c PR28175, Segment fault in coff-tic30.c reloc_processing 2021-08-06 23:06:53 +09:30
coff-tic54x.c
coff-x86_64.c
coff-z8k.c PR28175, Segment fault in coff-tic30.c reloc_processing 2021-08-06 23:06:53 +09:30
coff-z80.c PR28175, Segment fault in coff-tic30.c reloc_processing 2021-08-06 23:06:53 +09:30
coffcode.h revise PE IMAGE_SCN_LNK_NRELOC_OVFL test 2021-08-04 12:34:52 +09:30
coffgen.c reloc_upper_bound size calculations 2021-07-30 15:08:55 +09:30
cofflink.c Fix problems translating messages when a percentage sign appears at the end of a string. 2021-07-07 10:25:41 +01:00
coffswap.h
compress.c
config.bfd Re: Deprecate a.out support for NetBSD targets 2021-09-13 17:04:01 +09:30
config.in Check for strnlen declaration to fix Solaris 10 build 2021-07-07 13:49:27 +02:00
configure Add support for the haiku operating system. These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time. 2021-09-02 12:19:14 +01:00
configure.ac Deprecate a.out support for NetBSD targets. 2021-08-11 13:17:54 +01:00
configure.com
configure.host
COPYING
corefile.c
cpu-aarch64.c
cpu-aarch64.h
cpu-alpha.c
cpu-arc.c
cpu-arm.c
cpu-arm.h
cpu-avr.c
cpu-bfin.c
cpu-bpf.c
cpu-cr16.c
cpu-cris.c
cpu-crx.c
cpu-csky.c
cpu-d10v.c
cpu-d30v.c
cpu-dlx.c
cpu-epiphany.c
cpu-fr30.c
cpu-frv.c
cpu-ft32.c [bfd] Ensure unique printable names for bfd archs 2021-09-15 10:10:46 +02:00
cpu-h8300.c
cpu-h8300.h
cpu-hppa.c
cpu-i386.c
cpu-ia64-opc.c
cpu-ia64.c
cpu-iamcu.c
cpu-ip2k.c
cpu-iq2000.c
cpu-k1om.c
cpu-l1om.c
cpu-lm32.c
cpu-m9s12x.c
cpu-m9s12xg.c
cpu-m32c.c
cpu-m32r.c
cpu-m68hc11.c
cpu-m68hc12.c
cpu-m68k.c
cpu-m68k.h
cpu-m10200.c
cpu-m10300.c
cpu-mcore.c
cpu-mep.c
cpu-metag.c
cpu-microblaze.c
cpu-mips.c
cpu-mmix.c
cpu-moxie.c
cpu-msp430.c
cpu-mt.c
cpu-nds32.c [bfd] Ensure unique printable names for bfd archs 2021-09-15 10:10:46 +02:00
cpu-nfp.c
cpu-nios2.c
cpu-ns32k.c
cpu-or1k.c
cpu-pdp11.c
cpu-pj.c
cpu-powerpc.c
cpu-pru.c
cpu-riscv.c RISC-V: PR27916, Support mapping symbols. 2021-08-30 17:36:11 +08:00
cpu-riscv.h RISC-V: PR27916, Support mapping symbols. 2021-08-30 17:36:11 +08:00
cpu-rl78.c
cpu-rs6000.c
cpu-rx.c [bfd] Ensure unique printable names for bfd archs 2021-09-15 10:10:46 +02:00
cpu-s12z.c
cpu-s390.c
cpu-score.c
cpu-sh.c
cpu-sparc.c
cpu-spu.c
cpu-tic4x.c
cpu-tic6x.c
cpu-tic30.c
cpu-tic54x.c
cpu-tilegx.c
cpu-tilepro.c
cpu-v850_rh850.c
cpu-v850.c
cpu-vax.c
cpu-visium.c
cpu-wasm32.c
cpu-xc16x.c
cpu-xgate.c
cpu-xstormy16.c
cpu-xtensa.c
cpu-z8k.c
cpu-z80.c
dep-in.sed
development.sh
dwarf1.c
dwarf2.c Tidy commit 49910fd88d 2021-07-10 13:29:04 +09:30
ecoff-bfd.h
ecoff.c
ecofflink.c
ecoffswap.h
elf32-am33lin.c
elf32-arc.c
elf32-arm.c PATCH [4/4] arm: Add Tag_PACRET_use build attribute 2021-08-17 14:49:42 +02:00
elf32-arm.h
elf32-avr.c
elf32-avr.h
elf32-bfin.c PR28172, bfin_pcrel24_reloc heap-buffer-overflow 2021-08-06 23:02:27 +09:30
elf32-bfin.h
elf32-cr16.c
elf32-cr16.h
elf32-cris.c
elf32-crx.c
elf32-csky.c csky: fix annobin test fails 2021-05-03 15:34:17 +09:30
elf32-csky.h
elf32-d10v.c
elf32-d30v.c
elf32-dlx.c
elf32-dlx.h
elf32-epiphany.c
elf32-fr30.c
elf32-frv.c
elf32-ft32.c
elf32-gen.c
elf32-h8300.c
elf32-hppa.c convert elf_link_hash macros to inline functions 2021-04-12 21:19:02 +09:30
elf32-hppa.h
elf32-i386.c elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
elf32-ip2k.c
elf32-iq2000.c
elf32-lm32.c
elf32-m32c.c
elf32-m32r.c
elf32-m68hc1x.c
elf32-m68hc1x.h
elf32-m68hc11.c
elf32-m68hc12.c
elf32-m68k.c
elf32-m68k.h
elf32-mcore.c
elf32-mep.c
elf32-metag.c PR27631, ubsan: elf32-metag.c:1550:10 2021-04-14 17:37:27 +09:30
elf32-metag.h
elf32-microblaze.c
elf32-mips.c PR28162, segment fault in mips_elf_assign_gp 2021-08-04 23:28:44 +09:30
elf32-moxie.c
elf32-msp430.c
elf32-mt.c
elf32-nds32.c PR28173, nds32_elf_howto_table index out of bounds 2021-08-06 23:06:40 +09:30
elf32-nds32.h
elf32-nios2.c
elf32-nios2.h
elf32-or1k.c or1k: fix pc-relative relocation against dynamic on PC relative 26 bit relocation. 2021-07-16 15:03:07 +01:00
elf32-pj.c
elf32-ppc.c PowerPC, sanity check r_offset in relocate_section 2021-09-10 18:04:18 +09:30
elf32-ppc.h
elf32-pru.c Enable linker garbage collection for the PRU target. 2021-05-10 14:00:00 +01:00
elf32-rl78.c PR28163, Segment fault in function rl78_special_reloc 2021-08-11 15:06:20 +09:30
elf32-rx.c PR28165, buffer overflow in elf32-rx.c:rx_info_to_howto_rela 2021-08-05 20:47:09 +09:30
elf32-rx.h
elf32-s12z.c
elf32-s390.c
elf32-score7.c Fix an illegal memory access triggered by disassembling corrupt s390x binaries. 2021-09-06 12:25:20 +01:00
elf32-score.c
elf32-score.h
elf32-sh-relocs.h
elf32-sh.c PR27858, global-buffer-overflow 2021-05-13 10:18:44 +09:30
elf32-sparc.c
elf32-spu.c
elf32-spu.h
elf32-tic6x.c
elf32-tic6x.h
elf32-tilegx.c
elf32-tilegx.h
elf32-tilepro.c
elf32-tilepro.h
elf32-v850.c
elf32-v850.h
elf32-vax.c
elf32-visium.c
elf32-wasm32.c
elf32-xc16x.c
elf32-xgate.c
elf32-xstormy16.c
elf32-xtensa.c Fix an illegal memory access triggered by an atempt to disassemble a corrupt xtensa binary. 2021-09-07 11:47:08 +01:00
elf32-z80.c
elf32.c
elf64-alpha.c ubsan: alpha: member access within null pointer 2021-09-03 11:45:58 +09:30
elf64-bpf.c Re: PR28055, segfault in bpf special reloc function 2021-07-06 10:41:36 +09:30
elf64-gen.c
elf64-hppa.c
elf64-hppa.h
elf64-ia64-vms.c convert elf_link_hash macros to inline functions 2021-04-12 21:19:02 +09:30
elf64-mips.c PR28166, _bfd_elf_mips_get_relocated_section_contents 2021-08-05 20:47:09 +09:30
elf64-mmix.c
elf64-nfp.c
elf64-ppc.c PowerPC64, sanity check r_offset in relocate_section 2021-09-08 22:22:34 +09:30
elf64-ppc.h
elf64-s390.c
elf64-sparc.c reloc_upper_bound size calculations 2021-07-30 15:08:55 +09:30
elf64-tilegx.c
elf64-tilegx.h
elf64-x86-64.c elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
elf64.c
elf-attrs.c asan: heap buffer overflow in _bfd_elf_parse_attributes 2021-06-02 14:47:17 +09:30
elf-bfd.h SHT_SYMTAB_SHNDX handling 2021-09-02 13:48:21 +09:30
elf-eh-frame.c PTR_ADD and NPTR_ADD for bfd.h 2021-09-02 13:48:21 +09:30
elf-hppa.h
elf-ifunc.c
elf-linker-x86.h
elf-linux-core.h
elf-m10200.c
elf-m10300.c
elf-nacl.c
elf-nacl.h
elf-properties.c elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
elf-s390-common.c
elf-s390.h
elf-strtab.c
elf-vxworks.c
elf-vxworks.h
elf.c Revert: [AArch64] MTE corefile support 2021-09-07 11:03:20 -03:00
elfcode.h Remove an accidental change to elfcode.h included as part of commit 6e0dfbf420. 2021-07-07 16:50:33 +01:00
elfcore.h
elflink.c SHT_SYMTAB_SHNDX handling 2021-09-02 13:48:21 +09:30
elfn32-mips.c
elfnn-aarch64.c Fix problems translating messages when a percentage sign appears at the end of a string. 2021-07-07 10:25:41 +01:00
elfnn-ia64.c convert elf_link_hash macros to inline functions 2021-04-12 21:19:02 +09:30
elfnn-riscv.c RISC-V: Merged extension string tables and their version tables into one. 2021-09-17 16:33:54 +08:00
elfxx-aarch64.c
elfxx-aarch64.h
elfxx-ia64.c
elfxx-ia64.h
elfxx-mips.c Mark .gnu.debuglto_.debug_* as SHT_MIPS_DWARF 2021-06-30 17:16:22 +01:00
elfxx-mips.h
elfxx-riscv.c RISC-V: Merged extension string tables and their version tables into one. 2021-09-17 16:33:54 +08:00
elfxx-riscv.h RISC-V: Merged extension string tables and their version tables into one. 2021-09-17 16:33:54 +08:00
elfxx-sparc.c
elfxx-sparc.h
elfxx-target.h
elfxx-tilegx.c
elfxx-tilegx.h
elfxx-x86.c elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
elfxx-x86.h elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
format.c
gen-aout.c
genlink.h
go32stub.h
hash.c fix string table generation for XCOFF64 .debug section 2021-04-22 15:31:02 +01:00
host-aout.c
hppabsd-core.c
hpux-core.c
i386aout.c
i386bsd.c
i386lynx.c
i386msdos.c
ihex.c
init.c
irix-core.c
libaout.h
libbfd-in.h ld: Limit cache size and add --max-cache-size=SIZE 2021-07-08 09:59:28 -07:00
libbfd.c bfd dwarf2 sanity checking 2021-05-22 17:23:24 +09:30
libbfd.h ld: Limit cache size and add --max-cache-size=SIZE 2021-07-08 09:59:28 -07:00
libcoff-in.h
libcoff.h
libecoff.h
libhppa.h
libpei.h
libxcoff.h objdump: add DWARF support for AIX 2021-07-14 21:40:05 +09:30
linker.c PR28264, ld.bfd crash on linking efivar with LTO 2021-08-28 10:19:09 +09:30
lynx-core.c
mach-o-aarch64.c
mach-o-arm.c
mach-o-i386.c
mach-o-target.c
mach-o-x86-64.c
mach-o.c reloc_upper_bound size calculations 2021-07-30 15:08:55 +09:30
mach-o.h
MAINTAINERS
Makefile.am
Makefile.in
makefile.vms
mep-relocs.pl
merge.c
mmo.c
netbsd-core.c
netbsd.h
ns32k.h
ns32knetbsd.c
opncls.c ld: Limit cache size and add --max-cache-size=SIZE 2021-07-08 09:59:28 -07:00
osf-core.c
pc532-mach.c
pdp11.c PR27844, Unstable symbol name in objdump outputs 2021-05-11 21:38:39 +09:30
pe-arm-wince.c
pe-arm.c
pe-i386.c
pe-mcore.c
pe-sh.c
pe-x86_64.c
pef-traceback.h
pef.c
pef.h
pei-arm-wince.c
pei-arm.c
pei-i386.c
pei-ia64.c
pei-mcore.c
pei-sh.c
pei-x86_64.c
peicode.h
peXXigen.c Extend the description of PE header flags. 2021-04-21 17:38:52 +01:00
plugin.c bfd: Close the file descriptor if there is no archive fd 2021-07-28 06:01:32 -07:00
plugin.h ld: Cache and reuse the IR archive file descriptor 2021-07-05 08:51:35 -07:00
PORTING
ppcboot.c
ptrace-core.c
README
reloc16.c
reloc.c bfd_reloc_offset_in_range overflow 2021-08-06 23:06:53 +09:30
rs6000-core.c
sco5-core.c
section.c gdb/bfd: avoid crash when architecture is forced to csky or riscv 2021-05-20 13:35:54 +01:00
simple.c Remove strayed fprintf in commit 23182ac0d8 2021-05-10 12:50:33 -07:00
som.c Fix an access through a null pointer when parsing a corrupt SOM format fle. 2021-04-29 17:55:43 +01:00
som.h
srec.c Fix an assertion failure in the BFD library when parsing a corrupt SREC format file. 2021-04-21 11:09:11 +01:00
stab-syms.c
stabs.c
stamp-h.in
syms.c Fix an access through a null pointer when parsing a corrupt SOM format fle. 2021-04-29 17:55:43 +01:00
sysdep.h Fix Solaris gprof build with --disable-nls 2021-07-07 13:51:55 +02:00
targets.c
targmatch.sed
tekhex.c
TODO
trad-core.c
vax1knetbsd.c
vaxnetbsd.c
verilog.c
version.h Automatic date update in version.in 2021-09-17 00:00:08 +00:00
version.m4 Update version number and regenerate files 2021-07-03 15:16:48 +01:00
vms-alpha.c PR28167, vms-alpha build_module_list 2021-08-05 20:47:09 +09:30
vms-lib.c asan: stack-buffer-overflow vms-lib.c:367 2021-05-05 13:35:45 +09:30
vms-misc.c
vms.h
warning.m4
wasm-module.c bfd dwarf2 sanity checking 2021-05-22 17:23:24 +09:30
wasm-module.h
xcofflink.c bfd: ensure that symbols targeted by DWARF relocations are kept in XCOFF 2021-07-30 08:38:14 +02:00
xcofflink.h
xsym.c
xsym.h
xtensa-isa.c Fix an illegal memory access triggered by an atempt to disassemble a corrupt xtensa binary. 2021-09-07 11:47:08 +01:00
xtensa-modules.c

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BFD is an object file library.  It permits applications to use the
same routines to process object files regardless of their format.

BFD is used by the GNU debugger, assembler, linker, and the binary
utilities.

The documentation on using BFD is scanty and may be occasionally
incorrect.  Pointers to documentation problems, or an entirely
rewritten manual, would be appreciated.

There is some BFD internals documentation in doc/bfdint.texi which may
help programmers who want to modify BFD.

BFD is normally built as part of another package.  See the build
instructions for that package, probably in a README file in the
appropriate directory.

BFD supports the following configure options:

  --target=TARGET
	The default target for which to build the library.  TARGET is
	a configuration target triplet, such as sparc-sun-solaris.
  --enable-targets=TARGET,TARGET,TARGET...
	Additional targets the library should support.  To include
	support for all known targets, use --enable-targets=all.
  --enable-64-bit-bfd
	Include support for 64 bit targets.  This is automatically
	turned on if you explicitly request a 64 bit target, but not
	for --enable-targets=all.  This requires a compiler with a 64
	bit integer type, such as gcc.
  --enable-shared
	Build BFD as a shared library.
  --with-mmap
	Use mmap when accessing files.  This is faster on some hosts,
	but slower on others.  It may not work on all hosts.

Report bugs with BFD to bug-binutils@gnu.org.

Patches are encouraged.  When sending patches, always send the output
of diff -u or diff -c from the original file to the new file.  Do not
send default diff output.  Do not make the diff from the new file to
the original file.  Remember that any patch must not break other
systems.  Remember that BFD must support cross compilation from any
host to any target, so patches which use ``#ifdef HOST'' are not
acceptable.  Please also read the ``Reporting Bugs'' section of the
gcc manual.

Bug reports without patches will be remembered, but they may never get
fixed until somebody volunteers to fix them.

Copyright (C) 2012-2021 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.