Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package binutils for openSUSE:Factory checked in at 2024-02-23 16:40:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/binutils (Old) and /work/SRC/openSUSE:Factory/.binutils.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "binutils" Fri Feb 23 16:40:10 2024 rev:169 rq:1148804 version:2.42 Changes: -------- --- /work/SRC/openSUSE:Factory/binutils/binutils.changes 2024-02-18 20:20:44.192742596 +0100 +++ /work/SRC/openSUSE:Factory/.binutils.new.1770/binutils.changes 2024-02-23 16:40:11.420159679 +0100 @@ -1,0 +2,6 @@ +Wed Feb 21 09:56:08 UTC 2024 - Andreas Schwab <[email protected]> + +- riscv-no-relax.patch: RISC-V: Don't generate branch/jump relocation if + symbol is local when no-relax + +------------------------------------------------------------------- New: ---- riscv-no-relax.patch BETA DEBUG BEGIN: New: - riscv-no-relax.patch: RISC-V: Don't generate branch/jump relocation if symbol is local when no-relax BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ binutils.spec ++++++ --- /var/tmp/diff_new_pack.RwP01R/_old 2024-02-23 16:40:12.544200426 +0100 +++ /var/tmp/diff_new_pack.RwP01R/_new 2024-02-23 16:40:12.544200426 +0100 @@ -154,6 +154,7 @@ Patch43: binutils-revert-hlasm-insns.diff Patch44: binutils-revert-rela.diff Patch60: binutils-disable-code-arch-error.diff +Patch61: riscv-no-relax.patch Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch Patch93: cross-avr-size.patch @@ -280,6 +281,7 @@ %patch44 -p1 %endif %patch60 -p1 +%patch61 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h %patch90 ++++++ riscv-no-relax.patch ++++++ >From af514e5f6d1d0233a251a3ae17f7cb8d9ba8e36b Mon Sep 17 00:00:00 2001 From: Nelson Chu <[email protected]> Date: Mon, 29 Jan 2024 21:17:41 +0800 Subject: [PATCH] RISC-V: Don't generate branch/jump relocation if symbol is local when no-relax. Refer to commit, dff565fcca8137954d6ad571ef39f6aec5c0429c. Theoretically, assembler don't need to generate the pc-relative relocation and the refered local .L symbol when relaxation is disabled. The above commit improved the pcrel_hi/pcrel_lo relocations, and this commit improves branch and jump relocations. Passed the gcc/binutils regressions of riscv-gnu-toolchain. gas/ * config/tc-riscv.c (md_apply_fix): Raise fixP->fx_done for all branch and jump relocations when -mno-relax. --- gas/config/tc-riscv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index a4161420128..cbead954f09 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -4390,6 +4390,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP; bfd_vma delta = target - md_pcrel_from (fixP); bfd_putl32 (bfd_getl32 (buf) | ENCODE_JTYPE_IMM (delta), buf); + if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy)) + fixP->fx_done = 1; } break; @@ -4400,6 +4402,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP; bfd_vma delta = target - md_pcrel_from (fixP); bfd_putl32 (bfd_getl32 (buf) | ENCODE_BTYPE_IMM (delta), buf); + if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy)) + fixP->fx_done = 1; } break; @@ -4410,6 +4414,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP; bfd_vma delta = target - md_pcrel_from (fixP); bfd_putl16 (bfd_getl16 (buf) | ENCODE_CBTYPE_IMM (delta), buf); + if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy)) + fixP->fx_done = 1; } break; @@ -4420,6 +4426,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP; bfd_vma delta = target - md_pcrel_from (fixP); bfd_putl16 (bfd_getl16 (buf) | ENCODE_CJTYPE_IMM (delta), buf); + if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy)) + fixP->fx_done = 1; } break; -- 2.43.2
