[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 Matthias Klose changed: What|Removed |Added CC||amodra at gmail dot com Target||powerpc64le-linux-gnu -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 Alan Modra changed: What|Removed |Added Assignee|unassigned at sourceware dot org |amodra at gmail dot com --- Comment #1 from Alan Modra --- The assertion failure is the one at the end of lang_size_relro_segment_1, which indicates that the reverse layout of sections done there somehow exceeds the space requirement for the normal forward layout of sections. I'm not clever enough to see how this might happen without the objects files. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 Matthias Klose changed: What|Removed |Added Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #2 from Matthias Klose --- when trying to collect the object files, I couldn't reproduce this anymore myself. Closing as invalid. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 --- Comment #3 from Alan Modra --- Were the toolchain and libraries exactly the same when you tried to reproduce the fail? If not, we might have a bug somewhere that only triggers once in a blue moon. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 --- Comment #4 from Matthias Klose --- no, I also updated the compiler once. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 --- 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=5d471bd907be60e9858b22cdf4fd10ddc0f6ee1a commit 5d471bd907be60e9858b22cdf4fd10ddc0f6ee1a Author: Alan Modra Date: Mon Jul 25 09:25:49 2022 +0930 Re: PowerPC64 .branch_lt address On seeing PR29369 my suspicion was naturally on a recent powerpc64 change, commit 0ab80031430e. Without a reproducer, I spent time wondering what could have gone wrong, and while I doubt this patch would have fixed the PR, there are some improvements that can be made to cater for user silliness. I also noticed that when -z relro -z now sections are created out of order, with .got before .plt in the section headers but .got is laid out at a higher address. That's due to the address expression for .branch_lt referencing SIZEOF(.got) and so calling init_os (which creates a bfd section) for .got before the .plt section is created. Fix that by ignoring SIZEOF in exp_init_os. Unlike ADDR and LOADADDR which need to reference section vma and lma respectively, SIZEOF can and does cope with a missing bfd section by returning zero for its size, which of course is correct. PR 29369 * ldlang.c (exp_init_os): Don't create a bfd section for SIZEOF. * emulparams/elf64ppc.sh (OTHER_RELRO_SECTIONS_2): Revise .branch_lt address to take into account possible user sections with alignment larger than 8 bytes. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The binutils-2_39-branch branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=97acb51d6ac5b3e09b5817edc7a41678d96e945c commit 97acb51d6ac5b3e09b5817edc7a41678d96e945c Author: Alan Modra Date: Mon Jul 25 09:25:49 2022 +0930 Re: PowerPC64 .branch_lt address On seeing PR29369 my suspicion was naturally on a recent powerpc64 change, commit 0ab80031430e. Without a reproducer, I spent time wondering what could have gone wrong, and while I doubt this patch would have fixed the PR, there are some improvements that can be made to cater for user silliness. I also noticed that when -z relro -z now sections are created out of order, with .got before .plt in the section headers but .got is laid out at a higher address. That's due to the address expression for .branch_lt referencing SIZEOF(.got) and so calling init_os (which creates a bfd section) for .got before the .plt section is created. Fix that by ignoring SIZEOF in exp_init_os. Unlike ADDR and LOADADDR which need to reference section vma and lma respectively, SIZEOF can and does cope with a missing bfd section by returning zero for its size, which of course is correct. PR 29369 * ldlang.c (exp_init_os): Don't create a bfd section for SIZEOF. * emulparams/elf64ppc.sh (OTHER_RELRO_SECTIONS_2): Revise .branch_lt address to take into account possible user sections with alignment larger than 8 bytes. (cherry picked from commit 5d471bd907be60e9858b22cdf4fd10ddc0f6ee1a) -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 --- Comment #7 from Alan Modra --- (In reply to Matthias Klose from comment #4) > no, I also updated the compiler once. A pity. Oh well. As far as I could tell from the build logs you were not building with -z relro -z now, but if that was the case then the ldlang.c fix I've just committed (fixing .got/.plt order) is relevant and a plausible fix for the assertion fail. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 Martin Liska changed: What|Removed |Added CC||mliska at suse dot cz -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu
https://sourceware.org/bugzilla/show_bug.cgi?id=29369 Alan Modra changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #8 from Alan Modra --- According to Martin Liska, this problem also reproduced building an --enable-pgo-build=lto libopcodes shared lib prior to the patch I committed, and disappeared after. -- You are receiving this mail because: You are on the CC list for the bug.