Received: from wolfsden.cz (wolfsden.cz [37.205.8.62]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 1096A781E30 for <~alpine/users@lists.alpinelinux.org>; Sun, 29 Mar 2020 13:43:17 +0000 (UTC) Received: by wolfsden.cz (Postfix, from userid 110) id 8C5D8227ACD; Sun, 29 Mar 2020 13:43:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_ALL autolearn=no autolearn_force=no version=3.4.2 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1D4692277C5; Sun, 29 Mar 2020 13:43:16 +0000 (UTC) Date: Sun, 29 Mar 2020 15:43:13 +0200 From: Wolf To: Natanael Copa Cc: Henrik Holst , ~alpine/users@lists.alpinelinux.org Subject: Re: tini-static dynamically linked Message-ID: <20200329134313.avejs4adn2r7eh35@wolfsden.cz> References: <20200327161918.4aedc0ca@ncopa-desktop.copa.dup.pw> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vwj4xlkv35hmowfz" Content-Disposition: inline In-Reply-To: <20200327161918.4aedc0ca@ncopa-desktop.copa.dup.pw> --vwj4xlkv35hmowfz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On 2020-03-27 16:19:18 +0100, Natanael Copa wrote: > The benefit with linking it as PIE (position independent executable) is > that it give full address space layout randomization (ASLR), even if it > is linked statically. >=20 > Side effect is that is marked as ET_DYN in the elf header and looks > like a dynamically linked executable. but at the same time, since it "links" against the ld-musl /a # gcc -static -pie -o test test.c /a # ldd test /lib/ld-musl-x86_64.so.1 (0x7f63e4bc1000) such binary is not portable to non-musl systems correct? And if I want to achieve that, I need to compile with -no-pie flag? Is my understanding correct? Thanks, W. --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --vwj4xlkv35hmowfz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7BIrb0FxyZaks1p7hTP5S2N55TgFAl6ApfAACgkQhTP5S2N5 5ThbbRAAxCCK4WDCoW6Vkyw18+3frqSeJfm6pY1FwZ0Rk5rhyURiYHCzC60xwhp1 9K7KAJZzDRR9zQAb+74CekSnqerZP/6a/Fgtg+b1OGWjM2TWN94oNUa8/cnGEtzI UretZkMyx0ceuxdD+xnhSq5anH8ietyZKb+i8i6oMHsstaeRGh/8rhLGJK9vLuK7 7NTkT/fjSNAwjuUuNhgQqU/4BseDn5T27L0RLWsLjAqRQIz7l19ZuOi4IWXjjMiD 3DjoXzm3O/JQpA2v9eQSQyEz8og5xdQJP0mqtiaGbfCRdICP1o3jXhBOLYcs3oTg pP5clk0HNYvk0EN395Ix7pzgdOE4L0pV2fCrLTy8MKfrkacnCN/7uov92LFXm6UX 776BHLrbuWFAvBVLClMksBydCkn7zU01N3DA6nGDVslyti8zJo5rsh3QGavvejnv TdYTSWfpx87PtY7QKPvIhXQhKFDIfKoIx7FeqlNmQjec+at9yCNMoo0CEWyyynJY 0oP9sbJhiu92YO84/d6RcqZz3gPD7VjxjxOl0DpbN+bnGYegYE3QBVl4kM9elJBL Jgol47+YY7XU8HoUfVzwXyTkJZz0FU1wL6a4QUD3RLBqEPYkDO22ZBWepNMa/hbf e4s9IjZRu3ESUiy18K87/pvxQxtXBnHYRFmq4ts5DNrEd0emOmw= =Qch3 -----END PGP SIGNATURE----- --vwj4xlkv35hmowfz--