Bug 2188013
Summary: | gcc-toolset-13-gcc: Revert <iostream> initialization changes for hybrid linkage | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Florian Weimer <fweimer> | ||||
Component: | gcc-toolset-12-gcc | Assignee: | Marek Polacek <mpolacek> | ||||
Status: | CLOSED ERRATA | QA Contact: | Václav Kadlčík <vkadlcik> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 9.3 | CC: | jakub, jwakely, markobri, mpolacek, ppalka, vkadlcik | ||||
Target Milestone: | rc | Keywords: | Bugfix, Triaged | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | gcc-toolset-13-gcc-13.1.1-4.1.el9 | Doc Type: | No Doc Update | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 2188014 (view as bug list) | Environment: | |||||
Last Closed: | 2023-11-07 08:34:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 2188014 | ||||||
Attachments: |
|
Description
Florian Weimer
2023-04-19 13:28:04 UTC
Jakub suggests that we could pull in an ELF constructor in libstdc++_nonshared.a instead (with an appropriate early priority). Do we want to revert these two commits or some other ones as well? 9a41d2cdbcd2af77a3a91a840a3a13f0eb39971b 4e4e3ffd10f53ef71696bc728ab40258751a2df4 Created attachment 1969733 [details]
Revert ios init changes
Makes sense to me.
I think you also want 87de39e4c3686535728f3a347f772e73af4cf262 (as the first one to revert).
There will be conflicts though, so I've attached a patch that does it cleanly.
I believe what is in the patch should work fine. If not, the reversions would break the gcc13-libstdc++-compat.patch though. Thanks Jonathan. (In reply to Jakub Jelinek from comment #4) > I believe what is in the patch should work fine. the patch = Jon's #c3 patch? Or gcc13-libstdc++-compat.patch and you actually don't want the reversion? > If not, the reversions would break the gcc13-libstdc++-compat.patch though. Relatedly, I see +_ZSt21ios_base_library_initv FUNC GLOBAL DEFAULT in our 'diff -up system2vanilla.abilist.diff nonshared.abilist' testing. Should _ZSt21ios_base_library_initv be .hidden as well? I meant gcc13-libstdc++-compat.patch . What is in there is that if you #include <iostream>, you require _ZSt21ios_base_library_initv symbol, and the object that provides that symbol (in libstdc++_nonshared.a) should initialize iostreams. So, instead of the old initializing per TU, it is now effectively initialization per library or binary. While upstream has it in libstdc++.so.6 only which does that initialization. I think the symbol shouldn't be hidden, we don't make the symbols from the system libstdc++.so.6 to libstdc++.so.6.0.32 diff hidden. If some other library exports it already and you link against that library, the libstdc++_nonshared.a object might not be linked in, sure, but then the dependent library should have initialized iostreams before running current library's constructors. Ok, let's give it (= no reversion) a shot. I'm also going to keep _ZSt21ios_base_library_initv non-hidden. If we run into issues, we can consider reverting the optimization again. Thanks. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (gcc-toolset-13-gcc bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2023:6479 |