Created attachment 547752 [details] crtbeginS-ok-7.3.0.o.back Noticed today when newly installed gcc refused to function: $ cat a.c int main(){} $ LANG=C LANG=C gcc a.c -o a /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/crtbeginS.o: invalid string offset 758132274 >= 95 for section `strtab' /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/crtbeginS.o: error adding symbols: no error collect2: error: ld returned 1 exit status Easy to reproduce even on files without debugging sections: $ cp crtbeginS-ok-7.3.0.o.back crtbeginS-ok-7.3.0.o $ debugedit -i -b $(pwd) -d /usr/src/debug -l ./foo crtbeginS-ok-7.3.0.o $ export LANG=C $ readelf -a crtbeginS-ok-7.3.0.o.back >/dev/null && echo ok readelf: Warning: [ 9]: Info field (8) should index a relocatable section. ok $ readelf -a crtbeginS-ok-7.3.0.o >/dev/null && echo ok readelf: Warning: [ 9]: Info field (8) should index a relocatable section. readelf: Error: bad symbol index: 54495f00 in relocreadelf: Error: bad symbol index: 656c6261 in relocreadelf: Error: bad symbol index: 62615465 in relocreadelf: Error: bad symbol index: 69665f61 in relocreadelf: Warning: local symbol 11 found at index >= symtab's sh_info value of 11 readelf: Warning: local symbol 14 found at index >= symtab's sh_info value of 11 readelf: Warning: local symbol 15 found at index >= symtab's sh_info value of 11 ok Looks like all sections are quite messed up.
Created attachment 547754 [details] crtbeginS-ok-7.3.0.o
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d68d322e3929588678e9447042043120210a08ed commit d68d322e3929588678e9447042043120210a08ed Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-09-24 07:50:55 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-09-24 07:56:46 +0000 package.mask: Mask new debugedit for breakage Bug: https://bugs.gentoo.org/666954 Signed-off-by: Michał Górny <mgorny@gentoo.org> profiles/package.mask | 4 ++++ 1 file changed, 4 insertions(+)
Could you report this upstream? You certainly understand more about it than I do.
I'll follow up on existing https://github.com/rpm-software-management/rpm/issues/423
There appears to be a fix for this, now, upstream: https://github.com/rpm-software-management/rpm/commit/0779d60cb5941610dd1f31632aa1655bf2cc447a.patch I have not tested it yet, (too much ptsd, I guess, after being an early victim) -- but wanted to point it out, in case someone is feeling braver than me.
(In reply to Greg Turner from comment #5) > There appears to be a fix for this, now, upstream: > > https://github.com/rpm-software-management/rpm/commit/ > 0779d60cb5941610dd1f31632aa1655bf2cc447a.patch > > I have not tested it yet, (too much ptsd, I guess, after being an early > victim) -- but wanted to point it out, in case someone is feeling braver > than me. I had the same issue where gcc was b0rked after recompilation with FEATURES=installsources and that the above patch to app-arch/rpm fixes the problem for me.
I don't think it's a fix *upstream*. It's just the commit from the pull request.
(In reply to Michał Górny from comment #7) > I don't think it's a fix *upstream*. It's just the commit from the pull > request. Yes, you're right, my bad. Official (-ish? there is also a redhat bugzilla) upstream bug is here if I'm not mistaken (twice :P): https://github.com/rpm-software-management/rpm/issues/423
(In reply to Greg Turner from comment #8) > (In reply to Michał Górny from comment #7) > > I don't think it's a fix *upstream*. It's just the commit from the pull > > request. > > Yes, you're right, my bad. Official (-ish? there is also a redhat bugzilla) > upstream bug is here if I'm not mistaken (twice :P): > > https://github.com/rpm-software-management/rpm/issues/423 As already posted below by the bug's creator. Sorry. I'll take the plunge and give the patch a try, in a week or three, if it's still unresolved, at which point I may have something other than noise to contribute :)
*** Bug 670814 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e56e352403a2405a99465e68218e84a057933b4 commit 0e56e352403a2405a99465e68218e84a057933b4 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-03-13 18:07:16 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-03-14 12:23:41 +0000 dev-util/debugedit: Apply GCC breakage workaround Thanks to slyfox for the patch. Closes: https://bugs.gentoo.org/666954 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-util/debugedit/debugedit-4.14.2-r1.ebuild | 92 ++++++++++++++++++++++ .../files/debugedit-4.14.2-no-reorder.patch | 57 ++++++++++++++ 2 files changed, 149 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1c43493a3eec023b86f3496973071dcfc492c41 commit f1c43493a3eec023b86f3496973071dcfc492c41 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-05-13 08:23:58 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-05-13 08:25:17 +0000 dev-libs/elfutils: add missing section update on reorder, bug #666954 Fix picked from https://sourceware.org/ml/elfutils-devel/2019-q2/msg00077.html by Mark Wielaard. Bug: https://bugs.gentoo.org/666954 Bug: https://github.com/rpm-software-management/rpm/issues/423 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-libs/elfutils/elfutils-0.173-r2.ebuild | 71 ++++++++++++++++++++++ dev-libs/elfutils/elfutils-0.176-r1.ebuild | 71 ++++++++++++++++++++++ .../elfutils/files/elfutils-0.173-reorder.patch | 37 +++++++++++ 3 files changed, 179 insertions(+)
*** Bug 683822 has been marked as a duplicate of this bug. ***