Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 347CD782B3E for <~alpine/users@lists.alpinelinux.org>; Sun, 29 Mar 2020 14:56:57 +0000 (UTC) Received: by mail-io1-f51.google.com with SMTP id c16so488395iod.6 for <~alpine/users@lists.alpinelinux.org>; Sun, 29 Mar 2020 07:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnimodular-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2U0qCEPA9ddZW5peO31+2Mm4sKFByCChd+7HfvtcPGc=; b=yKu5MM5fN96lQD1Hu616Hr6GNv/0i7FNkhdvHkqAt+IQCzVu+RB2RtlClLIueZZFxQ 1+T8pQuTHPou8yqTcKyMSACrw7LONkJnPNpGmNHThbVj63L2PIq7mqAoyn+RlChvQwiP MRxmYNY+2WCUb0Ao45VZVdOTUPv481dP9fBJE9s0dBgsZ/eP614WF3KpfKE1yn96hk95 QjUol/P6kRTxBhyre8oiv1sqzHeFmJKQrXebXohKFftr7ooczGoNNcUmaEbK/W2fg2SS nXMmzi06KDwO4CeyFW4eKrkDkb6+biIYEw60J4g/UBaco6z1JQakDU7O3tcoTWjdxdVA T2WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2U0qCEPA9ddZW5peO31+2Mm4sKFByCChd+7HfvtcPGc=; b=XFFS+0ay3PsLUpx3r35pRC08BICDhdTrDAL2diOIh+Z49ebWXcaJ1bdN/1Djl1vn8x xRYlIzRNSgaxA1SujltCJpI/OSCyZkcVJkErT8SxINUIntcRU5lGydigZEDFwioa3pzL H1u3IOTuorLsuuUtn4ERR1Y0YUHzTqUFbdMicL/A8qfXMpXSFP8UaCfuQ2gwmtljx0k0 awMty2akIxHxb7jddl8pj/XHKuDPBhY+3PgqpENEh0BXUtrWbPi/hmUqolhZ9KOmJxDv UN615DqpFkOKqUVcx03ljccWo42eaESxBnFU0dS1C9xZnpC0Qk393+n4FCarqNOc1N8W sLnQ== X-Gm-Message-State: ANhLgQ3gb1/x1916YEtOkaqWDbTjw0O6vY0/30AdOeiXp2joHtRNuN2F C0AhzZjR5kP8ynP/etILWKUI7PU3PZuJwFARk4gNPQ== X-Google-Smtp-Source: ADFU+vuR6GA6SD+2MgJcB3vc8fN5KfH+HkClXvpKVm1rFsF+/zPQg38qAdSKSBYMId+3Kd0zj9wXRsES0OatZcLi3Vc= X-Received: by 2002:a6b:8ec2:: with SMTP id q185mr6761963iod.180.1585493816698; Sun, 29 Mar 2020 07:56:56 -0700 (PDT) MIME-Version: 1.0 References: <20200327161918.4aedc0ca@ncopa-desktop.copa.dup.pw> <20200329134313.avejs4adn2r7eh35@wolfsden.cz> In-Reply-To: <20200329134313.avejs4adn2r7eh35@wolfsden.cz> From: Henrik Holst Date: Sun, 29 Mar 2020 16:56:44 +0200 Message-ID: Subject: Re: tini-static dynamically linked To: Wolf Cc: Natanael Copa , ~alpine/users@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" My $0.02 is that tini-staic should be made a real static. The value prop for PIE does not outweigh the confusion that this is causing. /sbin # ldd tini-static /lib/ld-musl-x86_64.so.1 (0x7f6a662d7000) On Sun, Mar 29, 2020 at 3:43 PM Wolf wrote: > > 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. > > > > 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. > > -- > There are only two hard things in Computer Science: > cache invalidation, naming things and off-by-one errors. -- Henrik Holst, Tekn. Dr. VD och medgrundare Omnimodular AB (559050-1846) E-post henrik.holst@omnimodular.com Mobil +46 76 246 17 15