[Bug gold/22755] gold test suite failures (gentoo, 2.31)

2021-04-06 Thread toolybird at tuta dot io
https://sourceware.org/bugzilla/show_bug.cgi?id=22755

Toolybird  changed:

   What|Removed |Added

 CC||toolybird at tuta dot io

--- Comment #5 from Toolybird  ---
As mentioned in bug 27303 the problem here is some distros build their GCC with
`--enable-default-pie'. This wreaks havoc with the gold test suite.

Adding `-no-pie' to CFLAGS helps somewhat. Note that -pie also turns on PIC. So
also adding `-fno-PIC' allows the gold test suite to pass.

In a standard x86_64 native build, I was able to get the whole binutils test
suite to pass by fiddling with FLAGS as follows:

make CFLAGS="-g -O2 -no-pie -fno-PIC" CXXFLAGS="-g -O2 -no-pie -fno-PIC" \
 CFLAGS_FOR_TARGET="-g -O2" CXXFLAGS_FOR_TARGET="-g -O2" LDFLAGS= check

It would be ideal if the gold testsuite could handle a GCC configured with
`--enable-default-pie' without having to resort to such hacks. Thanks.

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


[Bug gas/27217] aarch64 as Internal error in md_apply_fix at ....../gas/config/tc-aarch64.c:8330.

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27217

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #16 from Nick Clifton  ---
OK, patch applied.

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


[Bug gas/27217] aarch64 as Internal error in md_apply_fix at ....../gas/config/tc-aarch64.c:8330.

2021-04-06 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27217

--- Comment #15 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit eac4eb8ecb2626ef7711d8f6bee9e870ae435604
Author: Nick Clifton 
Date:   Tue Apr 6 13:27:50 2021 +0100

Fix a problem assembling AArch64 sources when a relocation is generated
against a symbol that has a defined value.

PR 27217
* config/tc-aarch64.c (my_get_expression): Rename to
aarch64_get_expression.  Add a fifth argument to enable deferring
of expression resolution.
(parse_typed_reg): Update calls to my_get_expression.
(parse_vector_reg_list): Likewise.
(parse_immediate_expression): Likewise.
(parse_big_immediate): Likewise.
(parse_shift): Likewise.
(parse_shifter_operand_imm): Likewise.
(parse_operands): Likewise.
(parse_shifter_operand_reloc): Update calls to my_get_expression
and call aarch64_force_reloc to determine the value of the new
fifth argument.
(parse_address_main): Likewise.
(parse_half): Likewise.
(parse_adrp): Likewise.
(aarch64_force_reloc): New function.  Contains code extracted
from...
(aarch64_force_relocation): ... here.
* testsuite/gas/aarch64/pr27217.s: New test case.
* testsuite/gas/aarch64/pr27217.d: New test driver.

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


[Bug binutils/27672] Fix quirky size output in readelf symbol tables

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27672

Nick Clifton  changed:

   What|Removed |Added

   Last reconfirmed||2021-04-06
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com

