From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13496 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: static linking problem Date: Sun, 2 Dec 2018 19:15:03 +0100 Message-ID: <20181202181503.GT21289@port70.net> References: <20181202001821.GV23599@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1543774391 8871 195.159.176.226 (2 Dec 2018 18:13:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2018 18:13:11 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-13512-gllmg-musl=m.gmane.org@lists.openwall.com Sun Dec 02 19:13:07 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gTWEs-0002BV-Ta for gllmg-musl@m.gmane.org; Sun, 02 Dec 2018 19:13:07 +0100 Original-Received: (qmail 3859 invoked by uid 550); 2 Dec 2018 18:15:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3838 invoked from network); 2 Dec 2018 18:15:15 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:13496 Archived-At: * argante [2018-12-02 17:20:15 +0000]: > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original = Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > On Sunday, 2 December 2018 01:18, Rich Felker wrote: > > On Sat, Dec 01, 2018 at 10:07:53PM +0000, argante wrote: > > > /lib/ld-musl-x86_64.so.1 (0x7ff0dca25000) > > > libc.so =3D> /lib/ld-musl-x86_64.so.1 (0x7ff0dca25000) > > > > This is dynamic-linked, yes. But there's nothing wrong with your > > static-linked program. If you really don't want pie, use -no-pie or a > > toolchain that wasn't built to produce pie by default (gcc's > > --enable-default-pie option at configure time). =2E.. > I did everything step by step from scratch. Maybe it's a long mail, but s= hows stages and results. =2E.. > ./configure \ > CFLAGS=3D"-Os -g0" \ > CXXFLAGS=3D"${CFLAGS}" \ > --enable-languages=3Dc,c++ \ > --disable-nls \ > --disable-multilib \ > --disable-werror \ > --disable-libmudflap \ > --disable-libsanitizer \ > --disable-gnu-indirect-function \ > --disable-libmpx \ > --disable-libssp \ > --disable-symver \ > --disable-libgomp \ > --disable-fixed-point \ > --enable-tls \ > --enable-deterministic-archives \ > --enable-__cxa_atexit \ > --enable-default-pie \ ^^^^^^^^^^^^^^^^^^^^^ > --build=3Dx86_64-linux-musl \ > --with-mpc=3D/usr/local =2E.. > I still can't understand why musl-cross ldd works correctly, and new tool= chain shows such a strange result. Did I overlook something? I even tried -= Wl,--no-dynamic-linker. what do you mean strange? it seems to work exactly as expected.