Commit Graph

18373 Commits

Author SHA1 Message Date
Alan Modra
717d4bd6d1 Generated docs and include files
bfd/doc/chew.c extracts documentation from source code comments
annotated with keywords, and generates much of bfd.h and libbfd.h from
those same comments.  The docs have suffered from people (me too)
adding things like CODE_FRAGMENT to the source to put code into bfd.h
without realising that CODE_FRAGMENT also puts @example around said
code into the docs.  So we have random senseless things in the docs.
This patch fixes that problem (well, the senseless things from
CODE_FRAGMENT), moves most of the code out of bfd-in.h, and improves a
few chew.c features.  libbfd.h now automatically gets ATTRIBUTE_HIDDEN
prototypes, and indentation in bfd.h and libbfd.h is better.
2023-05-03 15:00:05 +09:30
Alan Modra
a41bd1c837 Move bfd_alloc, bfd_zalloc and bfd_release to libbfd.c
These functions don't belong in opncls.c.

	* libbfd-in.h (bfd_release): Delete prototype.
	* opncls.c (bfd_alloc, bfd_zalloc, bfd_release): Move to..
	* libbfd.c: ..here.  Include objalloc.c and provide bfd_release
	with a FUNCTION comment.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2023-05-03 14:56:01 +09:30
Alan Modra
37cfe371c4 Move bfd_elf_bfd_from_remote_memory to opncls.c
bfd_elf_bfd_from_remote_memory is just a wrapper, and the function
could be implemented for other formats.  Move it to opncls.c because
it acts a little like some of the other bfd_open* routines.  Also give
it the usual FUNCTION etc. comment so prototypes and docs are handled
automatically.

	* elf.c (bfd_elf_bfd_from_remote_memory): Move to..
	* opncls.c: ..here, add FUNCTION comment.
	* bfd-in.h (bfd_elf_bfd_from_remote_memory): Delete prototype.
	* bfd-in2.h: Regenerate.
2023-05-03 14:53:28 +09:30
Alan Modra
d659ef9543 hash.c: replace some unsigned long with unsigned int
* hash.c (higher_prime_number): Use uint32_t param, return value,
	tables and variables.
	(bfd_default_hash_table_size): Make it an unsigned int.
	(bfd_hash_set_default_size): Use unsigned int param and return.
	* bfd-in.h (bfd_hash_set_default_size): Update prototype.
	* bfd-in2.h: Regenerate.