--- Comment #4 from Nick Clifton  ---
(In reply to Nick Lott from comment #3)
> I've attached a patch which does what I think you've described.

Thanks!  This makes my job a whole lot easier.  But ... do you have an
FSF copyright assignment for contributions to the binutils ?  Without
that I will have to refuse the patch. :-(

If you do not have an assignment, but are willing to create one, then
please copy the email template here, fill it out and send it off:

 
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=doc/Copyright/request-assign.future;hb=HEAD

Cheers
  Nick

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


[Bug binutils/27693] Gprof (GNU Binutils for Debian) 2.36.1 ,stack overflow occured when call the function "demangle_path"

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27693

Nick Clifton  changed:

   What|Removed |Added

   Last reconfirmed||2021-04-06
 CC||nickc at redhat dot com
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #4 from Nick Clifton  ---
Hi Guys,

 Since the demangler is part of the libiberty library, which is actually part
of gcc, I have resubmitted this bug report here:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Cheers
  Nick

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


[Bug binutils/27686] windres: fails with "nul bytes found in version string"

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27686

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Created attachment 13352
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13352&action=edit
Proposed patch

Hi Mark,

  Windres already has some code to skip padding bytes, but I suspect that 
  the problem is that the alignment has changed from 8-bytes to 16.  Please
  could you try out this alternative patch and let me know if it works for 
  you ?

  If it does not work, please could you upload a small test case so that I
  can investigate further ?

Cheers
  Nick

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


[Bug binutils/27686] windres: fails with "nul bytes found in version string"

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27686

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
   Last reconfirmed||2021-04-06
 Ever confirmed|0   |1

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


[Bug ld/27659] BFD (GNU Binutils for Debian) 2.36.1 internal error, aborting at ../../bfd/elfcode.h:224 in bfd_elf32_swap_symbol_out

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27659

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #2 from Nick Clifton  ---
Hi Gianfranco,

  I am currently unable to reproduce this bug. :-(  The object files
  that you uploaded help, but there are still one important file
  missing (libgcc_s.so.1) and the LLVMgold.so plugin is an ARM 
  executable and I do not have an ARM box available for testing. :-(

  Is there any chance you could reduce the testcase to a smaller set
  of files ?  I did try just linking foo-a6d584.o on its own, but I
  was given this message:

error: Failed to link module foo-a6d584.o: Invalid summary 
version 9. Version should be in the range [1-8].

  I guess that this is because I am using an old version of LLVM
  (llvm-libs-10.0.1-4.fc32.x86_64).

  The bug itself appears to be triggered by an unexpected section index
  in the section header of one of the input files.  (Probably foo-a6d584.o).
  But since this file is in LLVM IR format, I do not know how to decode
  it.

Cheers
  Nick

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


Error cross-compiling binutils-gdb for windows

2021-04-06 Thread Stepan Klymonchuk
I cloned binutils-gdb repository from here (master branch) on a linux
machine (Ubuntu) and I want to compile it for Windows (using
x86_64_w64_mingw32 toolchain).

First, I ran ./configure with the following options to specify the
cross-compile toolchain.

./configure --prefix=/usr/x86_64-w64-mingw32 --target=arm-none-eabi
--host=x86_64-w64-mingw32

Then I ran make and get the following error (I omitted most of the output
because it is pretty large):

[...]
x86_64-w64-mingw32-gcc  -DHAVE_CONFIG_H
-DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT -DDEFAULT_INLINE=0
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign
-Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition -Wno-format -Werror
-DMODET -I. -I. -I../common -I./../common -I../../include
-I./../../include -I../../bfd -I./../../bfd -I../../opcodes
-I./../../opcodes -I../../intl -g -O2 -c -o callback.o -MT
callback.o -MMD -MP -MF .deps/callback.Tpo ./../common/callback.c
./../common/callback.c: In function ‘os_time’:
./../common/callback.c:417:25: error: passing argument 1 of ‘time’
from incompatible pointer type [-Werror=incompatible-pointer-types]
  417 |   return wrap (p, time (t));
  | ^
  | |
  | long int *
In file included from ./../common/callback.c:35:
/usr/share/mingw-w64/include/time.h:230:47: note: expected ‘time_t *’
{aka ‘long long int *’} but argument is of type ‘long int *’
  230 | static __inline time_t __CRTDECL time(time_t *_Time) { return
_time64(_Time); }
  |   ^
cc1: all warnings being treated as errors
make[3]: *** [Makefile:513: callback.o] Error 1
make[3]: Leaving directory '/media/D/Work/FC/binutils-gdb/sim/arm'
make[2]: *** [Makefile:928: all-recursive] Error 1
make[2]: Leaving directory '/media/D/Work/FC/binutils-gdb/sim'
make[1]: *** [Makefile:8376: all-sim] Error 2
make[1]: Leaving directory '/media/D/Work/FC/binutils-gdb'
make: *** [Makefile:915: all] Error 2

I think it has something to do with time_t being typedef'd as a long long
int (64 bit integer) in the host platform (Windows), however, the function
os_time from the file sim/common/callback.c:414 (path relative to project
root), takes a long (32 bit integer) as a parameter:

static longos_time (host_callback *p, long *t){
  return wrap (p, time (t));
}

How can I fix this error?


Stepan Klymonchuk


[Bug gas/26395] binutils 2.28 Assertion failure in md_apply_fix at ../../gas/config/tc-aarch64.c:7766.

2021-04-06 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26395

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #10 from Nick Clifton  ---
Created attachment 13354
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13354&action=edit
Proposed patch

Hi Guys,

  I have applied a patch to fix PR 27217, but that does not handle the second
  test case in this PR.  So I have created a second patch here.  With this
  applied the test fails to assemble, like this:

   % echo "add x3,x3,:lo12:4" | aarch64-linux-gnu-as
  {standard input}: Assembler messages:
  {standard input}:1: Error: relocation extension cannot be used with a
constant at operand 3 -- `add x3,x3,:lo12:4'

  I feel that this is the correct way to handle this particular case, but
  you may not agree.  Opinions ?

Cheers
  Nick

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


[Bug gas/26395] binutils 2.28 Assertion failure in md_apply_fix at ../../gas/config/tc-aarch64.c:7766.

2021-04-06 Thread joel.sherrill at oarcorp dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26395

--- Comment #11 from Joel Sherrill  ---
I can't say whether you are right or wrong on rejecting that assembly language
but it looks like this started as something generated by GCC like our case. If
gcc still generates that assembly statement, then it has some place that needs
fixing as well.

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


Re: Error cross-compiling binutils-gdb for windows

2021-04-06 Thread Alan Modra
On Tue, Apr 06, 2021 at 03:31:40PM +0200, Stepan Klymonchuk wrote:
> I cloned binutils-gdb repository from here (master branch) on a linux
> machine (Ubuntu) and I want to compile it for Windows (using
> x86_64_w64_mingw32 toolchain).
> 
> First, I ran ./configure with the following options to specify the
> cross-compile toolchain.
> 
> ./configure --prefix=/usr/x86_64-w64-mingw32 --target=arm-none-eabi
> --host=x86_64-w64-mingw32
> 
> Then I ran make and get the following error (I omitted most of the output
> because it is pretty large):
> 
> [...]
> x86_64-w64-mingw32-gcc  -DHAVE_CONFIG_H
> -DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT -DDEFAULT_INLINE=0
> -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign
> -Wno-unused -Wunused-value -Wunused-function -Wno-switch
> -Wno-char-subscripts -Wmissing-prototypes
> -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
> -Wold-style-declaration -Wold-style-definition -Wno-format -Werror
> -DMODET -I. -I. -I../common -I./../common -I../../include
> -I./../../include -I../../bfd -I./../../bfd -I../../opcodes
> -I./../../opcodes -I../../intl -g -O2 -c -o callback.o -MT
> callback.o -MMD -MP -MF .deps/callback.Tpo ./../common/callback.c
> ./../common/callback.c: In function ‘os_time’:
> ./../common/callback.c:417:25: error: passing argument 1 of ‘time’
> from incompatible pointer type [-Werror=incompatible-pointer-types]
>   417 |   return wrap (p, time (t));
>   | ^
>   | |
>   | long int *
> In file included from ./../common/callback.c:35:
> /usr/share/mingw-w64/include/time.h:230:47: note: expected ‘time_t *’
> {aka ‘long long int *’} but argument is of type ‘long int *’
>   230 | static __inline time_t __CRTDECL time(time_t *_Time) { return
> _time64(_Time); }
>   |   ^
> cc1: all warnings being treated as errors
> make[3]: *** [Makefile:513: callback.o] Error 1
> make[3]: Leaving directory '/media/D/Work/FC/binutils-gdb/sim/arm'
> make[2]: *** [Makefile:928: all-recursive] Error 1
> make[2]: Leaving directory '/media/D/Work/FC/binutils-gdb/sim'
> make[1]: *** [Makefile:8376: all-sim] Error 2
> make[1]: Leaving directory '/media/D/Work/FC/binutils-gdb'
> make: *** [Makefile:915: all] Error 2

So this is when compiling sim.  Did you intend to compile gdb and sim,
or just binutils?  If you really only wanting binutils (plus gas, ld,
gprof) then configure with --disable-gdb --disable-gdbserver
--disable-gdbsupport --disable-libdecnumber --disable-readline
--disable-sim.  Bug reports about gdb and sim should be reported via
http://www.gnu.org/software/gdb/bugs/ or to bug-...@gnu.org

> 
> I think it has something to do with time_t being typedef'd as a long long
> int (64 bit integer) in the host platform (Windows), however, the function
> os_time from the file sim/common/callback.c:414 (path relative to project
> root), takes a long (32 bit integer) as a parameter:
> 
> static longos_time (host_callback *p, long *t){
>   return wrap (p, time (t));
> }
> 
> How can I fix this error?
> 
> 
> Stepan Klymonchuk

-- 
Alan Modra
Australia Development Lab, IBM



[Bug gold/27704] New: MIPS: remove SHT_REL support for NewABI elf backends

2021-04-06 Thread syq at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27704

Bug ID: 27704
   Summary: MIPS: remove SHT_REL support for NewABI elf backends
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: syq at debian dot org
CC: ian at airs dot com
  Target Milestone: ---

Given that MIPS NewABI ELF always use SHT_RELA in realworld,
and our SHT_REL implementation in backend is incomplete, it
filled with FIXME and TODO in code and produce tons of
assertion failure and other errors when meeting SHT_REL,
it's time to remove it.

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


[Bug gold/27704] MIPS: remove SHT_REL support for NewABI elf backends

2021-04-06 Thread syq at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27704

YunQiang Su  changed:

   What|Removed |Added

 CC||syq at debian dot org
 Target||mips64-linux-gnu

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