Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id D4C56782C51 for <~alpine/users@lists.alpinelinux.org>; Fri, 6 Mar 2020 16:07:01 +0000 (UTC) Received: by mail-ua1-f53.google.com with SMTP id t20so863847uao.7 for <~alpine/users@lists.alpinelinux.org>; Fri, 06 Mar 2020 08:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=62V3Kg9GkMEtv3jwEb3xNCl4Pp3q/xSHl92rSOLHnS4=; b=GT0PC69tFwpxH2wsCQWRRT+eOHYdVTkML/RA1FMZUmBzoaPWYINbZ90QEi9Aufxvb5 y6kj41/OAnBiFcNktznOg+RczBY24DfxaGVxaKUthgDLkqHAeuFoWGsAcISteBCvlBpG 9NmACesYgTR3EPFkTq3xkgf4RYXcWbTxLzsXqnunA/3vwdzMwMiS5i8FRHEsdu8DASJu /TiaErYQ0zodA7vqLgtETPX4t3eyz7HwfW0HGQS0jpEx0MOytT+prsv/9jtYYBBgQlOp wnSV/AVVPeLZs3NObu/g4IYJIJ0rrDZ6mTfr30BkVzadzKFU52pioSEAaFdHOM5QYUGp R3kA== 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=62V3Kg9GkMEtv3jwEb3xNCl4Pp3q/xSHl92rSOLHnS4=; b=r5pM5/W1zi22NJQPSfvVYgJzRR7+cP/F3tYxeDoaTHzpHdfv6ZphlO6X6Tj09fuROh 42vfuHd8/VwAd4hhICu/X7EsFk+EmhH0kVcQhVTDqvAYrWLLypths+UNhF3X+cbt1c3p qsABIs6oV4TW8PwFmQgJixcWDxm2fxqAcRUpX+DJaJJwvdtx8OWx4TNz2qS0HfiY7R/R WuYzCfuEdpzDSEGV6dhUcQvvGMjEY8OaDMdGnFg8Z5ggxHcQ+gG22TBHTmeKfdl9Cluv MlPtofUX2JRiPKnjjcuo+V03+1CaiH/xvl0+CS+Z+E11oL5SFePqHTEtGd10Wt3+8quj H6gg== X-Gm-Message-State: ANhLgQ3F+8i+F8ih9E2yujrXcBO5iolBndTSpiPSpYWJbdKP0ZSKxKP9 xrEWOX5xOV+7fCh1HGUt4aDHhC9MK8A4rT5fYzo3bA== X-Google-Smtp-Source: ADFU+vvMcjrAnhNoeV1cuFurYcb2tV0GSUjhnLguWOtwxPBBVdAiSflt9foHD6NhDIoNs2ANss49z6f53N8ziWRX8LA= X-Received: by 2002:a9f:3733:: with SMTP id z48mr1988596uad.140.1583510820175; Fri, 06 Mar 2020 08:07:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Benson Margulies Date: Fri, 6 Mar 2020 08:06:47 -0800 Message-ID: Subject: Re: Why is static linking not quite entirely static? To: Konstantin Kulikov Cc: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000efd5f805a031d776" --000000000000efd5f805a031d776 Content-Type: text/plain; charset="UTF-8" Thank you. Is it possible to turn off the PIE? I may be able to ship the linker along with, but I just want to understand the options. On Fri, Mar 6, 2020 at 12:42 AM Konstantin Kulikov wrote: > On 3/6/20 9:12 AM, Benson Margulies wrote: > > Executables built with (e.g.) g++ -static still show a runtime > > dependency on /lib/ld-musl-x86_64.so.1. My recollection from the past > > was that it was possible to achieve a completely static a.out. Is there > > a way? > > > > It is not possible to run PIE binary without dynamic linker - it needs > to do relocations at runtime. > > I don't know if it's possible to bundle dynamic linker with your binary. > --000000000000efd5f805a031d776 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you.

Is it possible to turn= off the PIE?

I may be able to ship the linker along wit= h, but I just want to understand the options.

On Fri, Mar 6, 2020 at 1= 2:42 AM Konstantin Kulikov <k.ku= likov2@gmail.com> wrote:
On 3/6/20 9:12 AM, Benson Margulies wrote:
> Executables built with (e.g.) g++ -static still show a runtime
> dependency on=C2=A0/lib/ld-musl-x86_64.so.1. My recollection from the = past
> was that it was possible to achieve a completely static a.out. Is ther= e
> a way?
>

It is not possible to run PIE binary without dynamic linker - it needs
to do relocations at runtime.

I don't know if it's possible to bundle dynamic linker with your bi= nary.
--000000000000efd5f805a031d776--