[Bug binutils/27064] New: binutils windres 2.35 "can't detect target endianness and architecture"

2020-12-13 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

Bug ID: 27064
   Summary: binutils windres 2.35 "can't detect target endianness
and architecture"
   Product: binutils
   Version: 2.35
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: progman3k at gmail dot com
  Target Milestone: ---

Expectation: The command
windres --target=pe-i386 -I/opt/youwin/include -i resource.rc -o resource.res
should output a binary .res file.

This is true on linux, osx, cygwin, mingw.

But when windres is built on Solaris 11.4 it gives the following output

windres: Can't detect target endianness and architecture.


To build windres, I did the following

cd binutils-2.35
CC=gcc ./configure
gmake

cd binutils/
gmake windres

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


[Bug binutils/27064] binutils windres 2.35 "can't detect target endianness and architecture"

2020-12-13 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

--- Comment #1 from Andreas Schwab  ---
You need to enable support for pe-i386, for example by adding i386-pe as an
additional target configuration.

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


[Bug binutils/27064] binutils windres 2.35 "can't detect target endianness and architecture"

2020-12-13 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

--- Comment #2 from progman3k at gmail dot com ---
Thank you Andreas! How do I enable that when configuring/building?


Luckily, I was able to recover a binary windres from a solaris 2.4 machine that
had binutils version 2.24 on it.

Incredibly, this binary runs flawlessly on solaris 11.4

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


[Bug binutils/27064] binutils windres 2.35 "can't detect target endianness and architecture"

2020-12-13 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

--- Comment #3 from Andreas Schwab  ---
--enable-targets=i386-pe

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


[Bug binutils/27064] binutils windres 2.35 "can't detect target endianness and architecture"

2020-12-13 Thread progman3k at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

--- Comment #4 from progman3k at gmail dot com ---
~/binutils-2.35$ CC=gcc ./configure --enable-targets=i386-pe

Configure runs OK but building fails:

gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include -I./../zlib
 -g -O2 -DLOCALEDIR="\"/usr/local/share/locale\""  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -DELF_LIST_OPTIONS=TRUE
-DELF_SHLIB_LIST_OPTIONS=TRUE -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE -g -O2 -MT
deffilep.o -MD -MP -MF .deps/deffilep.Tpo -c -o deffilep.o `test -f deffilep.c
|| echo ./`deffilep.c 
In file included from /usr/include/dlfcn.h:17:0,
 from sysdep.h:80,
 from deffilep.y:22:
deffilep.c:234:5: error: expected identifier before numeric constant
 SHARED = 279,
 ^
deffilep.c:265:0: warning: "SHARED" redefined
 #define SHARED 279

In file included from /usr/include/dlfcn.h:17:0,
 from sysdep.h:80,
 from deffilep.y:22:
/usr/include/sys/mman.h:81:0: note: this is the location of the previous
definition
 #define SHARED  0x10

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


[Bug gas/27065] New: [ARM] If-Then instruction and .align directive

2020-12-13 Thread kordalski.wojciech at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27065

Bug ID: 27065
   Summary: [ARM] If-Then instruction and .align directive
   Product: binutils
   Version: 2.35.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: kordalski.wojciech at gmail dot com
  Target Milestone: ---

Created attachment 13048
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13048&action=edit
The minimal example

During research of ARM Cortex-M3-based processor for our master thesis, we
found a bug (using a tool that generates random-but-correct sequences of
assembly instructions).

Minimal example would be:

.syntax unified
.thumb

.align 2
.type f1, %function
.thumb_func
f1:
it eq
.align 2
moveq r0, 42

This code can be assembled successfully with: arm-none-eabi-as -o test.o test.s

After disassembly we get following listing:

  test.o: file format elf32-littlearm


  Disassembly of section .text:

   :
 0:   bf08  it  eq
 2:   46c0  nopeq   ; (mov r8, r8)
 4:   202a  movsr0, #42 ; 0x2a
 6:   46c0  nop ; (mov r8, r8)

The If-Then instruction became applied to NOP instruction (and not to MOV
instruction).

Expected behavior: MOV instruction become conditionally executed (assembler
should modify the If-Then instruction) or assembler prints a warning message
that MOV instruction has specified condition code, but it is not inside an IT
block.

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


[Bug gas/27066] New: [ARM] Unaligned LDRD instruction

2020-12-13 Thread kordalski.wojciech at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27066

Bug ID: 27066
   Summary: [ARM] Unaligned LDRD instruction
   Product: binutils
   Version: 2.35.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: kordalski.wojciech at gmail dot com
  Target Milestone: ---

Created attachment 13049
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13049&action=edit
The minimal example

During research of ARM Cortex-M3-based processor for our master thesis, we
found a bug (using a tool that generates random-but-correct sequences of
assembly instructions).

Minimal example:

.syntax unified
.cpu cortex-m3
.thumb

.align 2
.type f1, %function
.thumb_func
f1:
nop.n
ldrd.w r0, r1, data

.align 4
data:
.word 42
.word 77

The code is assembled without any warning or error message using command:
arm-none-eabi-as -o test.o test.s -mcpu=cortex-m3

However, the ARMv7-M Architecture Reference Manual states:

For the M profile, the PC value must be word-aligned, otherwise the
behavior of the instruction is UNPREDICTABLE.

(Section A7.7.51 LDRD (literal), page A7-259)

The ARMv7-M Architecture Reference Manual can be downloaded from:
https://static.docs.arm.com/ddi0403/ed/DDI0403E_d_armv7m_arm.pdf

Expected behavior: the assembler should print a warning or error message

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


