Commit Graph

16815 Commits

Author SHA1 Message Date
GDB Administrator
698d38980e Automatic date update in version.in 2021-05-01 00:00:31 +00:00
Nick Clifton
d1fbc3ba09 Fix illegal memory access parsing a corrupt MACH-O format file.
PR 27801
	* mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
	read 32-bit value.
2021-04-30 14:31:03 +01:00
Nick Clifton
9f84cb380e Fix an illegal memory access when parsing a corrupt core note.
PR 27799
	* elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
	that are too small.
2021-04-30 14:19:24 +01:00
Nick Clifton
6cb40a679b Fix a double free when re-allocating a buffer to size 0.
PR 27797
	* libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
	been realloc'ed to size 0.
2021-04-30 14:04:08 +01:00
Nick Clifton
bceb87ef4d Fix illegal memory access when parsing a corrupt PE format file.
PR 27795
	* coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
	lengths.
2021-04-30 12:11:35 +01:00
GDB Administrator
7a8238b072 Automatic date update in version.in 2021-04-30 00:00:29 +00:00
Nick Clifton
09e40e44ad Fix an access through a null pointer when parsing a corrupt SOM format fle.
PR 27793
	* som.c (som_slurp_symbol_table): Assign symbols without any scope
	to the undefined section.
	(som_decode_symclass): Check for a missing symbol section.
	* syms.c (bfd_decode_symclass): Likewise.
2021-04-29 17:55:43 +01:00
Nick Clifton
063e75c9e4 Fix illegal memory accesses when parsing a corrupt SOM format file.
PR 27792
	* som.c (som_slurp_string_table): Place a terminating NUL byte at
	the end of the table.
	(som_slurp_symbol_table): Check for an over-large offset into the
	string string table.
2021-04-29 17:41:43 +01:00
GDB Administrator
ae95c78d26 Automatic date update in version.in 2021-04-29 00:00:33 +00:00
Nick Clifton
24aebc79b1 Stop the BFD library from treating annobin symbols as potential function symbols.
bfd	* elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
	symbols as potential function symbols.
	* elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
	* elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
	* elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.

ld	* testsuite/ld-elf/anno-sym.s: New test source file.
	* testsuite/ld-elf/anno-sym.d: New test driver.
	* testsuite/ld-elf/anno-sym.l: New test error output.
2021-04-28 11:49:09 +01:00
GDB Administrator
6c356992b4 Automatic date update in version.in 2021-04-28 00:00:32 +00:00
Mike Frysinger
3955e34670 bfd: add stdlib.h when using abort
Since this file calls abort() now, we need to include stdlib.h for
its prototype.
2021-04-26 21:02:38 -04:00
GDB Administrator
674c58574b Automatic date update in version.in 2021-04-27 00:00:18 +00:00
Jan Beulich
a7664973b2 x86: correct overflow checking for 16-bit PC-relative relocs
The only insn requiring a truly 16-bit PC-relative relocation outside of
16-bit mode is XBEGIN (with an operand size override). For it, the
relocation generated should behave similar to 8- and (for 64-bit) 32-bit
PC-relatives ones, i.e. be checked for a signed value to fit the field.
This same mode is also correct for 16-bit code. Outside of 16-bit code,
branches with operand size overrides act in a truly PC-relative way only
when living in the low 32k of address space, as they truncate rIP to 16
bits. This can't be expressed by a PC-relative relocation.

