[Bug gold/26609] New: gold incorrectly encodes C++ EH LSDA information with absolute pointers on mipsel/mips64el

2020-09-14 Thread vasek.gello at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26609

Bug ID: 26609
   Summary: gold incorrectly encodes C++ EH LSDA information with
absolute pointers on mipsel/mips64el
   Product: binutils
   Version: 2.35
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: vasek.gello at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

Dear colleagues,

I discovered the ld.gold bug affecting mipsel and mips64el and reported it on
Debian
as it affects packages I maintain: http://bugs.debian.org/969946

Apart from reproducer there, the same reproducer built with -save-temps and .so
files
from the actual build machine is attached here:
https://www.sendspace.com/file/8r64mw

Re-building the reproducer with bfd and with lld -Wl,-z,notext produces good
file,
while gold produces faulty bibary executable with and without -Wl,-z,notext.

Vasyl

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


[Bug gas/26610] New: ARM's "VFPv3 vldr to vmov" gas testcase fails after 7af677524e2

2020-09-14 Thread maxim.kuvyrkov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26610

Bug ID: 26610
   Summary: ARM's "VFPv3 vldr to vmov" gas testcase fails after
7af677524e2
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: maxim.kuvyrkov at gmail dot com
  Target Milestone: ---

Arm's "VFPv3 vldr to vmov" gas testcase fails after 7af677524e2.

This was detected on native ARMv8 hardware running armhf docker container. 
Configure line is fairly standard:
.../configure --enable-lto --enable-plugins --enable-gold --disable-werror
CPPFLAGS=-UFORTIFY_SOURCE --disable-gdb --disable-sim --disable-libdecnumber
--disable-readline --with-sysroot=/ --disable-shared --enable-static
--build=armv8l-unknown-linux-gnueabihf --host=armv8l-unknown-linux-gnueabihf
--target=armv8l-unknown-linux-gnueabihf

Verbose configure/build details are at:
https://ci.linaro.org/job/tcwg_binutils-bisect-gnu-master-arm-check_binutils/6/artifact/artifacts/build-first_bad/03-build_abe-binutils/console.log/*view*/
.


commit 7af677524e205f3c343707d61bccd4dfd74089da
Author: Alan Modra 
Date: Tue Sep 1 11:35:37 2020 +0930

PR26420, PR26421, PR26425, PR26427 UBSAN: tc-arm.c left shifts

PR 26420
PR 26421
PR 26425
PR 26427

config/tc-arm.c (struct arm_it): Make size, size_req, cond and
uncond_value unsigned.
(parse_vfp_reg_list): Make setmask unsigned, vpr_str_len size_t.
(parse_big_immediate): Cast generic_bignum elements to unsigned.
(encode_thumb32_immediate): Shift left 0xffU.
(double_to_single): Make sign unsigned. Tidy.
(move_or_literal_pool): Cast LITTLE_NUM elements to uint64_t or
valueT.
(vfp_or_neon_is_neon): Adjust inst.uncond_value expression.
(md_assemble): Likewise.
(handle_pred_state): Make cond unsigned.
(thumb32_negate_data_op): Make variables unsigned.
(md_apply_fix): Make value and newval unsigned, adjust uses.


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


[Bug gas/26610] ARM's "VFPv3 vldr to vmov" gas testcase fails after 7af677524e2

2020-09-14 Thread maxim.kuvyrkov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26610

Maxim Kuvyrkov  changed:

   What|Removed |Added

 CC||amodra at gmail dot com
Version|unspecified |2.36 (HEAD)
 Target||arm-*

--- Comment #1 from Maxim Kuvyrkov  ---
Hi Alan,

Would you please take a look at this?  Please let me know if this doesn't
reproduce for you straight away.

Thanks.

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


[Bug ld/26583] R_X86_64_PC32 relocation against data symbol is mishandled

2020-09-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26583

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

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


[Bug ld/26583] R_X86_64_PC32 relocation against data symbol is mishandled

2020-09-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26583

