[Bug ld/10373] SH: ld relaxes jmp to bsr.

2014-06-20 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=10373

Oleg Endo  changed:

   What|Removed |Added

 CC||kkojima at rr dot iij4u.or.jp,
   ||olegendo at gcc dot gnu.org

--- Comment #4 from Oleg Endo  ---
I believe this is a (partial) dup of PR 3298.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10378] SH: jump table for switch/case got invalid adjustment during relaxing.

2014-06-20 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=10378

Oleg Endo  changed:

   What|Removed |Added

 CC||kkojima at rr dot iij4u.or.jp,
   ||olegendo at gcc dot gnu.org

--- Comment #3 from Oleg Endo  ---
I believe this is a (partial) dup of PR 3298.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10373] SH: ld relaxes jmp to bsr.

2014-08-02 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=10373

Oleg Endo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Oleg Endo  ---
The issue has been fixed on trunk and should be available in the next release
that follows binutils 2.24.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10378] SH: jump table for switch/case got invalid adjustment during relaxing.

2014-08-02 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=10378

Oleg Endo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Oleg Endo  ---
The issue has been fixed on trunk and should be available in the next release
that follows binutils 2.24.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/3298] -mrelax broken for sh-elf

2015-01-23 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=3298

Oleg Endo  changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

--- Comment #4 from Oleg Endo  ---
Created attachment 8080
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8080&action=edit
GCC patch to enable -mrelax by default

This is another patch to turn the -mrelax option in GCC by default.

Since PR 10378 and PR 10373 have been fixed, I've tried building GCC with
-mrelaxed enabled by default.  The build would stop in
libgcc/config/sh/lib1funcs.S, where GAS would complain that a mova insn is
referring to an unaligned offset.
After applying the following:

Index: libgcc/config/sh/lib1funcs.S
===
--- libgcc/config/sh/lib1funcs.S(revision 220017)
+++ libgcc/config/sh/lib1funcs.S(working copy)
@@ -116,7 +116,7 @@
 HIDDEN_FUNC(GLOBAL(ashiftrt_r4_31))
 HIDDEN_FUNC(GLOBAL(ashiftrt_r4_32))

-.align1
+.align4
 GLOBAL(ashiftrt_r4_32):
 GLOBAL(ashiftrt_r4_31):
 rotclr4
@@ -765,6 +765,7 @@
 btGLOBAL(movmemSI52)
 ! done all the large groups, do the remainder
 ! jump to movmem+
+.balign 4
 movaGLOBAL(movmemSI4)+4,r0
 addr6,r0
 jmp@r0

GCC (sh-elf C,C++, newlib 2.2.0) can be built successfully.
When compiling a simple C++ program with the resulting toolchain:

#include 

int main (void)
{
  std::cout << "hello world" << std::endl;
  return 0;
}

There are a lot of warnings from LD like:

/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/bin/ld:
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/lib/ml/m4/libstdc++.a(locale_init.o):
0x18: warning: symbol in unexpected section
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/bin/ld:
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/lib/ml/m4/libstdc++.a(locale_init.o):
0x6c: warning: symbol in unexpected section
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/bin/ld:
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/lib/ml/m4/libstdc++.a(locale_init.o):
0x70: warning: symbol in unexpected section
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/bin/ld:
/usr/local/lib/gcc/sh-elf/5.0.0/../../../../sh-elf/lib/ml/m4/libstdc++.a(locale_init.o):
0x3c: warning: symbol in unexpected section

But linking somehow succeeds.  However, the resulting program does not work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2015-02-15 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

Oleg Endo  changed:

   What|Removed |Added

 Target||sh*-*-*
 CC||olegendo at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2015-02-15 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

Oleg Endo  changed:

   What|Removed |Added

 CC||kkojima at rr dot iij4u.or.jp

--- Comment #6 from Oleg Endo  ---
Kaz, maybe you have an idea?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19935] New: [SH] Lots of new failures in GCC testsuite

2016-04-10 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19935

Bug ID: 19935
   Summary: [SH] Lots of new failures in GCC testsuite
   Product: binutils
   Version: 2.27 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: olegendo at gcc dot gnu.org
  Target Milestone: ---

Comparing the GCC testsuite results for binutils 2.26 and current master
branch, there are lots of new execution failures on sh-sim.  Just in case, I've
tried out a known to be working sh-sim from 2.26 and the errors still persist. 
Thus, I guess some change in GAS or LD is causing some wrong code to be
generated, although I haven't looked at the details yet.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19935] [SH] Lots of new failures in GCC testsuite

2016-04-10 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19935

Oleg Endo  changed:

   What|Removed |Added

 Target||sh*-*-*
 CC||kkojima at rr dot iij4u.or.jp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19935] [SH] Lots of new failures in GCC testsuite