Putting in place a new testcase, I'd like to note that the two existing
ones (pcrel16 and pcrel16abs) appear to be pretty pointless: They don't
expect any error despite supposedly checking for overflow, and in fact
there can't possibly be any error for the
- former since gas doesn't emit any relocation in the first place there,
- latter because the way the relocation gets expressed by gas doesn't
  allow the linker to notice the overflow; it should be detected by gas
  if at all, but see above (an error would be reported here for x86-64
  afaict, but this test doesn't get re-used there).
2021-04-26 10:41:35 +02:00
GDB Administrator
6476ec743f Automatic date update in version.in 2021-04-26 00:00:16 +00:00
GDB Administrator
219df3d924 Automatic date update in version.in 2021-04-25 00:00:17 +00:00
GDB Administrator
b2d14d3d8f Automatic date update in version.in 2021-04-24 00:00:15 +00:00
Eric Botcazou
f5e98b7d67 Fix type of .persistent.bss section
The change implementing the .persistent family of sections broke the
existing support for the .persistent.bss section in the compiler:

int a __attribute__ ((section (".persistent.bss")));

t.s: Assembler messages:
t.s:4: Warning: setting incorrect section type for .persistent.bss

The compiler encodes it as @nobits but the assembler expects @progbits.
The assembler is incorrect and should treat the section like the compiler.

bfd/
	* elf.c (special_sections_p): Add .persistent.bss.
gas/
	* testsuite/gas/elf/section25.d: Run it everywhere.
	* testsuite/gas/elf/section26.d: Likewise.
	* testsuite/gas/elf/section26.s: Add test for .persistent.bss.
2021-04-23 19:13:52 +02:00
Jan Beulich
c21346c5e2 x86: TLS desc call relocs target zero-size fields
These are marker relocations, so together with their bit size being zero
their byte size should be zero as well. This is expressed by a value of
3, not 0.
2021-04-23 09:18:48 +02:00
GDB Administrator
ae6a3f81a1 Automatic date update in version.in 2021-04-23 00:00:15 +00:00
Cl?ment Chigot
bdd2aaf69e fix string table generation for XCOFF64 .debug section
bfd	* hash.c (struct bfd_strtab_hash): Remove xcoff field.
	Add length_field_size field.
	(_bfd_stringtab_init): Change prototype.
	Adapt to new length_field_size.
	(_bfd_xcoff_stringtab_init): Likewise.
	(_bfd_stringtab_add): Likewise.
	(_bfd_stringtab_emit): Likewise.
	* libbfd-in.h (_bfd_xcoff_stringtab_init):
	Change prototype.
	* libbfd.h: Regenerate.
	* xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
	Call _bfd_xcoff_stringtab_init with isxcoff64 value.
2021-04-22 15:31:02 +01:00
Cl?ment Chigot
b11b2969a9 Harmonize and improve auxiliary entries support for XCOFF
bfd/ChangeLog:
	* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
	unsupported storage class or auxialiry entries.
	Improve and adapt to new aux structures.
	Add C_DWARF support.
	(_bfd_xcoff_swap_aux_out): Likewise.
	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
	(_bfd_xcoff64_swap_aux_out): Likewise.

binutils/ChangeLog:
	* od-xcoff.c (dump_xcoff32_symbols): Adapt to new
	aux structures.

include/ChangeLog:
	* coff/internal.h (union internal_auxent):
	 Add x_sect structure.
	* coff/rs6000.h (union external_auxent): Rework to
	match official documentation.
	* coff/rs6k64.h (union external_auxent): Likewise.
	(_AUX_SECT): New define.
2021-04-22 12:28:50 +01:00
GDB Administrator
1202f464b2 Automatic date update in version.in 2021-04-22 00:00:15 +00:00
Eli Zaretskii
18e9a809e8 Extend the description of PE header flags.
PR 27760
include	* coff/pe.h (IMAGE_DLLCHARACTERISTICS_APPCONTAINER): Define.
	(IMAGE_DLLCHARACTERISTICS_GUARD_CF): Define.

bfd	* peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
	of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
	IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
	Decode the contents of the DllCharacteristics field.
2021-04-21 17:38:52 +01:00
Nick Clifton
33fe00c123 Fix an assertion failure in the BFD library when parsing a corrupt SREC format file.
PR 27759
	* srec.c (srec_read_section): Replace assertions with error
	returns.
2021-04-21 11:09:11 +01:00
GDB Administrator
9c7c5f1e5c Automatic date update in version.in 2021-04-21 00:00:16 +00:00
Cl?ment Chigot
c5df7e442e Rework the R_NEG support on both gas and ld for the PowerPC AIX targets, in order to manage C++ exceptions built with GCC.
bfd	PR binutils/21700
	* reloc.c (BFD_RELOC_PPC_NEG): New relocation.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
	BFD_RELOC_PPC_NEG handler.
	(xcoff_reloc_type_neg): Correctly substract addend.
	* coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
	howto.
	(xcoff64_rtype2howto): Add handler for R_NEG_32.
	(xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
	* xcofflink.c (xcoff_need_ldrel_p): Check output section
	for R_POS-like relocations. New argument added.
	(xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
	(xcoff_link_input_bfd): Likewise.

gas	* config/tc-ppc.c (ppc_get_csect_to_adjust): New function.
	(ppc_fix_adjustable): Manage fx_subsy part.
	(tc_gen_reloc): Create second relocation when both
	fx_addsy and fx_subsy are provided.
	* config/tc-ppc.h (RELOC_EXPANSION_POSSIBLE): New define.
	(MAX_RELOC_EXPANSION): Likewise.
	(TC_FORCE_RELOCATION_SUB_SAME): Likewise
	(UNDEFINED_DIFFERENCE_OK): Likewise
	* testsuite/gas/all/gas.exp: Skip difference between two
	undefined symbols test.

ld	* testsuite/ld-powerpc/aix52.exp: Add new test.
	* testsuite/ld-powerpc/aix-neg-reloc-32.d: New test.
	* testsuite/ld-powerpc/aix-neg-reloc-64.d: New test.
	* testsuite/ld-powerpc/aix-neg-reloc.ex: New test.
	* testsuite/ld-powerpc/aix-neg-reloc.s: New test.
2021-04-20 14:40:43 +01:00
GDB Administrator
66d6b8522e Automatic date update in version.in 2021-04-20 00:00:16 +00:00
GDB Administrator
9eab4c18bd Automatic date update in version.in 2021-04-19 00:00:13 +00:00
GDB Administrator
100cfce897 Automatic date update in version.in 2021-04-18 00:00:15 +00:00
GDB Administrator
1b348b6b67 Automatic date update in version.in 2021-04-17 00:00:15 +00:00
Alan Modra
6f8f6017a0 PR27567, Linking PE files adds alignment section flags to executables
So don't set those flags for an executable.  In the patch I also test
DYNAMIC even though the PE bfd code doesn't appear to set it for dlls.
I figure it doesn't hurt to include that flag too.

	PR 27567
bfd/
	* coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
	(coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
	ignore alignment checks when return is false.  Formatting.
include/
	* coff/internal.h (struct internal_scnhdr): Make s_flags unsigned long.
	* coff/pe.h (COFF_ENCODE_ALIGNMENT): Don't set align flags for an
	executable and return false.  Do so for a relocatable object and
	evaluate to true.
	* coff/ti.h (COFF_ENCODE_ALIGNMENT): Add bfd arg and evaluate to true.
	(COFF_DECODE_ALIGNMENT): Formatting.
	* coff/z80.h (COFF_ENCODE_ALIGNMENT): Similarly.
	(COFF_DECODE_ALIGNMENT): Similarly.
2021-04-16 23:21:44 +09:30
GDB Administrator
971cd33fc6 Automatic date update in version.in 2021-04-16 00:00:17 +00:00
Nelson Chu
ddfe525f28 RISC-V: PR27584, surpress local and empty name symbols for nm.
The local ".L0" symbol are usually generated to mark where the
auipc instruction is, and clang also uses ".LBB" to do the same
thing.  Besides, clang also uses the empty name symbols for label
differences.  Arm surpress their mapping symbols by regarding them
as special symbols, and MIPS surpress all local symbols.  Therefore,
RISC-V probably need to surpress the local and empty name symbols
for nm and related tools.  User can use "--special-syms" to show
these surpressed symbols.

bfd/
    PR27584
    * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
    omit local and empty symbols since they usually generated to
    mark the auipc instructions.
2021-04-15 10:32:36 +08:00
Lifang Xia
f6a1f95749 CSKY: Fix special_function in howto table
The special_function for reloc should be 'bfd_elf_generic_reloc',
reloc list:
	R_CKCORE_PCREL_IMM16BY2,
	R_CKCORE_PCREL_IMM16BY4,
	R_CKCORE_PCREL_IMM10BY4,
	R_CKCORE_PCREL_IMM18BY2,
	R_CKCORE_PCREL_FLRW_IMM8BY4

bfd/
	* elf32-csky.c (csky_elf_howto_table)
	<R_CKCORE_PCREL_IMM16BY2>: Set special_function to
	bfd_elf_generic_reloc.
	<R_CKCORE_PCREL_IMM16BY4>: Likewise.
	<R_CKCORE_PCREL_IMM10BY4>: Likewise.
	<R_CKCORE_PCREL_IMM18BY2>: Likewise.
	<R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
2021-04-15 10:07:35 +08:00
GDB Administrator
d4015fc5aa Automatic date update in version.in 2021-04-15 00:00:15 +00:00
H.J. Lu
9917b5596a elf: Set p_memsz to p_filesz for loadable PT_NOTE segment
Since p_memsz of the loadable PT_NOTE segment should be the same as
p_filesz, set p_memsz on the loadable PT_NOTE segment when updating
p_filesz.

bfd/

	PR binutils/27708
	* elf.c (assign_file_positions_for_non_load_sections): Set
	p_memsz to p_filesz for the loadable PT_NOTE segment.

binutils/

	PR binutils/27708
	* testsuite/binutils-all/x86-64/pr27708.dump: New file.
	* testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
	* testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
	test.
2021-04-14 05:31:15 -07:00
Frederic Cambus
5f47741bf6 Remove unneeded tests for definitions of NT_BSDNETCORE values.
binutils* readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
	checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.

bfd	* elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
	checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
2021-04-14 11:15:01 +01:00
Alan Modra
8985b74b7d PR27631, ubsan: elf32-metag.c:1550:10
PR 27631
	* elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
	when hh might be NULL, test for NULL first.
2021-04-14 17:37:27 +09:30
Alan Modra
c9f9a78d00 PR27630, ubsan: elf32-arm.c:6587:20
PR 27630
	* elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
	hash might be NULL, cast instead.
2021-04-14 17:26:15 +09:30
GDB Administrator
c48a248e33 Automatic date update in version.in 2021-04-14 00:00:16 +00:00
Clément Chigot
d2f1139ef0 bfd: avoid infinite loop when static linking XCOFF
git commit b95a0a3177 changed a "return FALSE" to "continue", and
missed updating the while loop iterator.

	* xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
2021-04-13 18:23:39 +09:30
Nelson Chu
e3839c100f RISC-V: Don't report the mismatched version warning for the implicit extensions.
bfd/
    * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
    when the version of input or output is RISCV_UNKNOWN_VERSION, since
    the extension is added implicitly.
    * elfxx-riscv.c: Updated the obsolete comments.
    (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
    * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
2021-04-13 12:49:51 +08:00
GDB Administrator
8d85d1f53f Automatic date update in version.in 2021-04-13 00:00:18 +00:00
Alan Modra
43e05cd4f4 ENABLE_CHECKING in bfd, opcodes, binutils, ld
gas already has this.  Here it enables checking hash table type passed
to elf_link_hash_lookup and elf_link_hash_traverse.

bfd/
	* elf-bfd.h (ENABLE_CHECKING): Define.
	(elf_link_hash_lookup): Abort if wrong type of hash table.
	(elf_link_hash_traverse): Likewise.
	* configure.ac (--enable-checking): Add support.
	* config.in: Regenerate.
	* configure: Regenerate.
binutils/
	* configure.ac (--enable-checking): Add support.
	* config.in: Regenerate.
	* configure: Regenerate.
ld/
	* configure.ac (--enable-checking): Add support.
	* config.in: Regenerate.
	* configure: Regenerate.
opcodes/
	* configure.ac (--enable-checking): Add support.
	* config.in: Regenerate.
	* configure: Regenerate.
2021-04-13 00:35:44 +09:30
Alan Modra
2cc15b10e5 convert elf_link_hash macros to inline functions
Involves a bit of editing as we now need to be more precise in pointer
types.

bfd/
	* elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
	(elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
	(elf_hash_table, elf_hash_table_id): Likewise.
	* elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
	is_elf_hash_table check.
	* elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
	* elf32-hppa.c (clobber_millicode_symbols): Correct param types.
	* elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
	* elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
	(elfNN_ia64_global_dyn_sym_thunk: Likewise.
	* elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
	(elf64_ia64_global_dyn_sym_thunk): Likewise.
	(elf64_vms_link_add_object_symbols): Pass base type of hash table
	to is_elf_hash_table.
	* elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
	(_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
	(_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
	(_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
	(bfd_elf_final_link): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
	* elf64-ppc.c (ppc64_elf_set_toc): Likewise.  Use bfd_link_hash_lookup.
ld/
	* emultempl/mipself.em (mips_create_output_section_statements):
	Pass base type of hash table to is_elf_hash_table.
	* ldelf.c (ldelf_after_open): Likewise.
2021-04-12 21:19:02 +09:30
Alan Modra
b585e89996 elf_backend_archive_symbol_lookup
elf_backend_archive_symbol_lookup might be called when the linker hash
table has entries of type generic_link_hash_entry.  This happens for
instance when running the mmix target linker testsuite where the
output is mmo but input is elf64-mmix.

	* elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
	from elf_backend_archive_symbol_lookup.
	(_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
	* elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise.  Check
	we have a ppc_hash_table before accessing ppc_link_hash_entry
	fields.
	* elflink.c (_bfd_elf_archive_symbol_lookup): Return
	bfd_link_hash_entry*.
	(elf_link_add_archive_symbols): Adjust to suit.
2021-04-12 21:19:02 +09:30
Nelson Chu
f5b1097353 RISC-V: The version of i-ext should be RISCV_UNKNOWN_VERSION when expanding g-ext.
Fix the wrong version of i-ext when expanding g-ext.  This was changed by
the previous patch accidently.

bfd/
    * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
    i-ext when expanding g-ext.
2021-04-12 18:04:12 +08:00
Nelson Chu
f0bae2552d RISC-V: Add i-ext as the implicit extension when e-ext is set.
The linker does not care the default versions of the extensions, since
it does not have the default ISA spec setting.  Therefore, linker won't
insert the implicit extensions for the input objects.  But we used to
insert the i-ext as the explicit extension, even if the e-ext is set.
This causes linker to report "cannot find default versions of the ISA
extension `i'" errors when linking the input objects with e-ext.

This patch fixes the above linker problem, and also remove the confused
riscv_ext_dont_care_version function.  Unless these "dont care" extensions
are set in the input architecture explicitly, otherwise we always insert
them as the implicit ones.  Afterwards, let riscv_arch_str1 surpress them
not to output to the architecture string if their versions are
RISCV_UNKNOWN_VERSION.

bfd/
    * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
    (riscv_parse_add_subset): Always add the implicit extensions, even if
    their versions are RISCV_UNKNOWN_VERSION.
    (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
    in the riscv_parse_add_implicit_subsets.  Besides, add g-ext as the
    implicit extension after it has been expanded.
    (riscv_parse_add_implicit_subsets): Updated.
2021-04-12 17:51:07 +08:00
Nelson Chu
e601909a32 RISC-V: Support to parse the multi-letter prefix in the architecture string.
The original discussion is as follows,
https://github.com/riscv/riscv-isa-manual/issues/637

I never considered the prefixes may have multiple letters, like zxm.
But the ISA spec has been updated for a long time that I haven't noticed.
This patch rewrites the part of architecture parser to support parsing
the multi-letter prefixes.  Besides, I also improve the parser to report
errors in details.  One of the most obvious improvement is - Do not parse
the prefixed extensions according to the orders in the parse_config.
If we do so, then we used to get "unexpected ISA string at end" errors,
but the message is a little bit  hard to know what is happening.  I Remove
the confused message, and let riscv_parse_prefixed_ext to report the details.

bfd/
    * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
    (riscv_std_s_ext_strtab): Likewise.
    (riscv_std_h_ext_strtab): Likewise.
    (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
    (enum riscv_prefix_ext_class): Moved forward and renamed from
    riscv_isa_ext_class.  Reorder them according to the parsing order,
    since the enum values are used to check the orders in the
    riscv_compare_subsets.
    (struct riscv_parse_prefix_config): Moved forward and renamed from
    riscv_parse_config_t.  Also removed the ext_valid_p field, the
    related functions are replaced by riscv_valid_prefixed_ext.
    (parse_config): Moved forward and updated.  The more letters of the
    prefix string, the more forward it must be defined.  Otherwise, we
    will get the wrong mapping when using strncmp in riscv_get_prefix_class.
    (riscv_get_prefix_class): Moved forward.  Support to parse the
    multi-letter prefix, like zxm.
    (riscv_known_prefixed_ext): New function, check if the prefixed
    extension is supported according to the right riscv_std_*_ext_strtab.
    (riscv_valid_prefixed_ext): New function, used to replace the
    riscv_ext_*_valid_p functions.
    (riscv_init_ext_order): Do not set the values for prefix keywords
    since they may have multiple letters for now.
    (riscv_compare_subsets): Set the order values of prefix keywords
    to negative numbers according to the riscv_prefix_ext_class.
    (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
    have parsed the prefixed extensions.
    (riscv_parse_prefixed_ext): Updated and removed the parameter config.
    Report error when the prefix is unknown.
    (riscv_parse_subset): Do not parse the prefixed extensions according
    to the orders in the parse_config.  Remove the confused message and
    let riscv_parse_prefixed_ext to report the details.
    * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
    (riscv_get_prefix_class): Removed to static.
gas/
    * testsuite/gas/riscv/march-fail-order-x-std.d: Renamed from
    march-fail-porder-x-std.d.
    * testsuite/gas/riscv/march-fail-order-z-std.d: Renamed from
    march-fail-porder-z-std.d.
    * testsuite/gas/riscv/march-fail-order-x-z.d: Renamed from
    march-fail-porder-x-z.d.
    * testsuite/gas/riscv/march-fail-order-zx-std.l: Added to replace
    march-fail-porder.l.
    * testsuite/gas/riscv/march-fail-order-x-z.l: Likewise.
    * testsuite/gas/riscv/march-fail-order-x.l: Updated.
    * testsuite/gas/riscv/march-fail-order-z.l: Likewise.
    * testsuite/gas/riscv/march-fail-single-prefix-h.d: Renamed from
    march-fail-single-char-h.d.
    * testsuite/gas/riscv/march-fail-single-prefix-s.d: Renamed from
    march-fail-single-char-s.d.
    * testsuite/gas/riscv/march-fail-single-prefix-x.d: Renamed from
    march-fail-single-char-x.d.
    * testsuite/gas/riscv/march-fail-single-prefix-z.d: Renamed from
    march-fail-single-char-z.d.
    * testsuite/gas/riscv/march-fail-single-prefix-zmx.d: Added.
    * testsuite/gas/riscv/march-fail-single-prefix.l: Added to replace
    march-fail-single-prefix.l.
    * testsuite/gas/riscv/march-fail-unknown-zxm.d: Added.
    * testsuite/gas/riscv/march-fail-unknown-std.l: Updated.
    * testsuite/gas/riscv/march-fail-unknown.l: Likewise.
2021-04-12 10:05:37 +08:00