Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
bfd/
PR ld/28264
* elflink.c (_bfd_elf_merge_symbol): Change indirect symbol from
IR to undefined.
ld/
PR ld/28264
* testsuite/ld-plugin/lto.exp: Run PR ld/28264 test.
* testsuite/ld-plugin/pr28264-1.d: New file.
* testsuite/ld-plugin/pr28264-2.d: Likewise.
* testsuite/ld-plugin/pr28264-3.d: Likewise.
* testsuite/ld-plugin/pr28264-4.d: Likewise.
* testsuite/ld-plugin/pr28264.c: Likewise.
* testsuite/ld-plugin/pr28264.ver: Likewise.
|
|
PR 28264
PR 26978
* linker.c (_bfd_generic_link_add_one_symbol <MIND>): Check
that string is non-NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bfd/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
'Tag_PACRET_use' case.
binutils/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* readelf.c (arm_attr_tag_PAC_extension): Declare.
(arm_attr_public_tags): Add 'PAC_extension' lookup.
elfcpp/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* arm.h: Define 'Tag_PACRET_use' enum.
gas/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c (arm_convert_symbolic_attribute): Add
'Tag_PACRET_use' to the attribute_table.
include/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf/arm.h (elf_arm_reloc_type): Add 'Tag_PACRET_use'.
|
|
bfd/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
'Tag_BTI_use' case.
binutils/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* readelf.c (arm_attr_tag_PAC_extension): Declare.
(arm_attr_public_tags): Add 'PAC_extension' lookup.
elfcpp/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* arm.h: Define 'Tag_BTI_use' enum.
gas/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c (arm_convert_symbolic_attribute): Add
'Tag_BTI_use' to the attribute_table.
include/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_use'.
|
|
bfd/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
'Tag_BTI_extension' case.
binutils/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* readelf.c (arm_attr_tag_PAC_extension): Declare.
(arm_attr_public_tags): Add 'PAC_extension' lookup.
elfcpp/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* arm.h: Define 'Tag_BTI_extension' enum.
gas/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c (arm_convert_symbolic_attribute): Add
'Tag_BTI_extension' to the attribute_table.
include/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_extension'.
|
|
bfd/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
'Tag_PAC_extension' case.
binutils/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* readelf.c (arm_attr_tag_PAC_extension): Declare.
(arm_attr_public_tags): Add 'PAC_extension' lookup.
elfcpp/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* arm.h: Define 'Tag_PAC_extension' enum.
gas/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c (arm_convert_symbolic_attribute): Add
'Tag_PAC_extension' to the attribute_table.
include/
2021-07-06 Andrea Corallo <andrea.corallo@arm.com>
* elf/arm.h (elf_arm_reloc_type): Add 'Tag_PAC_extension'.
|
|
|
|
|
|
|
|
|
|
Since ns32k-netbsd is as yet not removed, just marked obsolete,
the target should still be accepted with --enable-obsolete.
I also enabled ns32k-openbsd in ld since there doesn't seem to be a
good reason why that target is not supported there but is elsewhere.
bfd/
* config.bfd: Allow ns32k-netbsd.
ld/
* configure.tgt: Allow ns32k-openbsd.
|
|
|
|
|
|
As discussed previously, a.out support is now quite deprecated, and in
some cases removed, in both Binutils itself and NetBSD, so this legacy
default makes little sense. `netbsdelf*` and `netbsdaout*` still work
allowing the user to be explicit about there choice. Additionally, the
configure script warns about the change as Nick Clifton requested.
One possible concern was the status of NetBSD on NS32K, where only a.out
was supported. But per [1] NetBSD has removed support, and if it were to
come back, it would be with ELF. The binutils implementation is
therefore marked obsolete, per the instructions in the last message.
With that patch and this one applied, I have confirmed the following:
--target=i686-unknown-netbsd
--target=i686-unknown-netbsdelf
builds completely
--target=i686-unknown-netbsdaout
properly fails because target is deprecated.
--target=vax-unknown-netbsdaout builds completely except for gas, where
the target is deprecated.
[1]: https://mail-index.netbsd.org/tech-toolchain/2021/07/19/msg004025.html
---
bfd/config.bfd | 43 +++++++++++++--------
bfd/configure.ac | 5 +--
binutils/testsuite/binutils-all/nm.exp | 2 +-
binutils/testsuite/lib/binutils-common.exp | 7 +---
config/picflag.m4 | 4 +-
gas/configure.tgt | 9 +++--
gas/testsuite/gas/arm/blx-bl-convert.d | 2 +-
gas/testsuite/gas/arm/blx-local-thumb.d | 2 +-
gas/testsuite/gas/sh/basic.exp | 2 +-
gdb/configure.host | 34 +++++++----------
gdb/configure.tgt | 2 +-
gdb/testsuite/gdb.asm/asm-source.exp | 6 +--
intl/configure | 2 +-
ld/configure.tgt | 44 +++++++++++-----------
ld/testsuite/ld-arm/arm-elf.exp | 4 +-
ld/testsuite/ld-elf/elf.exp | 2 +-
ld/testsuite/ld-elf/shared.exp | 4 +-
libiberty/configure | 4 +-
|
|
Relocation offset checks were completely missing in the rl78 backend,
allowing a relocation to write over memory anywhere. This was true
for rl78_special_reloc, a function primarily used when applying debug
relocations, and in rl78_elf_relocate_section used by the linker.
This patch fixes those problems by correcting inaccuracies in the
relocation howtos, then uses those howtos to sanity check relocation
offsets before applying relocations. In addition, the patch
implements overflow checking using the howto information rather than
the ad-hoc scheme implemented in relocate_section. I implemented the
overflow checking in rl78_special_reloc too.
* elf32-rl78.c (RL78REL, RL78_OP_REL): Add mask parameter.
(rl78_elf_howto_table): Set destination masks. Correct size and
bitsize of DIR32_REV. Correct complain_on_overflow for many relocs
as per tests in relocate_section. Add RH_SFR. Correct bitsize
for RH_SADDR. Set size to 3 and bitsize to 0 for all OP relocs.
(check_overflow): New function.
(rl78_special_reloc): Check that reloc address is within section.
Apply relocations using reloc howto. Check for overflow.
(RANGE): Delete.
(rl78_elf_relocate_section): Sanity check r_offset. Perform
overflow checking using reloc howto.
|
|
|
|
|
|
|
|
|
|
|
|
PR 28186
* elf.c (_bfd_elf_fixup_group_sections): Don't segfault on
objcopy/strip with NULL output_section.
|
|
This is a bit more than just preventing the divide by zero. Most of
the patch is tidying up error reporting, so that for example, linking
an object file with a reloc stack underflow produces a linker error
rather than just displaying a message that might be ignored.
PR 28176
* elf32-rl78.c (RL78_STACK_PUSH, RL78_STACK_POP): Delete.
(rl78_stack_push, rl78_stack_pop): New inline functions.
(rl78_compute_complex_reloc): Add status and error message params.
Use new inline stack handling functions. Report stack overflow
or underflow, and divide by zero.
(rl78_special_reloc): Return status and error message from
rl78_compute_complex_reloc.
(rl78_elf_relocate_section): Similarly. Modernise reloc error
reporting. Delete unused bfd_reloc_other case. Don't assume
DIR24S_PCREL overflow is due to undefined function.
(rl78_offset_for_reloc): Adjust to suit rl78_compute_complex_reloc.
|
|
|
|
It matters not at all if pc is incremented from its initial NULL
value, but avoid this silly runtime ubsan error.
* doc/chew.c (perform): Avoid incrementing NULL pc.
|
|
This patch is more about the style of bounds checking we ought to use,
rather than a real problem. An overflow of "octet + reloc_size" can
only happen with huge sections which would certainly cause out of
memory errors.
* reloc.c (bfd_reloc_offset_in_range): Avoid possible overflow.
|
|
The obj_convert table shouldn't be accessed without first checking the
index against the table size.
PR 28175
* coff-tic30.c (reloc_processing): Sanity check reloc symbol index.
* coff-z80.c (reloc_processing): Likewise.
* coff-z8k.c (reloc_processing): Likewise.
|
|
Indexing the howto table was seriously broken by a missing entry, and
use of assertions about user input rather than testing the input.
PR 28173
* elf32-nds32.c (nds32_elf_howto_table): Add missing empty howto.
(bfd_elf32_bfd_reloc_type_table_lookup): Replace assertions with
range checks. Return NULL if unsupported reloc type. Remove
dead code. Take an unsigned int param.
(nds32_info_to_howto_rel): Test for NULL howto or howto name
return from lookup. Remove assertion.
(nds32_info_to_howto): Remove unnecessary ATTRIBUTE_UNUSED.
Test for NULL howto or howto name return from lookup.
|
|
bfin pcrel24 relocs are weird, they apply to the reloc address minus
two. That means reloc addresses of 0 and 1 are invalid. Check that,
and fix other reloc range checking.
PR 28172
* elf32-bfin.c (bfin_pcrel24_reloc): Correct reloc range check.
(bfin_imm16_reloc, bfin_byte4_reloc, bfin_bfd_reloc): Likewise.
(bfin_final_link_relocate): Likewise.
|
|
|
|
PR 28167
* vms-alpha.c (build_module_list): Malloc and free section contents.
Don't read past end of section.
|
|
Some of the code paths unpacking mips relocs left arelent->sym_ptr_ptr
uninitialised.
PR 28166
* elf64-mips.c (mips_elf64_slurp_one_reloc_table): Don't leave
sym_ptr_ptr uninitialised.
|
|
PR 28165
* elf32-rx.c (rx_elf_howto_table): Add missing empty entries.
(rx_info_to_howto_rela): Assert rx_elf_howto_table is correct size.
Use actual size when sanity checking r_type.
|
|
|
|
For the testcase in the PR, _bfd_mips_elf32_gprel16_reloc is passed a
NULL output_bfd. As expected for reloc special functions if called by
objdump or when final linking. The function attempts to find the
output by
output_bfd = symbol->section->output_section->owner;
That makes some sense, since when handling a gp-relative reloc we need
the relevant gp to which the symbol is relative. Possibly the gp
value can be one for a shared library? But that doesn't seem useful
or supported by the various abi docs and won't work as written.
Symbols defined in shared libraries have section->output_section
NULL, and what's more the code in mips_elf_assign_gp isn't set up to
look at shared library symbols.
Also, if the symbol is a SHN_ABS one the owner of *ABS* section is
NULL, which will result in the testcase segfault. The only gp to
which an absolute symbol can be relative is the linker output bfd when
linking, or the input bfd when not. This patch arranges to do that
for all gp-relative reloc symbols.
* elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Don't use the
section symbol to find the output bfd, use input_section.
(mips_elf_gprel32_reloc, mips16_gprel_reloc): Likewise.
* elf64-mips.c (mips_elf64_gprel16_reloc): Likewise.
(mips_elf64_literal_reloc, mips_elf64_gprel32_reloc): Likewise.
(mips16_gprel_reloc): Likewise.
|
|
Since undefined version can't be used to resolve any references without
the original definition, treat it as hidden.
bfd/
PR binutils/28158
* elf.c (_bfd_elf_get_symbol_version_string): Treat undefined
version as hidden.
ld/
PR binutils/28158
* testsuite/ld-elf/linux-x86.exp: Run PR binutils/28158 tests.
* testsuite/ld-elf/pr28158-1.c: New file.
* testsuite/ld-elf/pr28158-2.S: Likewise.
* testsuite/ld-elf/pr28158.nd: Likewise.
* testsuite/ld-elf/pr28158.rd: Likewise.
* testsuite/ld-elf/pr28158.t: Likewise.
* testsuite/ld-elfvers/vers2.dsym: Updated.
* testsuite/ld-elfvers/vers3.dsym: Likewise.
* testsuite/ld-elfvers/vers6.dsym: Likewise.
* testsuite/ld-elfvers/vers19.dsym: Likewise.
* testsuite/ld-elfvers/vers22.dsym: Likewise.
* testsuite/ld-elfvers/vers23.dsym: Likewise.
* testsuite/ld-elfvers/vers23d.dsym: Likewise.
* testsuite/ld-elfvers/vers27d4.dsym: Likewise.
* testsuite/ld-elfvers/vers28c.dsym: Likewise.
|
|
* coffcode.h (coff_set_alignment_hook): Test that the resulting
reloc count is not less than 0xffff.
|
|
|
|
|