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/20019] NULL pointer dereference in libc.so.6 IFUNC due to uninitialized GOT Date: Thu, 11 Mar 2021 12:58:56 +0000 [thread overview] Message-ID: <bug-20019-131-GVhoaIvR1J@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-20019-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=20019 --- Comment #29 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to yangyanchao6@huawei.com from comment #28) > [root@localhost DTS2021030805K7VLP1D00]# gcc -O2 -c -o main.o main.c > [root@localhost DTS2021030805K7VLP1D00]# gcc -O2 -fPIC -c -o foo.o foo.c > [root@localhost DTS2021030805K7VLP1D00]# gcc -O2 -fPIC -c -o bar.o bar.c > [root@localhost DTS2021030805K7VLP1D00]# ld.gold -shared -z now -o > libbar.so bar.o > [root@localhost DTS2021030805K7VLP1D00]# ld.gold -shared -z now -o > libfoo.so foo.o libbar.so Never use ld directly unless you know what you are getting. > [root@localhost DTS2021030805K7VLP1D00]# gcc -o foo main.o libfoo.so > -Wl,-rpath,. > [root@localhost DTS2021030805K7VLP1D00]# ./foo > ./foo: Relink `./libbar.so' with `/usr/lib64/libc.so.6' for IFUNC symbol > `memmove' > Segmentation fault (core dumped) > [root@localhost DTS2021030805K7VLP1D00]# readelf -r libbar.so > > -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-03-11 12:58 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-20019-131@http.sourceware.org/bugzilla/> 2020-12-28 13:11 ` hjl.tools at gmail dot com 2020-12-28 13:16 ` hjl.tools at gmail dot com 2021-01-13 20:17 ` hjl.tools at gmail dot com 2021-01-13 23:28 ` hjl.tools at gmail dot com 2021-03-11 2:34 ` yangyanchao6 at huawei dot com 2021-03-11 3:07 ` hjl.tools at gmail dot com 2021-03-11 6:24 ` yangyanchao6 at huawei dot com 2021-03-11 12:58 ` hjl.tools at gmail dot com [this message] 2023-11-24 7:24 ` fweimer at redhat dot com
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-20019-131-GVhoaIvR1J@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: linkBe 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).