public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-28453-131-5AxNRJu0i8@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28453-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28453

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to alex_y_xu from comment #6)
> Created attachment 13792 [details]
> gcc-11.2.0:20210904-232553.log.xz
> 
> I am not sure how to build only libstdc++. I have attached my gcc build log,
> including GNU ld version printed by portage and the full link command, as
> excerpted below.
> 
> 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/libstdc++-
> v3/src
> -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstdc++-
> v3/src/.libs
> -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstdc++-
> 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 
> .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 
> -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 
> -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstdc++-
> v3/libsupc++/.libs
> -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstdc++-
> v3/src
> -L/tmp/portage/sys-devel/gcc-11.2.0/work/build/x86_64-pc-linux-gnu/libstdc++-
> 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=libstdc++-symbols.ver   -Wl,-soname -Wl,libstdc++.so.6
> -o .libs/libstdc++.so.6.0.29
> 
> 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-11-17 14:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  0:45 [Bug dynamic-link/28453] New: " alex_y_xu at yahoo dot ca
2021-10-25  1:23 ` [Bug dynamic-link/28453] " sam at gentoo dot org
2021-11-17  8:43 ` fweimer at redhat dot com
2021-11-17 13:09 ` hjl.tools at gmail dot com
2021-11-17 13:31 ` alex_y_xu at yahoo dot ca
2021-11-17 14:10 ` hjl.tools at gmail dot com
2021-11-17 14:17 ` fweimer at redhat dot com
2021-11-17 14:39 ` alex_y_xu at yahoo dot ca
2021-11-17 14:58 ` hjl.tools at gmail dot com
2021-11-17 14:59 ` hjl.tools at gmail dot com [this message]
2021-11-17 16:05 ` hjl.tools at gmail dot com
2021-12-09 17:47 ` alex_y_xu at yahoo dot ca
2021-12-09 17:51 ` alex_y_xu at yahoo dot ca
2021-12-10  2:32 ` hjl.tools at gmail dot com
2021-12-10 16:02 ` alex_y_xu at yahoo dot ca
2021-12-10 19:55 ` hjl.tools at gmail dot com
2021-12-28 17:32 ` alex_y_xu at yahoo dot ca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28453-131-5AxNRJu0i8@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).