2023-05-03 14:47:34 +09:30
Alan Modra
f68912e831 libbfc.c: Use stdint types for unsigned char and unsigned long
* libbfd.c (bfd_put_8): Use bfd_byte rather than unsigned char.
	(bfd_get_8, bfd_get_signed_8): Likewise.
	(_bfd_read_unsigned_leb128, _bfd_safe_read_leb128): Likewise.
	(_bfd_read_signed_leb128): Likewise.
	(bfd_getb24, bfd_getl24): Replace unsigned long with uint32_t.
	(bfd_getb32, bfd_getl32): Likewise.
	(bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
2023-05-03 14:41:28 +09:30
Alan Modra
df2fc6fbfd Change signature of bfd crc functions
The crc calculated is 32 bits.  Replace uses of unsigned long with
uint32_t.  Also use bfd_byte* for buffers.

bfd/
	* opncls.c (bfd_calc_gnu_debuglink_crc32): Use stdint types.
	(bfd_get_debug_link_info_1, bfd_get_debug_link_info): Likewise.
	(separate_debug_file_exists, bfd_follow_gnu_debuglink): Likewise.
	(bfd_fill_in_gnu_debuglink_section): Likewise.
	* bfd-in2.h: Regenerate.
gdb/
	* auto-load.c (auto_load_objfile_script): Update type of
	bfd_get_debug_link_info argument.
	* symfile.c (find_separate_debug_file_by_debuglink): Likewise.
	* gdb_bfd.c (get_file_crc): Update type of
	bfd_calc_gnu_debuglink_crc32 argument.
2023-05-03 14:40:49 +09:30
Alan Modra
e84ca83738 _bfd_mips_elf_lo16_reloc vallo comment
This explains exactly why the high reloc adjustment is as it is,
replacing the rather nebulous existing comment.  I've also changed the
expression from (lo+0x8000)&0xffff to (lo&0xffff)^0x8000 which better
matches part of the standard 16-bit sign extension (resulting in
exactly the same value), and hoisted the calculation out of the loop.

	* elfxx-mips.c (_bfd_mips_elf_lo16_reloc): Expand vallo
	comment.  Hoist calculation out of loop.
2023-05-03 09:03:01 +09:30
GDB Administrator
b2499d8a40 Automatic date update in version.in 2023-05-02 00:00:42 +00:00
GDB Administrator
077a1f0848 Automatic date update in version.in 2023-05-01 00:00:36 +00:00
GDB Administrator
bec5d8fc8c Automatic date update in version.in 2023-04-30 00:00:34 +00:00
GDB Administrator
dffcf6e5e6 Automatic date update in version.in 2023-04-29 00:00:28 +00:00
Nelson Chu
03e63766ef RISC-V: Enable x0 base relaxation for relax_pc even if --no-relax-gp.
Let --no-relax-gp only disable the gp relaxation for lui and pcrel
relaxations, since x0 base and gp relaxations are different optimizations
in fact, but just use the same function to handle.

bfd/
	* elfnn-riscv.c (_bfd_riscv_relax_pc): Like _bfd_riscv_relax_lui,
	set gp to zero when --no-relax-gp, then we should still keep the
	x0 base relaxation.
	(_bfd_riscv_relax_section): Enable _bfd_riscv_relax_pc when
	--no-relax-gp, we will disable the gp relaxation in the
	_bfd_riscv_relax_pc.
2023-04-28 14:27:35 +08:00
Nelson Chu
a48ddc3b57 RISC-V: Relax R_RISCV_[PCREL_]LO12_I/S to R_RISCV_GPREL_I/S for undefined weak.
bfd/
	*elfnn-riscv.c (_bfd_riscv_relax_lui): For undefined weak symbol,
	just relax the R_RISCV_LO12_I/S to R_RISCV_GPREL_I/S, and then don't
	update the rs1 to zero until relocate_section.
	(_bfd_riscv_relax_pc): Likewise, but for R_RISCV_PCREL_LO12_I/S.
2023-04-28 14:27:32 +08:00
Alan Modra
143a12bd5a Re: Keeping track of rs6000-coff archive element pointers
Commit de7b90610e left a hole in the element checking, explained by
the comment added to _bfd_xcoff_openr_next_archived_file.  While
fixing this, tidy some types used to hold unsigned values so that
casts are not needed to avoid signed/unsigned comparison warnings.
Also tidy a few things in xcoff.h.

bfd/
	* coff-rs6000.c (_bfd_xcoff_openr_next_archived_file): Check
	that we aren't pointing back at the last element.  Make
	filestart a ufile_ptr.  Update for xcoff_artdata change.
	(_bfd_strntol, _bfd_strntoll): Return unsigned values.
	(_bfd_xcoff_slurp_armap): Make off a ufile_ptr.
	(add_ranges): Update for xcoff_artdata change.
	* libbfd-in.h (struct artdata): Make first_file_filepos a
	ufile_ptr.
	* libbfd.h: Regenerate.
include/
	* coff/xcoff.h (struct xcoff_artdata): Replace min_elt with
	ar_hdr_size.
	(xcoff_big_format_p): In the !SMALL_ARCHIVE case return true
	for anything but a small archive.
2023-04-28 15:19:59 +09:30
Alan Modra
4cb2aab8ab Remove deprecated bfd_read
20+ years is long enough to warn.

	* bfd-in.h (bfd_read, bfd_write): Don't define
	(_bfd_warn_deprecated): Don't declare.
	* bfd-in2.h: Regenerate.
	* libbfd.c (_bfd_warn_deprecated): Delete.
2023-04-28 15:19:59 +09:30
Alan Modra
6b25859164 Make bfd_byte an int8_t, flagword a uint32_t
* bfd-in.h (bfd_byte): Typedef as int8_t.
	(flagword): Typedef as uint32_t.
	(bfd_vma, bfd_signed_vma, bfd_size_type, symvalue): Use stdint
	types in !BFD64 case.
	* bfd-in2.h: Regenerate.
2023-04-28 15:19:44 +09:30
GDB Administrator
5a8e7e1332 Automatic date update in version.in 2023-04-28 00:00:28 +00:00
GDB Administrator
0bda45b270 Automatic date update in version.in 2023-04-27 00:00:31 +00:00
Philipp Tomsich
1656d3f8ef RISC-V: Support XVentanaCondOps extension
Ventana Micro has published the specification for their
    XVentanaCondOps ("conditional ops") extension at
      https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf
    which contains two new instructions
      - vt.maskc
      - vt.maskcn
    that can be used in constructing branchless sequences for
    various conditional-arithmetic, conditional-logical, and
    conditional-select operations.

    To support such vendor-defined instructions in the mainline binutils,
    this change also adds a riscv_supported_vendor_x_ext secondary
    dispatch table (but also keeps the behaviour of allowing any unknow
    X-extension to be specified in addition to the known ones from this
    table).

    As discussed, this change already includes the planned/agreed future
    requirements for X-extensions (which are likely to be captured in the
    riscv-toolchain-conventions repository):
      - a public specification document is available (see above) and is
        referenced from the gas-documentation
      - the naming follows chapter 27 of the RISC-V ISA specification
      - instructions are prefixed by a vendor-prefix (vt for Ventana)
        to ensure that they neither conflict with future standard
        extensions nor clash with other vendors

    bfd/ChangeLog:

            * elfxx-riscv.c (riscv_get_default_ext_version): Add riscv_supported_vendor_x_ext.
            (riscv_multi_subset_supports): Recognize INSN_CLASS_XVENTANACONDOPS.

    gas/ChangeLog:

            * doc/c-riscv.texi: Add section to list custom extensions and
              their documentation URLs.
            * testsuite/gas/riscv/x-ventana-condops.d: New test.
            * testsuite/gas/riscv/x-ventana-condops.s: New test.

    include/ChangeLog:

            * opcode/riscv-opc.h Add vt.maskc and vt.maskcn.
            * opcode/riscv.h (enum riscv_insn_class): Add INSN_CLASS_XVENTANACONDOPS.

    opcodes/ChangeLog:

            * riscv-opc.c: Add vt.maskc and vt.maskcn.

    Series-version: 1
    Series-to: binutils@sourceware.org
    Series-cc: Kito Cheng <kito.cheng@sifive.com>
    Series-cc: Nelson Chu <nelson.chu@sifive.com>
    Series-cc: Greg Favor <gfavor@ventanamicro.com>
    Series-cc: Christoph Muellner <cmuellner@gcc.gnu.org>
2023-04-26 14:09:34 -06:00
GDB Administrator
9d4f5cabe2 Automatic date update in version.in 2023-04-26 00:00:45 +00:00
GDB Administrator
25035d2122 Automatic date update in version.in 2023-04-25 00:00:29 +00:00
Nick Clifton
6946d29241 New georgian translation for the bfd sub-directory 2023-04-24 13:06:18 +01:00
Alan Modra
2043ddb218 asan: segfault in coff_mangle_symbols
The testcase managed to trigger creation of a wild pointer in
coff_slurp_symbol_table.  Stop that happening, and fix an unrelated
problem I happened to see in bfd_coff_get_syment.

	* coff-bfd.c (bfd_coff_get_syment): Clear fix_value after
	converting n_value from a pointer to an index.
	* coffcode.h (coff_slurp_symbol_table <C_BSTAT>): Sanity check
	symbol value before converting to a pointer.
2023-04-24 20:59:38 +09:30
GDB Administrator
d4a174a5cb Automatic date update in version.in 2023-04-24 00:00:29 +00:00
YunQiang Su
9171de358f MIPS: default output r6 obj if the triple is r6
If the triple is mipsisa32r6* or mipsisa64r6*, ld/as should output
r6 objects by default.
The triples with vendor `img` should do same.

The examples include:
	as xx.s -o xx.o
	ld -r -b binary xx.dat -o xx.o
2023-04-23 14:32:43 +08:00
YunQiang Su
32f1c80375 MIPS: support mips*64 as CPU and gnuabi64 as ABI
For MIPS64r6 ports, Debian as an example, `mipsisa64r6el` is
used as the cpu name in triple.
Let's recognize them by `mips*64*(el)`.

For 64bit Ports, like Debian's mips64el and mips64r6el ports,
`gnuabi64` is used as the abi section.
Let's use N64 abi by default for the triple with gnuabi64.
2023-04-23 14:32:43 +08:00
GDB Administrator
630e5a235e Automatic date update in version.in 2023-04-23 00:00:31 +00:00
GDB Administrator
d89504f0d9 Automatic date update in version.in 2023-04-22 00:00:20 +00:00
Jan Beulich
ae272fb8a5 bfd: fix STRICT_PE_FORMAT build
A semicolon was missing and "name" needs to be pointer-to-const. While
adding "const" there, also add it for "sec".
2023-04-21 12:05:56 +02:00
Lifang Xia
0699f2d795 RISC-V: Optimize relaxation of gp with max_alignment.
This should be the first related issue, which posted in riscv-gnu-toolchain,
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/497

If the output sections are not between gp and the symbol, then their alignments
shouldn't affect the gp relaxation.  However, this patch improves this idea
even more, it limits the range to the gp+-2k, which means only the output
section which are in the [gp-2K, gp+2K) range need to be considered.

Even if the output section candidates may be different for each relax passes,
the symbol that can be relaxed ar this round will not be truncated at next
round.  That is because this round you can do relaxation which means that the
section where the symbol is located is within the [gp-2K, gp+2K) range, so all
the output section alignments between them should be considered.  In other
words, if the alignments between them may cause truncated, then we should
already preserve the size and won't do the gp relaxation this time.

This patch can resolve the github issue which mentioned above, and also passed
all gcc/binutils regressions of riscv-gnu-toolchain, so should be worth and
safe enough to commit.

Originally, this patch also do the same optimization for the call relaxations,
https://sourceware.org/pipermail/binutils/2022-October/123918.html
But just in case there is something that has not been considered, we only
deal with the gp relaxation at this time.

bfd/
	* elfnn-riscv.c (riscv_elf_link_hash_table): Added new bfd_vma,
	max_alignment_for_gp.  It is used to record the maximum alignment of
	the output sections, which are in the [gp-2K, gp+2k) range.
	(riscv_elf_link_hash_table_create): Init max_alignment_for_gp to -1.
	(_bfd_riscv_get_max_alignment): Added new parameter, gp.  If gp is
	zero, then all the output section alignments are possible candidates;
	Otherwise, only the output sections which are in the [gp-2K, gp+2K)
	range need to be considered.
	(_bfd_riscv_relax_lui): Called _bfd_riscv_get_max_alignment with the
	non-zero gp if the max_alignment_for_gp is -1.
	(_bfd_riscv_relax_pc): Likewise.
	(_bfd_riscv_relax_section): Record the first input section, so that
	we can reset the max_alignment_for_gp for each repeated relax passes.
ld/
	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
	* testsuite/ld-riscv-elf/relax-max-align-gp.*: New testcase.  It fails
	without this patch.
2023-04-21 15:47:47 +08:00
Alan Modra
de7b90610e Keeping track of rs6000-coff archive element pointers
rs6000-coff archives use a linked list of file offsets, where each
element points to the next element.  The idea is to allow updating of
large archives quickly without rewriting the whole archive.  (binutils
ar does not do this.)  Unfortunately this is an easy target for
fuzzers to create an archive that will cause ar or any other tool
processing archives to hang.  I'd implemented guards against pointing
back to the previous element, but of course that didn't last long.

So this patch implements a scheme to keep track of file offset ranges
used by elements as _bfd_read_ar_hdr is called for each element.  See
the add_range function comment.  I needed a place to stash the list,
so chose the obvious artdata.tdata backend extension to archive's
tdata, already used by xcoff.  That involved a little cleanup, because
while it would be possible to continue using different artdata.tdata
for the big and small archives, it's nicer to use a union.

If anyone is concerned this list of element ranges might grow large
and thus significantly slow down the tools, adjacent ranges are
merged.  In fact something like "ar t" will only ever have one range
on xcoff archives generated by binutils/ar.  I agree there might still
be a problem with ld random element access via the armap.

include/
	* coff/xcoff.h (SIZEOF_AR_FILE_HDR): Use sizeof.
	(SIZEOF_AR_FILE_HDR_BIG, SIZEOF_AR_HDR, SIZEOF_AR_HDR_BIG): Likewise.
	(struct ar_ranges, struct xcoff_artdata): New.
	(x_artdata): Define.
	(xcoff_big_format_p): Rewrite.
	(xcoff_ardata, xcoff_ardata_big): Delete.
bfd/
	* coff-rs6000.c: Replace uses of xcoff_ardata and
	xcoff_ardata_big throughout file.
	(_bfd_xcoff_archive_p): Adjust artdata.tdata allocation.
	(add_range): New function.
	(_bfd_xcoff_read_ar_hdr): Use it here.  Fix memory leak.
	(_bfd_xcoff_openr_next_archived_file): Remove old sanity
	checks.  Set up range for header.
	(xcoff_write_archive_contents_old): Make the temporary
	artdata.tdata used here to pass info down to
	_bfd_compute_and_write_armap a struct xcoff_artdata.
	(xcoff_write_archive_contents_big): Likewise.
	* coff64-rs6000.c: Replace uses of xcoff_ardata and
	xcoff_ardata_big throughout file.
	(xcoff64_archive_p): Adjust artdata.tdata allocation.
2023-04-21 11:51:06 +09:30
Alan Modra
3bc69c1867 Delete struct artdata archive_head
This element is unused.  Ideally we'd be moving archive_head and
other archive specific fields from struct bfd to here, but that's a
much larger change than this little bit of cleanup.

	* libbfd-in.h (struct artdata): Delete archive_head.
	* libbfd.h: Regenerate.
	* archive.c,
	* coff-rs6000.c,
	* coff64-rs6000.c: Delete comments mentioning artdata archive_head.
2023-04-21 11:51:06 +09:30
GDB Administrator
0014c67d3b Automatic date update in version.in 2023-04-21 00:00:20 +00:00
GDB Administrator
99eca30b2c Automatic date update in version.in 2023-04-20 00:00:23 +00:00
Alan Modra
509fdd5a87 sh4-linux segfaults running ld testsuite
Segmentation fault
FAIL: pr22269-1 (static pie undefined weak)
and others running "visibility (hidden undef)" tests

No code has any right to access bfd_link_hash_entry u.def without
first checking the type, and SYMBOL_REFERENCES_LOCAL isn't sufficient.

	* elf32-sh.c (sh_elf_finish_dynamic_symbol): Don't use relative
	relocs in GOT unless symbol is defined.
2023-04-20 09:03:53 +09:30
Alan Modra
3b37f0f1b8 Yet another out-of-memory fuzzed object
Do I care about out of memory conditions triggered by fuzzers?  Not
much.  Your operating system ought to be able to handle it by killing
the memory hog.  Oh well, this one was an element of a coff-alpha
archive that said it was a little less that 2**64 in size.  The
coff-alpha compression scheme expands at most 8 times, so we can do
better in bfd_get_file_size.

	* bfdio.c (bfd_get_file_size): Assume elements in compressed
	archive can only expand a maximum of eight times.
	* coffgen.c (_bfd_coff_get_external_symbols): Sanity check
	size of symbol table agains file size.
2023-04-20 09:03:53 +09:30
Alan Modra
685b44ee81 buffer overflow in print_symname
* ecoff.c (_bfd_ecoff_slurp_symbolic_info): Zero terminate
	string sections.
2023-04-20 09:03:53 +09:30
GDB Administrator
b27cafb9e0 Automatic date update in version.in 2023-04-19 00:00:33 +00:00
GDB Administrator
a0fc6845a9 Automatic date update in version.in 2023-04-18 00:00:35 +00:00
Nick Clifton
c53c6186c8 Make the .rsrc section read only.
PR 30142
  * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable.
  * rescoff.c (write_coff_file): Add the SEC_READONLY flag to the .rsrc section.
2023-04-17 17:19:21 +01:00
GDB Administrator
55003828f4 Automatic date update in version.in 2023-04-17 00:00:21 +00:00
GDB Administrator
b01ee1bf90 Automatic date update in version.in 2023-04-16 00:00:18 +00:00
GDB Administrator
672008e6dc Automatic date update in version.in 2023-04-15 00:00:19 +00:00
GDB Administrator
463b1a1ad2 Automatic date update in version.in 2023-04-14 00:00:26 +00:00
Alan Modra
24a6c5ae36 Preserve a few more bfd fields in check_format_matches
AOUT and COFF targets set symcount and start_address in their object_p
functions.  If these are used anywhere then it would pay to save and
restore them so that a successful match gets the values expected
rather than that for a later unsuccessful target match.

	* format.c (struct bfd_preserve): Move some fields.  Add
	symcount, read_only and start_address.
	(bfd_preserve_save): Save..
	(bfd_preserve_restore): ..and restore..
	(bfd_reinit): ..and zero new fields.
2023-04-13 15:03:16 +09:30
Alan Modra
5d1fefd3b3 Re: pe_ILF_object_p and bfd_check_format_matches
The last patch wasn't quite correct.  bfd_preserve_restore also needs
to handle an in-memory to file backed transition, seen in a testcase
ILF object matching both pei-arm-little and pei-arm-wince-little.
There the first match is saved in preserve_match, and restored at the
end of the bfd_check_format_matches loop making the bfd in-memory.  On
finding more than one match the function wants to restore the bfd back
to its original state with another bfd_preserve_restore call before
exiting with a bfd_error_file_ambiguously_recognized error.

It is also not correct to restore abfd->iostream unless the iovec
changes.  abfd->iostream is a FILE* when using cache_iovec, and if
the file has been closed and reopened the iostream may have changed.

	* format.c (io_reinit): New function.
	(bfd_reinit, bfd_preserve_restore): Use it.
2023-04-13 12:26:00 +09:30
GDB Administrator
89558daae7 Automatic date update in version.in 2023-04-13 00:00:22 +00:00
YunQiang Su
0a12bf174d MIPS: make mipsisa32 and mipsisa64 link more systematic
Introduce `static const struct mips_mach_extension mips_mach_32_64[]`
and `mips_mach_extends_32_64 (unsigned long base, unsigned long extension)`,
to make mipsisa32 and mipsisa64 interlink more systemtic.

Normally, the ISA mipsisa64rN has two subset: mipsisa64r(N-1) and
mipsisa32rN. `mips_mach_extensions` can hold only mipsisa64r(N-1),
so we need to introduce a new instruction `mips_mach_32_64`, which holds the pair 32vs64.

Note: R6 is not compatible with pre-R6.

bfd/ChangeLog:

	* elfxx-mips.c (mips_mach_extends_p): make mipsisa32 and
	  mipsisa64 interlink more systematic.
	  (mips_mach_32_64): new struct added.
	  (mips_mach_extends_32_64): new function added.
2023-04-12 13:25:46 +01:00
Alan Modra
93c6e8c3c1 PR30326, uninitialised value in objdump compare_relocs
This is a fuzzing PR, with a testcase involving a SHF_ALLOC and
SHF_COMPRESSED SHT_RELA section, ie. a compressed dynamic reloc
section.  BFD doesn't handle compressed relocation sections, with most
of the code reading relocs using sh_size (often no bfd section is
created) but in the case of SHF_ALLOC dynamic relocs we had some code
using the bfd section size.  This led to a mismatch, sh_size is
compressed, size is uncompressed, and from that some uninitialised
memory.  Consistently using sh_size is enough to fix this PR, but I've
also added tests to exclude SHF_COMPRESSED reloc sections from
consideration.

	PR 30362
	* elf.c (bfd_section_from_shdr): Exclude reloc sections with
	SHF_COMPRESSED flag from normal reloc processing.
	(_bfd_elf_get_dynamic_reloc_upper_bound): Similarly exclude
	SHF_COMPRESSED sections from consideration.  Use sh_size when
	sizing to match slurp_relocs.
	(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
	(_bfd_elf_get_synthetic_symtab): Use NUM_SHDR_ENTRIES to size
	plt relocs.
	* elf32-arm.c (elf32_arm_get_synthetic_symtab): Likewise.
	* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_get_synthetic_symtab): Likewise.
2023-04-12 14:13:46 +09:30
Alan Modra
32011d23a8 ubsan: dwarf2.c:2232:7: runtime error: index 16 out of bounds
Except it isn't out of bounds because space for a larger array has
been allocated.

	* dwarf2.c (struct trie_leaf): Make ranges a C99 flexible array.
	(alloc_trie_leaf, insert_arange_in_trie): Adjust sizing.
2023-04-12 09:40:14 +09:30