[Bug gas/27066] [ARM] Unaligned LDRD instruction

2020-12-13 Thread kordalski.wojciech at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27066

Wojciech Kordalski  changed:

   What|Removed |Added

   Severity|normal  |minor

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


[Bug gas/27066] [ARM] Unaligned LDRD instruction

2020-12-13 Thread kordalski.wojciech at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27066

--- Comment #1 from Wojciech Kordalski  ---
To make this bug report clear:

The problem is that the LDRD instruction is not word-aligned (32-bit aligned).
The manual states that if the LDRD instruction is not word-aligned, it is
UNPREDICTABLE.
The assembler do not print any message that it produces UNPREDICTABLE code.

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


[Bug gold/24123] incremental_copy_test failure when building with gcc-9

2020-12-13 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24123

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Cary Coutant :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f12650bff1a591357c26e0ef6d7be0323f76fdb8

commit f12650bff1a591357c26e0ef6d7be0323f76fdb8
Author: Cary Coutant 
Date:   Sun Dec 13 15:19:41 2020 -0800

Fix incremental linking with rodata merge sections.

When processing the incremental update, incoming .rodata merge sections
do not match the corresponding section in the base file, because the
SHF_MERGE flag had not been masked out of the latter.

gold/
PR gold/24123
* layout.cc (Layout::init_fixed_output_section): Mask out flags
that
should be ignored when matching sections.

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


[Bug gold/23539] --incremental-update doesn't work with GNU properties

2020-12-13 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23539

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Cary Coutant :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=387a56a5435500ba2d2eac3fe76de1f400381cbe

commit 387a56a5435500ba2d2eac3fe76de1f400381cbe
Author: Cary Coutant 
Date:   Sun Dec 13 15:20:10 2020 -0800

Fix incremental tests using gcc 9, which adds Gnu properties sections.

During an incremental link, we should simply ignore the Gnu properties
sections. We were not handling them properly -- failing to process the
properties from the base file. While that could be fixed, the property
sections are meant for deployed binaries, and incremental linking is
for development, so keeping the properties sections just adds to the
likelihood of forcing a full link sooner.

gold/
PR gold/23539
* object.cc (Sized_relobj_file::layout_gnu_property_section):
Ignore
Gnu properties during incremental links.

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


[Bug gold/23539] --incremental-update doesn't work with GNU properties

2020-12-13 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23539

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Cary Coutant :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f22318ef0db86d623e11efbd8936430f38484f69

commit f22318ef0db86d623e11efbd8936430f38484f69
Author: Cary Coutant 
Date:   Sun Dec 13 16:50:13 2020 -0800

Re-enable incremental tests that were failing with GCC 9+.

gold/
PR gold/23539
PR gold/24123
* testsuite/Makefile.am (incremental_copy_test): Re-enable for GCC
9+.
(incremental_comdat_test_1): Likewise.
* testsuite/Makefile.in: Regenerate.

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


[Bug gold/24123] incremental_copy_test failure when building with gcc-9

2020-12-13 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24123

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Cary Coutant :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f22318ef0db86d623e11efbd8936430f38484f69

commit f22318ef0db86d623e11efbd8936430f38484f69
Author: Cary Coutant 
Date:   Sun Dec 13 16:50:13 2020 -0800

Re-enable incremental tests that were failing with GCC 9+.

gold/
PR gold/23539
PR gold/24123
* testsuite/Makefile.am (incremental_copy_test): Re-enable for GCC
9+.
(incremental_comdat_test_1): Likewise.
* testsuite/Makefile.in: Regenerate.

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


[Bug gold/23539] --incremental-update doesn't work with GNU properties

2020-12-13 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23539

Cary Coutant  changed:

   What|Removed |Added

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

--- Comment #4 from Cary Coutant  ---
Fixed on trunk.

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


[Bug gold/24123] incremental_copy_test failure when building with gcc-9

2020-12-13 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24123

Cary Coutant  changed:

   What|Removed |Added

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

--- Comment #6 from Cary Coutant  ---
Fixed on trunk.

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


[Bug binutils/27064] Solaris 11.4 ld build failure

2020-12-13 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-12-14
Summary|binutils windres 2.35   |Solaris 11.4 ld build
   |"can't detect target|failure
   |endianness and  |
   |architecture"   |
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

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


[Bug binutils/27057] binutils 2.24, 2.35 do not build on Solaris 11.4

2020-12-13 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27057

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
 Status|WAITING |RESOLVED

--- Comment #5 from Alan Modra  ---
Closing.  Documentation patches can be posted to binut...@sourceware.org

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


[Bug ld/26978] Inconsistency for defined foo@v1 and foo@@v1

2020-12-13 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26978

Alan Modra  changed:

   What|Removed |Added

   Target Milestone|--- |2.36
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #9 from Alan Modra  ---
Fixed

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


[Bug binutils/27064] Solaris 11.4 ld build failure

2020-12-13 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6abe7848fa4140b3cb79c6810758b21562efdc0d

commit 6abe7848fa4140b3cb79c6810758b21562efdc0d
Author: Alan Modra 
Date:   Mon Dec 14 11:44:43 2020 +1030

Solaris 11.4 ld build failure

/usr/include/sys/mman.h:81:0: note: this is the location of the previous
definition
 #define SHARED  0x10

PR 27064
* deffilep.y (SHARED_K): Rename from SHARED.  Update uses.

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


[Bug binutils/27064] Solaris 11.4 ld build failure

2020-12-13 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27064

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
   Target Milestone|--- |2.36

--- Comment #6 from Alan Modra  ---
Fixed for 2.36

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