From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CE23A3858400; Wed, 17 Nov 2021 14:59:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE23A3858400 From: "hjl.tools at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/28453] ld.so segfaults when relocating x86 libstdc++.so compiled with -fno-plt Date: Wed, 17 Nov 2021 14:59:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2021 14:59:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28453 --- Comment #8 from H.J. Lu --- (In reply to alex_y_xu from comment #6) > Created attachment 13792 [details] > gcc-11.2.0:20210904-232553.log.xz >=20 > I am not sure how to build only libstdc++. I have attached my gcc build l= og, > including GNU ld version printed by portage and the full link command, as > excerpted below. >=20 > libtool: link: /tmp/portage/sys-devel/gcc-11.2.0/work/build/./gcc/xgcc > -shared-libgcc -B/tmp/portage/sys-devel/gcc-11.2.0/work/build/./gcc > -nostdinc++ > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/src > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/src/.libs > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ > -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include > -isystem /usr/x86_64-pc-linux-gnu/sys-include -fno-checking -fPIC -DPIC > -D_GLIBCXX_SHARED -shared -nostdlib /usr/lib/../lib64/crti.o > /tmp/portage/sys-devel/gcc-11.2.0/work/build/./gcc/crtbeginS.o=20 > .libs/compatibility.o .libs/compatibility-debug_list.o > .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o > .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o > .libs/compatibility-chrono.o .libs/compatibility-condvar.o=20 > -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a > ../src/c++98/.libs/libc++98convenience.a > ../src/c++11/.libs/libc++11convenience.a > ../src/c++17/.libs/libc++17convenience.a > ../src/c++20/.libs/libc++20convenience.a -Wl,--no-whole-archive=20 > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/libsupc++/.libs > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/src > -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstd= c++- > v3/src/.libs -lm -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/./gcc > -L/usr/x86_64-pc-linux-gnu/bin -L/usr/x86_64-pc-linux-gnu/lib > -L/lib/../lib64 -L/usr/lib/../lib64 -lc -lgcc_s > /tmp/portage/sys-devel/gcc-11.2.0/work/build/./gcc/crtendS.o > /usr/lib/../lib64/crtn.o -Wl,-O1 -Wl,-z -Wl,relro -Wl,--gc-sections > -Wl,--version-script=3Dlibstdc++-symbols.ver -Wl,-soname -Wl,libstdc++.= so.6 > -o .libs/libstdc++.so.6.0.29 >=20 > Note that -Wl,-O1 -Wl,-z,relro are specified but -Wl,-z,now is not, even > though it is used for other libraries (e.g. libgomp, liblto_plugin, > libgcc_s). Please provide ALL linker inputs so that I can reproduce libstdc++.so on Fedora 35. --=20 You are receiving this mail because: You are on the CC list for the bug.=