aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-08-02libctf: fix ref leak of names of newly-inserted non-root-visible typesbinutils-2_36-branchNick Alcock1-4/+4
A bug in ctf_dtd_delete led to refs in the string table to the names of non-root-visible types not being removed when the DTD was. This seems harmless, but actually it would lead to a write down a pointer into freed memory if such a type was ctf_rollback()ed over and then the dict was serialized (updating all the refs as the strtab was serialized in turn). Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62 ("libctf: create: non-root-visible types should not appear in name tables") which is included in binutils 2.35. libctf/ * ctf-create.c (ctf_dtd_delete): Remove refs for all types with names, not just root-visible ones.
2021-10-07PR28422, build_id use-after-freeAlan Modra1-0/+1
This fixes a bug in commit 5d9bbb73c1df. All fields preserved from a bfd in struct bfd_preserve need to be cleared in bfd_reinit. PR 28422 * format.c (bfd_reinit): Clear build_id. (cherry picked from commit 6d661cdc5be46e890ed9255e749806f46a88e26c)
2021-08-19[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcsAlan Modra1-0/+2
Fixes a silly mistake in calculating the address of -Os out-of-line register save/restore function copies. Copies of these linker defined functions are added to stub sections when the original (in target->savres_section) can't be reached. * powerpc.cc (Target_powerpc::Relocate::relocate): Correct address calculation of out-of-line save/restore function copies. (cherry picked from commit 89c905a342d2cb35ebc4d66ad7cdca581b5134c3)
2021-08-19[GOLD] PR27815, gold fails to build with latest GCCAlan Modra1-2/+2
...gold/gc.h:250:37: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [-Werror] 250 | (*secvec).push_back(Section_id(NULL, 0)); | ^~~~~~~~~~~~~~~~~~~ PR gold/27815 * gc.h (gc_process_relocs): Use nullptr in Section_id constructor. Don't use nullptr, it requires -std=c++11 on versions of gcc prior to 6.1. It would be possible to arrange to pass -std=c++11 automatically when required (top level configure does that for gcc builds) but that seems overkill and since we're not up-to-date on the top level config files would mean someone would need to sync those over. PR gold/27815 * gc.h (gc_process_relocs): Use cast in Section_id constructor. https://en.cppreference.com/w/cpp/types/NULL says NULL might be defined as nullptr. https://en.cppreference.com/w/cpp/language/reinterpret_cast says reinterpret_cast can't be used on nullptr. PR gold/28106 PR gold/27815 * gc.h (gc_process_relocs): Use static_cast in Section_id constructor. (cherry picked from commit 1f1fb219fdc4f96fd967e6173e9090c4c4917e96) (cherry picked from commit 5d7f11f0e76ca290e3745c8836b92a5266cb84e2) (cherry picked from commit b97bd976233ee4d43c2fe18f6356e62779cbe82d)
2021-08-19testsuite: Don't start directives in first columnAlan Modra2-14/+14
Fixes fails on hppa64-hp-hpux11.23 * testsuite/gas/elf/section25.s: Don't start directives in first column. * testsuite/gas/elf/section26.s: Likewise. (cherry picked from commit db543a7de3f3356133ef3f7f7fc9ae444fd55325)
2021-08-19Fix gold to use mallinfo2 if available instead of deprecated mallinfo.Duncan Simpson4-4/+12
gold/ PR gold/26585 * configure.ac: Add check for mallinfo2. * configure: Regenerate. * main.cc (main): Use mallinfo2 if available. PR gold/26585 * main.cc (main): Fix typo in previous patch. PR gold/26585 * config.in: Regenerate from previous commit. (cherry picked from commit 4ee60495054b362530a7471d363e00143ecb5cbe) (cherry picked from commit cc1849716f5c217a38ee416b48da1914a8ab66cb) (cherry picked from commit 9331846e44b34c985017264ee58a31b8bf2d5742)
2021-07-09Backport patch to fix a quadratic slow down in the BFD library.Nick Clifton2-0/+15
PR 28058 bfd * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag. (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
2021-07-09Backportpatch to fix parsing of DWARF fuction and variable tags.Nick Clifton2-27/+117
PR 27484 bfd * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate function and variable tags and a second time to resolve their attributes.
2021-07-03Automatic date update in version.inGDB Administrator1-1/+1
2021-07-02Automatic date update in version.inGDB Administrator1-1/+1
2021-07-01arm: don't treat XScale features as part of the FPU [PR 28031]Richard Earnshaw2-1/+6
Although the XScale and its iwMMX extensions are implemented in the Arm co-processor space, they are not considered to be part of the FPU specification. In particular, they cannot be enabled or disabled via a .fpu directive. It's therefore incorrect to strip these properties when a new .fpu directive is encountered. Note that the legacy Maverick co-processor is considered to be a FPU and it is possible to control this via the .fpu directive. include: PR gas/28031 * opcode/arm.h (FPU_ANY): Exclude XScale-related features.
2021-07-01Automatic date update in version.inGDB Administrator1-1/+1
2021-06-30Automatic date update in version.inGDB Administrator1-1/+1
2021-06-29Automatic date update in version.inGDB Administrator1-1/+1
2021-06-28Automatic date update in version.inGDB Administrator1-1/+1
2021-06-27Automatic date update in version.inGDB Administrator1-1/+1
2021-06-26Automatic date update in version.inGDB Administrator1-1/+1
2021-06-25Automatic date update in version.inGDB Administrator1-1/+1
2021-06-24Automatic date update in version.inGDB Administrator1-1/+1
2021-06-23Automatic date update in version.inGDB Administrator1-1/+1
2021-06-22Automatic date update in version.inGDB Administrator1-1/+1
2021-06-21Automatic date update in version.inGDB Administrator1-1/+1
2021-06-20Automatic date update in version.inGDB Administrator1-1/+1
2021-06-19Automatic date update in version.inGDB Administrator1-1/+1
2021-06-18Automatic date update in version.inGDB Administrator1-1/+1
2021-06-17Automatic date update in version.inGDB Administrator1-1/+1
2021-06-16Automatic date update in version.inGDB Administrator1-1/+1
2021-06-15Automatic date update in version.inGDB Administrator1-1/+1
2021-06-14Automatic date update in version.inGDB Administrator1-1/+1
2021-06-13Automatic date update in version.inGDB Administrator1-1/+1
2021-06-12Automatic date update in version.inGDB Administrator1-1/+1
2021-06-11Automatic date update in version.inGDB Administrator1-1/+1
2021-06-10Automatic date update in version.inGDB Administrator1-1/+1
2021-06-09Automatic date update in version.inGDB Administrator1-1/+1
2021-06-08Automatic date update in version.inGDB Administrator1-1/+1
2021-06-07Automatic date update in version.inGDB Administrator1-1/+1
2021-06-06Automatic date update in version.inGDB Administrator1-1/+1
2021-06-05Automatic date update in version.inGDB Administrator1-1/+1
2021-06-04Automatic date update in version.inGDB Administrator1-1/+1
2021-06-03Automatic date update in version.inGDB Administrator1-1/+1
2021-06-02Automatic date update in version.inGDB Administrator1-1/+1
2021-06-01Automatic date update in version.inGDB Administrator1-1/+1
2021-05-31Automatic date update in version.inGDB Administrator1-1/+1
2021-05-30Automatic date update in version.inGDB Administrator1-1/+1
2021-05-29Automatic date update in version.inGDB Administrator1-1/+1
2021-05-28Automatic date update in version.inGDB Administrator1-1/+1
2021-05-27Automatic date update in version.inGDB Administrator1-1/+1
2021-05-26Automatic date update in version.inGDB Administrator1-1/+1
2021-05-25Gas: Forgot to commit changelogTamar Christina1-0/+11
2021-05-25Arm: Fix forward thumb references [PR gas/25235]Tamar Christina3-1/+64
When assembling a forward reference the symbol will be unknown and so during do_t_adr we cannot set the thumb bit. The bit it set so early to prevent relaxations that are invalid. i.e. relaxing a Thumb2 to Thumb1 insn when the symbol is Thumb. But because it's done so early we miss the case for forward references. This patch changes it so that we additionally check the thumb bit during the internal relocation processing. In principle we should be able to only set the bit during reloc processing but that would require changes to the other relocations that the instruction could be relaxed to. This approach still allows early relaxations (which means that we have less iteration of internal reloc processing) while still fixing the forward reference case. gas/ChangeLog: 2021-05-24 Tamar Christina <tamar.christina@arm.com> PR gas/25235 * config/tc-arm.c (md_convert_frag): Set LSB when Thumb symbol. (relax_adr): Thumb symbols 4 bytes. * testsuite/gas/arm/pr25235.d: New test. * testsuite/gas/arm/pr25235.s: New test. (cherry picked from commit d3e52e120b68bf19552743fbc078e0a759f48cb7)