[Bug ld/26067] Duplicated struct elf_dyn_relocs in ELF backends
https://sourceware.org/bugzilla/show_bug.cgi?id=26067 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=190eb1ddba41aad3a31edead9392473ae9d3bbe3 commit 190eb1ddba41aad3a31edead9392473ae9d3bbe3 Author: H.J. Lu Date: Mon Jun 1 18:18:43 2020 -0700 ELF: Move dyn_relocs to struct elf_link_hash_entry All ELF backends with shared library support have /* Track dynamic relocs copied for this symbol. */ struct elf_dyn_relocs *dyn_relocs; in symbol hash entry. Move dyn_relocs to struct elf_link_hash_entry to reduce code duplication. PR ld/26067 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size. * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Updated. * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs. (elf_arc_link_hash_newfunc): Updated. * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs. (elf32_arm_link_hash_newfunc): Updated. (elf32_arm_copy_indirect_symbol): Likewise. (elf32_arm_check_relocs): Likewise. (readonly_dynrelocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs. (csky_elf_link_hash_newfunc): Updated. (csky_allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. (csky_elf_copy_indirect_symbol): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs. (hppa_link_hash_newfunc): Updated. (elf32_hppa_copy_indirect_symbol): Likewise. (elf32_hppa_hide_symbol): Likewise. (elf32_hppa_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-lm32.c (elf_lm32_link_hash_entry): Removed. (lm32_elf_link_hash_newfunc): Likewise. (lm32_elf_link_hash_table_create): Updated. (readonly_dynrelocs): Likewise. (allocate_dynrelocs): Likewise. (lm32_elf_copy_indirect_symbol): Likewise. * elf32-m32r.c (elf_m32r_link_hash_entry): Removed. (m32r_elf_link_hash_newfunc): Likewise. (m32r_elf_link_hash_table_create): Updated. (m32r_elf_copy_indirect_symbol): Likewise. (allocate_dynrelocs): Likewise. * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs. (metag_link_hash_newfunc): Updated. (elf_metag_copy_indirect_symbol): Likewise. (readonly_dynrelocs): Likewise. (allocate_dynrelocs): Likewise. * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove dyn_relocs. (link_hash_newfunc): Updated. (microblaze_elf_check_relocs): Likewise. (microblaze_elf_copy_indirect_symbol): Likewise. (readonly_dynrelocs): Likewise. (allocate_dynrelocs): Likewise. * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs. (nds32_elf_link_hash_newfunc): Updated. (nds32_elf_copy_indirect_symbol): Likewise. (readonly_dynrelocs): Likewise. (allocate_dynrelocs): Likewise. (nds32_elf_check_relocs): Likewise. * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs. (link_hash_newfunc): Updated. (nios2_elf32_copy_indirect_symbol): Likewise. (nios2_elf32_check_relocs): Likewise. (allocate_dynrelocs): Likewise. * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs. (or1k_elf_link_hash_newfunc): Updated. (readonly_dynrelocs): Likewise. (allocate_dynrelocs): Likewise. (or1k_elf_copy_indirect_symbol): Likewise. * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs. (ppc_elf_link_hash_newfunc): Updated. (ppc_elf_copy_indirect_symbol): Likewise. (ppc_elf_check_relocs): Likewise. (readonly_dynrelocs): Likewise. (ppc_elf_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs. (link_hash_newfunc): Updated. (elf_s390_copy_indirect_symbol): Likewise. (readonly_dynrelocs): Likewise. (elf_s390_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs. (sh_elf_link_hash_newfunc): Updated. (readonly_dynrelocs): Likewise.
[Bug gas/26051] [RISCV] .insn documentation update
https://sourceware.org/bugzilla/show_bug.cgi?id=26051 --- Comment #3 from Jim Wilson --- I added my proposed fix as an attachment. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/26051] [RISCV] .insn documentation update
https://sourceware.org/bugzilla/show_bug.cgi?id=26051 --- Comment #2 from Jim Wilson --- Created attachment 12579 --> https://sourceware.org/bugzilla/attachment.cgi?id=12579=edit my proposed fix -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/26051] [RISCV] .insn documentation update
https://sourceware.org/bugzilla/show_bug.cgi?id=26051 Jim Wilson changed: What|Removed |Added Assignee|unassigned at sourceware dot org |wilson at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2020-06-01 CC||wilson at gcc dot gnu.org --- Comment #1 from Jim Wilson --- +@itemx I type for loads: .insn i opcode, func3, rd, simm12(rs1) The .insn parsing code doesn't know whether we have a load or not, so this syntax is actually valid both for loads and non-loads, likewise with the other syntax. We should include this line, but I think the "for loads" part should be dropped. None of the other descriptions have similar text mentioning instruction type. +@item S type: .insn s opcode, func3, rs2, simm12(rs1) This looks right. For completeness we might want an alternate syntax that accepts rs1 and simm12 as separate operands, as someone might want to use the S type for a non-store, but no one has asked for that so I'm not worrying about that for now. +@item SB type: .insn sb opcode, func3, rs1, rs2, symbol +@itemx SB type: .insn sb opcode, func3, rs1, rs2, simm12 +@itemx B type: .insn b opcode, func3, rs1, rs2, symbol +@itemx B type: .insn b opcode, func3, rs1, rs1, simm12 The .insn parsing code doesn't allow the simm12 syntax here. Only pc-relative symbols. So these lines should be dropped. You are right about changing the regs from rd/rs1 to rs1/rs2. There is a typo on the last line with two rs1s, but that line needs to be dropped anyways. Since we are modifying this, I think we should promote B to @item and demote SB to @itemx, as B is the current name and SB is the old name for this insn format. Similarly we should promote J and demote UJ. This patch is small enough and obvious enough that I believe we can accept it without a copyright assignment. In general, if you want to contribute to GNU packages, you need to go through the copyright assignment paperwork. Otherwise, it is better to describe the change you want rather than send a patch. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/26067] New: Duplicated struct elf_dyn_relocs in ELF backends
https://sourceware.org/bugzilla/show_bug.cgi?id=26067 Bug ID: 26067 Summary: Duplicated struct elf_dyn_relocs in ELF backends Product: binutils Version: 2.35 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com Target Milestone: --- All ELF backends with shared library support has /* Track dynamic relocs copied for this symbol. */ struct elf_dyn_relocs *dyn_relocs; in symbol hash entry. It should be moved to elf_link_hash_entry. -- You are receiving this mail because: You are on the CC list for the bug.