2016-04-10 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19935

--- Comment #2 from Oleg Endo  ---
(In reply to Mike Frysinger from comment #1)
> does binutils 2.25 work ?

AFAIR yes.  Before updating I was using 2.25-something and it was OK.  2.26
also looks OK.

>  could you perhaps bisect the two ?

Yep.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15025] --enable-initfini-array creates .init_array where no input has one

2016-04-12 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=15025

Oleg Endo  changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

--- Comment #23 from Oleg Endo  ---
I've ran into Bug 19935, which is caused by "Make --enable-initfini-array the
default" on an sh-elf / newlib configuration.  I this related?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19935] [SH] Lots of new failures in GCC testsuite

2016-04-12 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19935

--- Comment #4 from Oleg Endo  ---
(In reply to Mike Frysinger from comment #3)
> (In reply to Oleg Endo from comment #2)
> 
> sorry, i thought you were saying 2.26 wasn't working.  i don't think there's
> any significant differences between 2.26 and master wrt the sim.  but if you
> could bisect it back, that'd be helpful.

I've picked one testcase from GCC: testsuite/gcc.dg/constructor-1.c

26e3a0c9ba4a8376fdf9f898637919d144d8b1d8 is the first bad commit
commit 26e3a0c9ba4a8376fdf9f898637919d144d8b1d8
Author: Alan Modra 
Date:   Wed Dec 2 19:23:41 2015 +1030

Make --enable-initfini-array the default

* configure.ac (--enable-initfini-array): Remove run test.  Default
to "yes".  Change help string to --disable-initfini-array.
* configure: Regenerate.


This makes sense, since most of the new failures are C++ related tests.

Bug 15025 looks somehow related ...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/22737] New: [RX] rx_start_line wrongly modifies LTO data

2018-01-20 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22737

Bug ID: 22737
   Summary: [RX] rx_start_line wrongly modifies LTO data
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: olegendo at gcc dot gnu.org
  Target Milestone: ---

This is a carry over from GCC's PR 83816
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83816

rx_start_line in tc-rx.c wrongly modifies the LTO escaped string in .string and
.ascii directives.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/22737] [RX] rx_start_line wrongly modifies LTO data

2018-01-20 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22737

Oleg Endo  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Oleg Endo  ---
In the problematic .s file, there is a single occurrence of the magic sequence
"?:" that rx_start_line triggers on:

.ascii  "\377\026\310\037h\"\320d\240?:\341O\332\016\214\266\306\234."

The function does not handle the \" escape sequence.
The following fixes it:

diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 8e49ddd..df761b4 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -2681,6 +2681,7 @@ rx_start_line (void)
   int in_single_quote = 0;
   int done = 0;
   char * p = input_line_pointer;
+  char prev_char = 0;

   /* Scan the line looking for question marks.  Skip past quote enclosed
regions.  */
   do
@@ -2693,7 +2694,9 @@ rx_start_line (void)
  break;

case '"':
- in_double_quote = ! in_double_quote;
+ /* Handle escaped double quote \" inside a string.  */
+ if (prev_char != '\\')
+   in_double_quote = ! in_double_quote;
  break;

case '\'':
@@ -2722,6 +2725,7 @@ rx_start_line (void)
  break;
}

+  prev_char = *p;
   p ++;
 }
   while (! done);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/22737] [RX] rx_start_line wrongly modifies LTO data

2018-01-20 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22737

Oleg Endo  changed:

   What|Removed |Added

 Target||rx*-*-*

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/22737] [RX] rx_start_line wrongly modifies LTO data

2018-01-22 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22737

--- Comment #3 from Oleg Endo  ---
(In reply to Nick Clifton from comment #2)
> 
>   * A testcase (to gas/testsuite/gas/rx/) to check that the
> patch continues to work.

I have no idea about the gas testsuite.  I need to feed it an .s file and then
match the data in the resulting .o file.  Any examples how to do that?

> 
>   * A ChangeLog entry to describe the patch.

Yeah, that is a given.  Sorry for omitting it when posting to the ML.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/22737] [RX] rx_start_line wrongly modifies LTO data

2018-01-22 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22737

--- Comment #5 from Oleg Endo  ---
(In reply to Nick Clifton from comment #4)

Thanks Nick for the jumpstart!
I've sent the updated patch to the ML.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2362] SH: Hidden symbol in DSO does not be forced local

2024-11-06 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=2362

Oleg Endo  changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/32917] „warning: symbol in unexpected section“ is being spat out when trying to relax symbols on SuperH

2025-05-11 Thread olegendo at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32917

Oleg Endo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||olegendo at gcc dot gnu.org
   Last reconfirmed||2025-05-11
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.