--- Comment #11 from H.J. Lu  ---
(In reply to Kilian Kegel from comment #8)
> Hi H.J.Lu,
> 
> thank you for your quick response.
> 
> Regrettably I had a lot of trouble building your branch 
> 
> https://gitlab.com/x86-binutils/binutils-gdb/-/commits/users/hjl/pr26583/
> master
> 
> because of missing, bison, m4 in my UBUNTU 20.04 build environment.

Please install the missing programs on your machine.

> So could you please do the testing? In the ldBugDemo0 directory just type
> 
>ld --output=program.elf -Map=program.elf.map --entry="begin" *.obj
> 
> and 
>
>objdump -d program.elf

It should be fixed with my patch.  Please verify it.

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


[Bug gas/26608] [2.36 Regression] The instruction is not recognized

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26608

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

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

commit 74fea55bb7bc24902bbc45f0510a0b68e9bceee4
Author: Cooper Qu 
Date:   Sun Sep 13 20:48:06 2020 +0800

CSKY: Set feature flags for default cpu.

Fix floating point instructions not recognized when building GCC.

gas/
PR 26608
* config/tc-csky.c (md_begin): Set feature flags for default
cpu.

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


[Bug gas/26608] [2.36 Regression] The instruction is not recognized

2020-09-14 Thread lifang_...@c-sky.com
https://sourceware.org/bugzilla/show_bug.cgi?id=26608

lifang_...@c-sky.com changed:

   What|Removed |Added

 CC||lifang_...@c-sky.com

--- Comment #3 from lifang_...@c-sky.com ---
Fixed in commit: 74fea55bb7bc24902bbc45f0510a0b68e9bceee4

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


[mipsel, mips64el, gold] gold incorrectly encodes C++ EH LSDA information with absolute pointers

2020-09-14 Thread Vasyl Gello
Dear colleagues,

I discovered the ld.gold bug affecting mipsel and mips64el and reported it on 
Debian
as it affects packages I maintain: http://bugs.debian.org/969946

Apart from reproducer there, the same reproducer built with -save-temps and .so 
files
from the actual build machine is attached here: 
https://www.sendspace.com/file/8r64mw

Re-building the reproducer with bfd and with lld -Wl,-z,notext produces good 
file,
while gold produces faulty bibary executable with and without -Wl,-z,notext.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com

Skype: vasek.gello
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

signature.asc
Description: PGP signature


[Bug ld/26583] R_X86_64_PC32 relocation against data symbol is mishandled

2020-09-14 Thread minnowware at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26583

--- Comment #12 from Kilian Kegel  ---
Created attachment 12841
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12841&action=edit
GNU ld (GNU Binutils) 2.35.50.20200909 result

Hi H.J.Lu,

now I was able to build, install and run your fix.
(Please have a look onto the appended screen shot.)

Regrettably it does not accept the COFF .OBJ files.

This is the same behavior as with my own binutil-rebuilds
of ver. 2.34, 2.35 and 2.21 from https://ftp.gnu.org/gnu/binutils

Let me summarize:
1) LD (2.34) of CYGWIN doesn't have that bug at all.
   Both of my bugs (.BSS and OPTIMIZATION) are just gone.
   The link result is correct!
   But regrettably it creates the wrong executable format 
   (.EXE instead of .ELF)

2) All binutils of my own rebuild (your fix, 2.21, 2.34, and 2.35)
   doesn't accept the COFF .OBJ fileformat and stop with the same 
   error message:
   "getaddr1.obj: file not recognized: file format not recognized"

3) all original ld/binutil versions that comes with Debian, Suse,
   RedHat and Ubuntu accept the COFF .OBJ but creates erroneous .ELF

That sounds to me that
a) Due to (1) MS COFF .OBJ file format is already implemented 
   somewhere in the binutils source code base but just not activated/
   enabled/pulled in 
   (maybe a different variant of COFF .OBJ is activated instead)

b) Due to (2) and (3) it needs some additional magic configuration
   at build time to accept MS COFF .OBJ, that the binutil maintainers at 
   Debian, RedHad, Suse and Ubuntu certainly know...

Thanks,
Kilian

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


[Bug ld/26583] R_X86_64_PC32 relocation against data symbol is mishandled

2020-09-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26583

--- Comment #13 from H.J. Lu  ---
Please configure binutils with --enable-targets=x86_64-linux,x86_64-pep

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


[Bug ld/26588] enable-reloc-section on .exe with no exported symbols causes segfault if requested to create implib

2020-09-14 Thread sourceware-bugzilla at jdrake dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26588

--- Comment #6 from sourceware-bugzilla at jdrake dot com ---
I've gotten a report that a DLL that exports no symbols no longer generates an
import library, as previously expected.

I hesitate to add more conditions to that inner if, though that's the most
obvious solution.

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


