Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
PR 26435
PR 26436
* elf32-cr16.c (cr16_elf_final_link_relocate): Calculate reloc_bits
without undefined behaviour.
|
|
|
|
DW_AT_specification tags.
PR 26520
* dwarf2.c (scan_unit_for_symbols): Add member entries to the
variable table.
|
|
|
|
PR 26495
* elfnn-ia64.c (get_dyn_sym_info): Don't bsearch or look at last
element when count is zero. bfd_realloc when shrinking.
|
|
|
|
And some more.
PR 26418
* ecofflink.c (bfd_ecoff_write_accumulated_debug): Don't write
zero size buffers.
|
|
The previous "fix" tested the wrong value.
PR 26418
* ecofflink.c (WRITE): Really don't write zero size chunks.
|
|
symbols on targets with octets that are larger than one byte.
PR 26543
* linker.c (bfd_generic_define_common_symbol): Force the alignment
to 1 if the section has now alignment requirement.
|
|
bfd
* elf32-csky.c (csky_archs): Fix arch names.
(csky_find_arch_with_name): New.
(elf32_csky_merge_attributes): New.
(csky_elf_merge_private_bfd_data): Add process of merge
attribute section.
(elf32_csky_obj_attrs_arg_type): New.
(elf32_csky_obj_attrs_handle_unknown): New.
(elf_backend_obj_attrs_vendor): Define.
(elf_backend_obj_attrs_section): Define.
(elf_backend_obj_attrs_arg_type): Define.
(elf_backend_obj_attrs_section_type): Define.
binutils/
* readelf.c (get_csky_section_type_name): New.
(get_section_type_name): Add handler for CSKY.
(display_csky_attribute): New.
(process_arch_specific): Add handler for CSKY.
* testsuite/binutils-all/strip-3.d: Remove .csky.attributes
section.
elfcpp/
* elfcpp.h (enum SHT): New enum SHT_CSKY_ATTRIBUTES.
gas/
* gas/config/tc-csky.c (md_begin): Set attributes.
(isa_flag): Change type to unsigned 64 bits.
(struct csky_cpu_info): Likewise.
(struct csky_macro_info): Likewise.
(set_csky_attribute): New.
* testsuite/gas/csky/802j.d: Ignore .csky.attributes section.
* testsuite/gas/csky/all.d: Likewise.
* testsuite/gas/csky/bsr1.d: Likewise.
* testsuite/gas/csky/csky_vdsp.d: Likewise.
* testsuite/gas/csky/cskyv2_all.d: Likewise.
* testsuite/gas/csky/cskyv2_ck803r2.d: Likewise.
* testsuite/gas/csky/cskyv2_ck860.d: Likewise.
* testsuite/gas/csky/cskyv2_dsp.d: Likewise.
* testsuite/gas/csky/cskyv2_elrw.d: Likewise.
* testsuite/gas/csky/cskyv2_float.d: Likewise.
* testsuite/gas/csky/enhance_dsp.d: Likewise.
* testsuite/gas/csky/java.d: Likewise.
* testsuite/gas/csky/v1_float.d: Likewise.
* testsuite/gas/csky/v2_float_part1.d: Likewise.
* testsuite/gas/csky/v2_float_part2.d: Likewise.
* testsuite/gas/csky/v2_tls_gd.d: Likewise.
* testsuite/gas/csky/v2_tls_ie.d: Likewise.
* testsuite/gas/csky/v2_tls_ld.d: Likewise.
* testsuite/gas/csky/v2_tls_le.d: Likewise.
* testsuite/gas/elf/elf.exp: Add handler for CSKY.
* testsuite/gas/elf/section2.e-csky: New.
include/
* elf/csky.h (SHT_CSKY_ATTRIBUTES): Define.
(Tag_CSKY_ARCH_NAME): New enum constant.
(Tag_CSKY_CPU_NAME): Likewise.
(Tag_CSKY_ISA_FLAGS): Likewise.
(Tag_CSKY_DSP_VERSION): Likewise.
(Tag_CSKY_VDSP_VERSION): Likewise.
(Tag_CSKY_FPU_VERSION): Likewise.
(Tag_CSKY_FPU_ABI): Likewise.
(Tag_CSKY_FPU_ROUNDING): Likewise.
(Tag_CSKY_FPU_DENORMAL): Likewise.
(Tag_CSKY_FPU_Exception): Likewise.
(Tag_CSKY_FPU_NUMBER_MODULE): Likewise.
(Tag_CSKY_FPU_HARDFP): Likewise.
(Tag_CSKY_MAX): Likewise.
(VAL_CSKY_DSP_VERSION_EXTENSION): Likewise.
(VAL_CSKY_DSP_VERSION_2): Likewise.
(VAL_CSKY_VDSP_VERSION_1): Likewise.
(VAL_CSKY_VDSP_VERSION_2): Likewise.
(VAL_CSKY_FPU_ABI_SOFT): Likewise.
(VAL_CSKY_FPU_ABI_SOFTFP): Likewise.
(VAL_CSKY_FPU_ABI_HARD): Likewise.
(VAL_CSKY_FPU_HARDFP_HALF): Likewise.
(VAL_CSKY_FPU_HARDFP_SINGLE): Likewise.
(VAL_CSKY_FPU_HARDFP_DOUBLE): Likewise.
* opcode/csky.h (CSKY_ISA_VDSP_V2): Define.
CSKYV1_ISA_E1: Change to long constant type.
CSKYV2_ISA_E1: Likewise.
CSKYV2_ISA_1E2: Likewise.
CSKYV2_ISA_2E3: Likewise.
CSKYV2_ISA_3E7: Likewise.
CSKYV2_ISA_7E10: Likewise.
CSKYV2_ISA_3E3R1: Likewise.
CSKYV2_ISA_3E3R2: Likewise.
CSKYV2_ISA_10E60: Likewise.
CSKY_ISA_TRUST: Likewise.
CSKY_ISA_CACHE: Likewise.
CSKY_ISA_NVIC: Likewise.
CSKY_ISA_CP: Likewise.
CSKY_ISA_MP: Likewise.
CSKY_ISA_MP_1E2: Likewise.
CSKY_ISA_JAVA: Likewise.
CSKY_ISA_MAC: Likewise.
CSKY_ISA_MAC_DSP: Likewise.
CSKY_ISA_DSP: Likewise.
CSKY_ISA_DSP_1E2: Likewise.
CSKY_ISA_DSP_ENHANCE: Likewise.
CSKY_ISA_FLOAT_E1: Likewise.
CSKY_ISA_FLOAT_1E2: Likewise.
CSKY_ISA_FLOAT_1E3: Likewise.
CSKY_ISA_FLOAT_3E4: Likewise.
CSKY_ISA_VDSP: Likewise.
ld/
* emulparams/cskyelf.sh: Support attribute section.
* testsuite/ld-csky/tls-le-v1.d: Match .csky.attributes section.
* ld/testsuite/ld-csky/tls-le.d: Likewise.
* testsuite/ld-elf/non-contiguous.ld: Ignore .csky.attributes
section.
opcodes/
* csky-dis.c (CSKY_DEFAULT_ISA): Define.
(csky_dis_info): Add member isa.
(csky_find_inst_info): Skip instructions that do not belong to
current CPU.
(csky_get_disassembler): Get infomation from attribute section.
(print_insn_csky): Set defualt ISA flag.
* csky.h (CSKY_ISA_VDSP_2): Rename from CSKY_ISA_VDSP_V2.
* csky-opc.h (struct csky_opcode): Change isa_flag16 and
isa_flag32'type to unsigned 64 bits.
|
|
PR19011
bfd * cofflink.c (_bfd_coff_generic_relocate_section): Provide a value
for undefined symbols which will not generate extra warning
messages about truncated relocs.
ld * testsuite/lib/ld-lib.exp (ld_link_defsyms): For PE based targets
define the __main and ___main symbols in terms of the main symbol.
|
|
In fact, we can treate these two relocation as the same one in the
riscv_elf_check_relocs. I have heard that RISC-V lld had made this
improvement, and so had GNU AARCH64, they only need R_AARCH64_CALL26
for calls rather than two seperate relocations.
Beside, the following PLT issue for RISC-V 32-bit glibc seems to be
fixed by applying at least this patch.
<https://sourceware.org/pipermail/libc-alpha/2020-August/117214.html>
I have ran the toolchain regression, and everything seems fine for now.
bfd/
* elfnn-riscv.c (riscv_elf_check_relocs): Treat R_RISCV_CALL
and R_RISCV_CALL_PLT as the same in the riscv_elf_check_relocs.
(riscv_elf_relocate_section): Remove the R_RISCV_CALL for the
unresolved reloc checks.
ld/
testsuite/ld-riscv-elf/lib-nopic-01a.s: Use R_RISCV_JAL rather
than R_RISCV_CALL.
testsuite/ld-riscv-elf/lib-nopic-01b.d: Likewise.
testsuite/ld-riscv-elf/lib-nopic-01b.s: Likewise.
|
|
|
|
PR 26356
* som.c (som_bfd_copy_private_section_data): Issue error when a
subspace is specified without its containing space.
* testsuite/binutils-all/objcopy.exp (objcopy --reverse-bytes): Add
"-j $PRIVATE$" to command on hppa*-*-hpux*.
* testsuite/lib/utils-lib.exp (default_binutils_run): Remove existing
dollar-sign quotes before quoting. Do this prior to generating log
output.
|
|
PR 26469
* elflink.c: Include limits.h.
(CHAR_BIT): Provide fallback define.
(set_symbol_value): Correct complex reloc comment.
(undefined_reference): Set bfd_error.
(BINARY_OP_HEAD, BINARY_OP_TAIL): Split out from..
(BINARY_OP): ..this.
(eval_symbol): Limit shifts. Force unsigned for left shift.
Catch divide by zero.
* configure.ac (AC_CHECK_HEADERS): Combine, sort and add limits.h.
* configure: Regenerate.
* config.in: Regenerate.
|
|
PR 26462
* reloc.c (bfd_check_overflow): Return early if zero bitsize.
|
|
Yes, the target is marked obsolete due to this and other segfaults,
but this one is easy enough to fix.
* elf32-arm.c (elf32_arm_final_link_relocate): Don't segfault
on sym_sec not being output.
|
|
PR 26416
* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Correct "dynamic".
|
|
|
|
testsuite for the AVR target.
PR 26433
* elf32-avr.c (avr_final_link_relocate): Fix undefined shift
behaviour.
(avr_elf32_load_records_from_section): Use bfd_get_16 and
bfd_get_32 to load values from potentially unaligned pointers.
|
|
PR 26416
* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Test for and
ignore local symbols.
(elf64_alpha_relax_got_load): Do not check for local dynamic
symbols.
(OP_LDA, OP_LDAH, OP_LDQ, OP_BR, OP_BSR): Use unsigned constant
values.
(INSN_A) Cast the A parameter to unsigned.
(INSN_AB): Define in terms of INSN_A.
(INSN_ABC): Likewise.
(INSN_ABO): Likewise.
(INSN_AD): Likewise.
|
|
PR 26411
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
unsigned long constant when creating a mask to test for alignment
issues.
|
|
PR 26507
* elf32-xtensa.c (find_removed_literal): Don't bsearch empty map.
|
|
PR 26506
* elf32-xtensa.c (elf_xtensa_combine_prop_entries): Return early
when section is empty.
|
|
PR 26498
* elf32-spu.c (find_function_stack_adjust): Use unsigned vars to
avoid UB left shift.
|
|
PR 26484
PR 26485
PR 26486
PR 26487
PR 26488
PR 26490
* elf64-ppc.c (is_tls_get_addr): Avoid UB &h->elf when h is NULL.
(ppc64_elf_tls_setup): Likewise.
(branch_reloc_hash_match): Likewise.
(build_plt_stub): Likewise.
(ppc64_elf_relocate_section): Likewise.
|
|
PR 26478
* mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
|
|
Another memset(0,0,0)
PR 26475
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
sstubs->contents != NULL.
|
|
PR 26453
* som.c (som_prep_for_fixups): Return early when no symbols.
|
|
PR 26418
* ecofflink.c (WRITE): Don't write size 0 chunks.
|
|
* bfdio.c (bfd_get_file_size): Don't segv on NULL adata.
|
|
An unsigned short value is promoted to int, thus triggering UB on a
left shift of a positive value that results in a negative int.
PR 26415
* vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
|
|
This patch adds support for xBPF, another ISA targetting the BPF
virtual architecture. For now, the primary difference between eBPF
and xBPF is that xBPF supports indirect calls through the
'call %reg' form of the call instruction.
bfd/
* archures.c (bfd_mach_xbpf): Define.
* bfd-in2.h: Regenerate.
* cpu-bpf.c (bfd_xbpf_arch) New.
(bfd_bpf_arch) Update next in list field to point to xbpf arch.
cpu/
* bpf.cpu (arch bpf): Add xbpf mach and isas.
(define-xbpf-isa) New pmacro.
(all-isas) Add xbpfle,xbpfbe.
(endian-isas): New pmacro.
(mach xbpf): New.
(model xbpf-def): Likewise.
(h-gpr): Add xbpf mach.
(f-dstle, f-srcle, dstle, srcle): Add xbpfle isa.
(f-dstbe, f-srcbe, dstbe, srcbe): Add xbpfbe isa.
(define-alu-insn-un): Use new endian-isas pmacro.
(define-alu-insn-bin, define-alu-insn-mov): Likewise.
(define-endian-insn, define-lddw): Likewise.
(dlind, dxli, dxsi, dsti): Likewise.
(define-cond-jump-insn, define-call-insn): Likewise.
(define-atomic-insns): Likewise.
gas/
* config/tc-bpf.c: Add option -mxbpf to select xbpf isa.
* testsuite/gas/bpf/indcall-1.d: New file.
* testsuite/gas/bpf/indcall-1.s: Likewise.
* testsuite/gas/bpf/indcall-bad-1.l: Likewise.
* testsuite/gas/bpf/indcall-bad-1.s: Likewise.
* testsuite/gas/bpf/bpf.exp: Run new tests.
opcodes/
* bpf-desc.c: Regenerate.
* bpf-desc.h: Likewise.
* bpf-opc.c: Likewise.
* bpf-opc.h: Likewise.
* disassemble.c (disassemble_init_for_target): Set bits for xBPF
ISA when appropriate.
|
|
bfd-in2.h is a generated file. Put the new machine where it belongs.
* archures.c (bfd_mach_ck860): Define.
|
|
|
|
When building with gcc with -gdwarf-5 ld tests (including ld-elf/dwarf.exp)
fail because they try to read the .debug_ranges section. But DWARF5
introduces a new .debug_rnglists section that encodes the address ranges
more efficiently. Implement reading the debug_rnglists in bfd/dwarf2.c.
Which makes all tests pass again and fixes several gcc testsuite tests
when defaulting to DWARF5.
* dwarf2.c (struct dwarf2_debug_file): Add dwarf_rnglists_buffer
and dwarf_rnglists_size fields.
(dwarf_debug_sections): Add debug_rnglists.
(dwarf_debug_section_enum): Likewise.
(read_debug_rnglists): New function.
(read_rangelist): New function to call either read_ranges or
read_rnglists. Rename original function to...
(read_ranges): ...this.
(read_rnglists): New function.
|
|
PR 26505
* elf32-xstormy16.c (xstormy16_elf_relax_section): Check
is_elf_hash_table before accessing elf fields.
|
|
PR 26482
* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Ignore sections that
won't be output.
|
|
PR 26463
* elf32-m32c.c (m32c_elf_relax_section): Check is_elf_hash_table
before accessing elf fields.
|
|
PR 26452
* som.c (som_compute_checksum): XOR 32-bit words in header,
not unsigned long sized words.
|
|
PR 26430
* elf-nacl.c (nacl_modify_segment_map): Correct alloc size and
amount copied for elf_segment_map defined with one element
sections array.
|
|
Always reading 32 bits in order to extract addends from instruction
fields is wrong when the field size is smaller. It also leads to
reading past the end of the section. This patch tidies that by
reading the proper field size, which allows some later refetching of
addends to disappear.
PR 26422
* elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate
bfd_get_x size function to read addends out of fields. Apply
rightshift adjustment too. Don't apply the now unnecessary
howto->size shift to branch REL addends. Don't refetch R_ARM_ABS8
and R_ARM_ABS16 addends. Don't refetch thumb branch addends.
Correct R_ARM_THM_JUMP6 addend.
|
|
PR 26419
* elf-m10300.c (mn10300_elf_relax_section): Don't attempt access
before start of section.
|
|
|
|
* elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
before accessing elf_hash_table_id.
* elf32-arc.c (elf_arc_hash_table): Likewise.
* elf32-arm.c (elf32_arm_hash_table): Likewise.
* elf32-avr.c (avr_link_hash_table): Likewise.
* elf32-bfin.c (bfinfdpic_hash_table): Likewise.
* elf32-cris.c (elf_cris_hash_table): Likewise.
* elf32-csky.c (csky_elf_hash_table): Likewise.
* elf32-frv.c (frvfdpic_hash_table): Likewise.
* elf32-hppa.c (hppa_link_hash_table): Likewise.
* elf32-lm32.c (lm32_elf_hash_table): Likewise.
* elf32-m32r.c (m32r_elf_hash_table): Likewise.
* elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
* elf32-m68k.c (elf_m68k_hash_table): Likewise.
* elf32-metag.c (metag_link_hash_table): Likewise.
* elf32-microblaze.c (elf32_mb_hash_table): Likewise.
* elf32-nds32.h (nds32_elf_hash_table): Likewise.
* elf32-or1k.c (or1k_elf_hash_table): Likewise.
* elf32-s390.c (elf_s390_hash_table): Likewise.
* elf32-sh.c (sh_elf_hash_table): Likewise.
* elf32-spu.c (spu_hash_table): Likewise.
* elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
* elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
* elf64-alpha.c (alpha_elf_hash_table): Likewise.
* elf64-hppa.c (hppa_link_hash_table): Likewise.
* elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
* elf64-s390.c (elf_s390_hash_table): Likewise.
* elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
* elfnn-riscv.c (riscv_elf_hash_table): Likewise.
* elfxx-mips.c (mips_elf_hash_table): Likewise.
* elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
* elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
|
|
As reported in [1], _bfd_error_handler() doesn't support '%zu'.
module_name_size is always 32-bits in the data structure we are
extracting it from, so use an unsigned int to store it instead.
[1] https://sourceware.org/pipermail/gdb-patches/2020-August/171391.html
bfd/ChangeLog:
2020-08-21 Jon Turney <jon.turney@dronecode.org.uk>
* elf.c (elfcore_grok_win32pstatus): Change name_size to unsigned
int. Use '%u' format with _bfd_error_handler to render it.
|
|
Stub sections are inserted after sec_info is sized, so have higher ids.
Test flags that will exclude stub sections before looking at the
sec_info array.
PR 26489
* elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc
and code_sec->makes_toc_func_call before sec_info[code_sec->id].
|
|
PR 26492
* elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before
accessing elf_hash_table_id.
|
|
PR 26483
* elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
accessing elf_hash_table_id.
|