[Bug ld/24981] New: Hit assertion failure in ld/ldlang.c:7504
https://sourceware.org/bugzilla/show_bug.cgi?id=24981 Bug ID: 24981 Summary: Hit assertion failure in ld/ldlang.c:7504 Product: binutils Version: 2.33 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: romain.geissler at amadeus dot com Target Milestone: --- Hi, I have got a new assertion failure when upgrading in my toolchain binutils from 2.32 branch to the trunk (2.32.51) branch. The error happens when I try to run gcc test suite. I build gmp/mpc/mpfr in the gcc tree directly (not really advocated by gcc developers anymore, but it still works for years), and the issue happens when running the tests of mpfr through the gcc global "make check". For now details are sparse, it happened during a CI build, I don't have access to the artefacts of the build anymore. Logs are showing an assertion error in ld/ldlang.c:7504 libtool: link: /workdir/build/final-system/gcc-build/./prev-gcc/xgcc -B/workdir/build/final-system/gcc-build/./prev-gcc/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/bin/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/bin/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/lib/ -isystem /opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/include -isystem /opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/sys-include -O2 -msse -msse2 -msse3 -static-libstdc++ -static-libgcc -o tadd_fr tadd_fr.o ./.libs/libmpc-tests.a ../src/.libs/libmpc.a -lmpfr /workdir/build/final-system/gcc-build/./gmp/.libs/libgmp.a -lm libtool: link: /workdir/build/final-system/gcc-build/./prev-gcc/xgcc -B/workdir/build/final-system/gcc-build/./prev-gcc/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/bin/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/bin/ -B/opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/lib/ -isystem /opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/include -isystem /opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/sys-include -O2 -msse -msse2 -msse3 -static-libstdc++ -static-libgcc -o t-asmtype t-asmtype.o ../../tests/.libs/libtests.a /workdir/build/final-system/gcc-build/gmp/.libs/libgmp.a ../../.libs/libgmp.a /opt/1A/toolchain/x86_64-2.6.32-v3.0.79/x86_64-1a-linux-gnu/bin/ld: internal error /workdir/src/binutils-2.32.51/ld/ldlang.c 7504 collect2: error: ld returned 1 exit status make[4]: *** [Makefile:2437: tversion] Error 1 make[4]: Leaving directory '/home/jenkins/workspace/OTF_Toolchain_release_3.0/output/build/final-system/gcc-build/mpfr/tests' make[3]: *** [Makefile:4186: check-am] Error 2 make[3]: Leaving directory '/home/jenkins/workspace/OTF_Toolchain_release_3.0/output/build/final-system/gcc-build/mpfr/tests' make[2]: *** [Makefile:498: check-recursive] Error 1 make[2]: Leaving directory '/home/jenkins/workspace/OTF_Toolchain_release_3.0/output/build/final-system/gcc-build/mpfr' make[1]: *** [Makefile:6255: check-mpfr] Error 2 make[1]: *** Waiting for unfinished jobs Note that I build gcc (and thus mpfr) using LTO, as it is configured to do a PGO + LTO bootstrap build. The asserting code is the one added by this commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=128bf1fe608badb59d27f9c5c8ffb1a6a6d9d811 If you need more details, I can try to reproduce this issue locally, but might take some time as a gcc LTO + PGO build is quite long. Cheers, Romain -- 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/24981] Hit assertion failure in ld/ldlang.c:7504
https://sourceware.org/bugzilla/show_bug.cgi?id=24981 Alan Modra changed: What|Removed |Added CC||amodra at gmail dot com --- Comment #1 from Alan Modra --- gcc/gmp/mpc/mpfr versions? -- 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/24981] Hit assertion failure in ld/ldlang.c:7504
https://sourceware.org/bugzilla/show_bug.cgi?id=24981 --- Comment #2 from Romain Geissler --- gcc version used in this CI build: 6.0.5. However I have other builds using the very latest gcc 8 and gcc 9 branches, they fail as well. I haven't checked though if the gcc 8/9 builds are failing the same reason. gmp/mpc/mpfr are all at the latest released version: - gmp: 6.1.2 - mpc: 1.1.0 - mpfr: 4.0.2 Ah and I am using linux x64. -- 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/24981] Hit assertion failure in ld/ldlang.c:7504
https://sourceware.org/bugzilla/show_bug.cgi?id=24981 --- Comment #3 from Romain Geissler --- erratum: gcc version: 6.5.0 -- 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/24689] string table corruption
https://sourceware.org/bugzilla/show_bug.cgi?id=24689 Trupti Pardeshi changed: What|Removed |Added CC||trupti_pardeshi@persistent. ||co.in --- Comment #7 from Trupti Pardeshi --- Hello, May I know if Binutils-2.31 is also affected and requires this fix? Any heads up will be appreciated. Thank you in advance. Best Regards, -- 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/24981] Hit assertion failure in ld/ldlang.c:7504
https://sourceware.org/bugzilla/show_bug.cgi?id=24981 --- Comment #4 from Alan Modra --- My build of tversion using -O2 -flto (gmp + mpfr built with same flags) passes, using gcc Ubuntu 7.4.0-1ubuntu1~18.04.1. Adding the extra -msse -msse2 -msse3 -static-libstdc++ -static-libgcc you seem to be using doesn't make a difference. A ld map file shows LOADs as expected. LOAD /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o LOAD /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o LOAD /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o LOAD /tmp/ccANKPYp.ltrans0.ltrans.o LOAD ./.libs/libfrtests.a LOAD /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libm.so START GROUP LOAD /lib/x86_64-linux-gnu/libm.so.6 LOAD /usr/lib/x86_64-linux-gnu/libmvec_nonshared.a LOAD /lib/x86_64-linux-gnu/libmvec.so.1 END GROUP [snip rest] -- 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/24689] string table corruption
https://sourceware.org/bugzilla/show_bug.cgi?id=24689 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #8 from Nick Clifton --- (In reply to Trupti Pardeshi from comment #7) Hi Trupti, > May I know if Binutils-2.31 is also affected and requires this fix? Any > heads up will be appreciated. Yes it is affected. Yes a fix is needed if you plan on using it to examine corrupt, or potentially corrupt, input files. Cheers Nick -- 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/24689] string table corruption
https://sourceware.org/bugzilla/show_bug.cgi?id=24689 --- Comment #9 from Trupti Pardeshi --- (In reply to Nick Clifton from comment #8) > (In reply to Trupti Pardeshi from comment #7) > Hi Trupti, > > > May I know if Binutils-2.31 is also affected and requires this fix? Any > > heads up will be appreciated. > > Yes it is affected. Yes a fix is needed if you plan on using it to > examine corrupt, or potentially corrupt, input files. > > Cheers > Nick Thanks you so much Nick for early reply and clarification. -- 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/24887] readelf --notes: left justify "Data size"
https://sourceware.org/bugzilla/show_bug.cgi?id=24887 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6715fe29ffcdbef026908fed62e993b238d04d77 commit 6715fe29ffcdbef026908fed62e993b238d04d77 Author: H.J. Lu Date: Mon Sep 9 09:21:36 2019 -0700 i386: Adjust for new output format from readelf PR binutils/24887 * testsuite/ld-i386/property-1.r: Adjust for new output format from readelf. * testsuite/ld-i386/property-1a.r: Likewise. * testsuite/ld-i386/property-2.r: Likewise. * testsuite/ld-i386/property-2a.r: Likewise. * testsuite/ld-i386/property-3.r: Likewise. * testsuite/ld-i386/property-3a.r: Likewise. * testsuite/ld-i386/property-4.r: Likewise. * testsuite/ld-i386/property-4a.r: Likewise. * testsuite/ld-i386/property-5.r: Likewise. * testsuite/ld-i386/property-5a.r: Likewise. * testsuite/ld-i386/property-6.r: Likewise. * testsuite/ld-i386/property-7.r: Likewise. * testsuite/ld-i386/property-7a.r: Likewise. * testsuite/ld-i386/property-1.r: Likewise. * testsuite/ld-i386/property-1a.r: Likewise. * testsuite/ld-i386/property-2.r: Likewise. * testsuite/ld-i386/property-2a.r: Likewise. * testsuite/ld-i386/property-3.r: Likewise. * testsuite/ld-i386/property-3a.r: Likewise. * testsuite/ld-i386/property-4.r: Likewise. * testsuite/ld-i386/property-4a.r: Likewise. * testsuite/ld-i386/property-5.r: Likewise. * testsuite/ld-i386/property-5a.r: Likewise. * testsuite/ld-i386/property-6.r: Likewise. * testsuite/ld-i386/property-7.r: Likewise. * testsuite/ld-i386/property-7a.r: Likewise. -- 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/24982] New: m68k tdiv instructions assembled incorrectly
https://sourceware.org/bugzilla/show_bug.cgi?id=24982 Bug ID: 24982 Summary: m68k tdiv instructions assembled incorrectly Product: binutils Version: 2.33 (HEAD) Status: UNCONFIRMED Severity: minor Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: miod at online dot fr Target Milestone: --- Created attachment 11982 --> https://sourceware.org/bugzilla/attachment.cgi?id=11982&action=edit m68k-opc.c patch Motorola SVR4 as uses "tdiv" as an alias for a 32-bit divide operator (32-bit operand, 32-bit divider, get 32-bit remainder and quotient). In other words, "tdivs" is a synonym of "divsll" and "tdivu" of "divull". However, the current translation in opc-m68k.c translates them to "divsl" and "divul", which are the 64-bit operand, 32-bit divider, flavour. This translation has been incorrect since at least 1995 since it is already incorrect in the sourceware CVS import. Of course, the poor choice of mnemonics (div{s,u}l being 32/32 and div{s,u} being 64/32) probably led to that error. This probably went unnoticed because not much code, outside of Motorola's own code, has been written using the "tdiv" mnemonics; and such code was fed to Motorola's as which does not suffer from that bug. Trivial diff attached. -- 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/24982] m68k tdiv instructions assembled incorrectly
https://sourceware.org/bugzilla/show_bug.cgi?id=24982 Andreas Schwab changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-09-09 Ever confirmed|0 |1 --- Comment #1 from Andreas Schwab --- Confirmed. Other sources: http://68k.hax.com/DIVUL https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/ifpsp060/src/ilsp.S#n180 Please submit patches to . -- 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 gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 Ryan Prichard changed: What|Removed |Added CC||rprichard at google dot com --- Comment #4 from Ryan Prichard --- I looked at the testcase briefly, and it looked like test.o contained two strings, "xabcde" and "abcde". ld.bfd merged the two, but ld.gold didn't. I used "GNU gold (GNU Binutils for Debian 2.31.1) 1.16". However, if I write a test case where the strings/constants are identical, they *are* merged, and gold doesn't reliably update the GOT offset on the relocations. Gold seems to handle a relocation to a local symbol within a mergeable section, but not a relocation to the section directly. I'll attach a test case that writes a couple of x86-32 assembly files and runs them on a Linux machine. I'm using the syntax, "(.rodata.str1.1+4)@GOTOFF(%ebx)" on x86-32 to reference the section rather than a symbol. LLVM has a workaround for this bug. It was briefly reverted, then restored: https://reviews.llvm.org/D64327. -- 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 gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 Ryan Prichard changed: What|Removed |Added CC||danalbert at google dot com -- 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 gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 --- Comment #5 from Ryan Prichard --- Created attachment 11983 --> https://sourceware.org/bugzilla/attachment.cgi?id=11983&action=edit testcase 2 -- 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 gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 --- Comment #6 from Ryan Prichard --- I attached another test case to the Android NDK issue, https://github.com/android/ndk/issues/1076. -- 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/24983] New: RISC-V GP linker relaxation is not performed with -nostdlib
https://sourceware.org/bugzilla/show_bug.cgi?id=24983 Bug ID: 24983 Summary: RISC-V GP linker relaxation is not performed with -nostdlib Product: binutils Version: 2.30 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: bmeng.cn at gmail dot com Target Milestone: --- See the following test case $ cat test.c int a = 1; int main() { return a; } Building the test case with "-nostdlib" seems to disable the GP linker relaxation: $ riscv64-unknown-linux-gnu-gcc test.c -o test -nostdlib $ riscv64-unknown-linux-gnu-objdump -d test | grep gp But if we compile test.c without "-nostdlib": $ riscv64-unknown-linux-gnu-gcc test.c -o test $ riscv64-unknown-linux-gnu-objdump -d test | grep gp 103bc: 2197auipc gp,0x2 103c0: 46418193addigp,gp,1124 # 12820 <__global_pointer$> 1041c: 8141c783lbu a5,-2028(gp) # 12034 <_edata> 1042a: 80f18a23sb a5,-2028(gp) # 12034 <_edata> 10440: 8101a783lw a5,-2032(gp) # 12030 Note: this bug was previously filed in GCC bugzila, and it was suggested it should be filed against binutils. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91713 -- 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 gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 Alan Modra changed: What|Removed |Added Status|NEW |RESOLVED CC||amodra at gmail dot com Resolution|--- |INVALID --- Comment #7 from Alan Modra --- Your assembly is broken. In a string merge section, sym+offset is valid only for offset within the string at sym. I assume that the original testcase had the same sort of error as there too the relocs are against the section symbol. -- 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