[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22269

--- Comment #42 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Hans-Peter Nilsson :

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

commit 4a8f181d196f85ca153fe51ca6bb40942e0e1ed7
Author: Hans-Peter Nilsson 
Date:   Tue Sep 15 02:57:39 2020 +0200

CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269

Not sure why there wasn't a NULL check in the ld/22269 patch
(e01c16a8) at the time, as there was one for the corresponding patch
to elf32-m68k.c (5056ba1d).

Incidentally, I had missed that in 2017, as a prerequisite for the
ld/22269 series, the check_relocs function finally were made "safe"!
(I.e. the number of references and symbol types are final, garbage
collection done, so port-specific accounting can be made sanely.)

Committed.

bfd:
PR ld/26589
* elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.

ld:
PR ld/26589
* testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.

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


[Bug ld/26589] ld segfaulting building uClibc-ng 1.0.35 for crisv32-linux

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26589

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

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

commit 4a8f181d196f85ca153fe51ca6bb40942e0e1ed7
Author: Hans-Peter Nilsson 
Date:   Tue Sep 15 02:57:39 2020 +0200

CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269

Not sure why there wasn't a NULL check in the ld/22269 patch
(e01c16a8) at the time, as there was one for the corresponding patch
to elf32-m68k.c (5056ba1d).

Incidentally, I had missed that in 2017, as a prerequisite for the
ld/22269 series, the check_relocs function finally were made "safe"!
(I.e. the number of references and symbol types are final, garbage
collection done, so port-specific accounting can be made sanely.)

Committed.

bfd:
PR ld/26589
* elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.

ld:
PR ld/26589
* testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.

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


[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22269

--- Comment #43 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_35-branch branch has been updated by Hans-Peter Nilsson
:

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

commit ef6b667ead5c32c7d26fa58f1f86f70a662b
Author: Hans-Peter Nilsson 
Date:   Tue Sep 15 03:59:06 2020 +0200

CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269

Not sure why there wasn't a NULL check in the ld/22269 patch
(e01c16a8) at the time, as there was one for the corresponding patch
to elf32-m68k.c (5056ba1d).

Incidentally, I had missed that in 2017, as a prerequisite for the
ld/22269 series, the check_relocs function finally were made "safe"!
(I.e. the number of references and symbol types are final, garbage
collection done, so port-specific accounting can be made sanely.)

Committed.

bfd:
PR ld/26589
* elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.

ld:
PR ld/26589
* testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.

(cherry picked from commit 4a8f181d196f85ca153fe51ca6bb40942e0e1ed7)

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


[Bug ld/26589] ld segfaulting building uClibc-ng 1.0.35 for crisv32-linux

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26589

--- Comment #6 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_35-branch branch has been updated by Hans-Peter Nilsson
:

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

commit ef6b667ead5c32c7d26fa58f1f86f70a662b
Author: Hans-Peter Nilsson 
Date:   Tue Sep 15 03:59:06 2020 +0200

CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269

Not sure why there wasn't a NULL check in the ld/22269 patch
(e01c16a8) at the time, as there was one for the corresponding patch
to elf32-m68k.c (5056ba1d).

Incidentally, I had missed that in 2017, as a prerequisite for the
ld/22269 series, the check_relocs function finally were made "safe"!
(I.e. the number of references and symbol types are final, garbage
collection done, so port-specific accounting can be made sanely.)

Committed.

bfd:
PR ld/26589
* elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.

ld:
PR ld/26589
* testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.

(cherry picked from commit 4a8f181d196f85ca153fe51ca6bb40942e0e1ed7)

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


[Bug ld/26589] ld segfaulting building uClibc-ng 1.0.35 for crisv32-linux

2020-09-14 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26589

Hans-Peter Nilsson  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |hp at sourceware dot org
 Target|crisv32-linux   |crisv32-linux, cris-linux
   Target Milestone|--- |2.36

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


[Bug ld/26589] ld segfaulting building uClibc-ng 1.0.35 for crisv32-linux

2020-09-14 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26589

Hans-Peter Nilsson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Hans-Peter Nilsson  ---
Regarding the milestone set for 2.36 while the patch is on the 2.35 branch, it
looks like we don't have a milestone label for 2.35.1, but from recent traffic
it seems likely that there will be one.

Anyhow, thanks for your perseverance; the bug is now fixed.  It'd be nice to
know if your build completes and is not hampered by other bugs.

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