<!DOCTYPE html><html data-lt-installed="true"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p><font face="monospace">From
        efcaee7155b26208915e0dc066d168076a4f7ae2 Mon Sep 17 00:00:00
        2001<br>
        From: QBos07 <a class="moz-txt-link-rfc2396E" href="mailto:qubos@outlook.de"><qubos@outlook.de></a><br>
        Date: Fri, 9 May 2025 13:49:44 +0000<br>
        Subject: [PATCH] Fix SuperH relaxation overriding wrong
        intruction<br>
        <br>
        when doing load store switching it wrongly adjusts the address
        of the<br>
        R_SH_USES reloc and not the actual offset from that instruction.
        This is<br>
        an issue if the pc-relative function call relaxation gets done
        in a<br>
        later pass wich will result in overriding the wrong instruction.<br>
        ---<br>
         bfd/elf32-sh.c | 4 ++--<br>
         1 file changed, 2 insertions(+), 2 deletions(-)<br>
        <br>
        diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c<br>
        index 612b1581..1e6f5500 100644<br>
        --- a/bfd/elf32-sh.c<br>
        +++ b/bfd/elf32-sh.c<br>
        @@ -1431,9 +1431,9 @@ sh_elf_swap_insns (bfd *abfd, asection
        *sec, void *relocs,<br>
         <br>
               off = irel->r_offset + 4 + irel->r_addend;<br>
               if (off == addr)<br>
        -        irel->r_offset += 2;<br>
        +        irel->r_addend += 2;<br>
               else if (off == addr + 2)<br>
        -        irel->r_offset -= 2;<br>
        +        irel->r_addend -= 2;<br>
             }<br>
         <br>
               if (irel->r_offset == addr)<br>
        -- <br>
        2.49.0<br>
        <br>
        <br>
      </font></p>
  </body>
  <lt-container></lt-container>
</html>