From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13493 Path: news.gmane.org!.POSTED!not-for-mail From: argante Newsgroups: gmane.linux.lib.musl.general Subject: static linking problem Date: Sat, 01 Dec 2018 22:07:53 +0000 Message-ID: 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 1543701973 19192 195.159.176.226 (1 Dec 2018 22:06:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Dec 2018 22:06:13 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-13509-gllmg-musl=m.gmane.org@lists.openwall.com Sat Dec 01 23:06:09 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 1gTDOp-0004ot-0m for gllmg-musl@m.gmane.org; Sat, 01 Dec 2018 23:06:09 +0100 Original-Received: (qmail 19646 invoked by uid 550); 1 Dec 2018 22:08:15 -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 19614 invoked from network); 1 Dec 2018 22:08:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=proton; t=1543702078; bh=O05e1RYW+KnVWjHTEnGtIDr0fpmsASf5B3i6Lo6yiQg=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=IyLl9cj1xta1v0/1kVnDSLC3xWEeXY6IxPcKN6fl3SQ18IecoSBpFS7Z0hBinpTM2 ew+2OUoMltVtAwRnyPlWBmXLbI4mCf2vpykoVxIdb2KDJ7ITkh19U627QQ4pyN9lLF 9oQcxbnHY2nxC13mxsivntpLFPHULhBIGss9lah8GOUfIJrNzU9ZA1HcOLe9lrzGky 3LLoK5XCxt50sUt8NAF8ulLFbiZ3MKsK0zTh8WI6ESLow8cOauts3FrZCOdNXCaRVi tTWt1yZh3+ftY/jxqplllNukB1NjAyDTAzEAN36Hth6P5VPKC35O4lI/jvanRz1ugh d+hDBxxcxFFIw== Feedback-ID: sj1YN_iN560_iv4ir5EpCpCFj2RELVzNnBQpDIwMoUMNXowIBSidTdxSWFyLT3J_uOeJsE1taahISy929bGTAA==:Ext:ProtonMail Xref: news.gmane.org gmane.linux.lib.musl.general:13493 Archived-At: Hi, Does anyone have any idea why this is happening? The compiler (7.3.0) doesn= 't produce a statically linked binaries. # cat test.c #include int main() { printf("hello..\n"); return 0; } # gcc -static test.c # ldd a.out =09ldd (0x7f67f767e000) # readelf -d a.out Dynamic section at offset 0x1e88 contains 16 entries: Tag Type Name/Value 0x0000000000000010 (SYMBOLIC) 0x0 0x000000000000000c (INIT) 0x290 0x000000000000000d (FINI) 0x1207 0x0000000000000004 (HASH) 0x158 0x0000000000000005 (STRTAB) 0x180 0x0000000000000006 (SYMTAB) 0x168 0x000000000000000a (STRSZ) 1 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x202000 0x0000000000000007 (RELA) 0x188 0x0000000000000008 (RELASZ) 264 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffb (FLAGS_1) Flags: PIE 0x000000006ffffff9 (RELACOUNT) 11 0x0000000000000000 (NULL) 0x0 # /usr/local/musl/bin/musl-gcc -static test.c # ldd a.out =09ldd (0x7f5a608f9000) # gcc -static -specs=3D/lib/musl-gcc.specs test.c # ldd a.out =09ldd (0x7fb6c936f000) # gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc/x86_64-linux-musl/7.3.0/lto-wr= apper Target: x86_64-linux-musl Configured with: ./configure CFLAGS=3D'-Os -g0' CXXFLAGS=3D --enable-langua= ges=3Dc,c++ --disable-nls --disable-multilib --disable-werror --disable-lib= mudflap --disable-libsanitizer --disable-gnu-indirect-function --disable-li= bmpx --disable-libssp --disable-symver --disable-libgomp --disable-fixed-po= int --enable-tls --enable-deterministic-archives --enable-__cxa_atexit --en= able-default-pie --build=3Dx86_64-linux-musl Thread model: posix gcc version 7.3.0 (GCC) without '-static' everything looks ok # gcc test.c # ldd a.out =09/lib/ld-musl-x86_64.so.1 (0x7ff0dca25000) =09libc.so =3D> /lib/ld-musl-x86_64.so.1 (0x7ff0dca25000) Best regards