From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66C1CC4361B for ; Wed, 16 Dec 2020 11:09:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD41223124 for ; Wed, 16 Dec 2020 11:09:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD41223124 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpUg7-00065l-Jo for qemu-devel@archiver.kernel.org; Wed, 16 Dec 2020 06:09:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpUez-0005dh-9x for qemu-devel@nongnu.org; Wed, 16 Dec 2020 06:07:57 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:41080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpUew-0003Ww-Eb for qemu-devel@nongnu.org; Wed, 16 Dec 2020 06:07:56 -0500 Received: by mail-ed1-x535.google.com with SMTP id i24so24315872edj.8 for ; Wed, 16 Dec 2020 03:07:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LW+CsWeusaHRlDUlX7KOsMgyM/XCUznVX26MgQTj6nQ=; b=DM0t+rD7PtW61TFYYPRo5JYJiTLvPRaoPhD45aGIpcX0Z2/68EXIikW0jmi/UdGOAd vsxkjQM6bHw5Nve0K2s+5Q7QzpB4RpNjcQJVLjWr7IhCvpbokGDWxQmjSYAvaOcRkKFe AWeKvZdmjEu8NpivqfIHgeSBumVtfttvEe/OQYUHGJWgDM7OtU9pVfi7Yahfh/lcmzMc eL6JK8roFlE5CdhkMfUE8NYzITGdL6gyE325C8KgmqjF+R2LRlz1BXRWu5RVlnLxz5q8 1q6YH+9Dt8CTf/TDKtRxk0LEy+c8PVFQMDGq837TXnthY+jBo9Wb6Q4i4dxMUaYUIyns XeOQ== 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=LW+CsWeusaHRlDUlX7KOsMgyM/XCUznVX26MgQTj6nQ=; b=DFP91NwjlDsHDDB2gsj00YUwc7+YQVDMKODfqqhCQmorZAT/kxa/Wr9iHU2wyHG1nR +9jo7ZLYcpt50wwg1+7ne+0P2yMVjDwP6fJZvBibd2Ss3UdWpFchUEe02uy1RPd8xjRG 6OsRcyVnb4MU856157xnLlYOd1jhyKeAfXcDVRvm7JI2EEPPQ+WsYu9mQc73XghhPa34 jsaufCK8QI8ZfcffMM886X5B3QuefiuDCCXz2rnKqs31sLDOcbXk/75S0HtP3FXFyh26 paYDrkBgx1OtcDlWctcQnIw+Q3jcZYeZLuxwqXQ5FVJihvjk3XlKlKZAt1KuEN2iBiAQ yb3g== X-Gm-Message-State: AOAM5316X73RPTELVxz04N7qJ82UY3hf3erkQiGnzzqbxV/6lDFuZvTg 1IFm/NTl/0Dg6tegagyGA/8zHt2PHA3BnLl3mLgNnQ== X-Google-Smtp-Source: ABdhPJwG+XNIL8zwbSgtdybkG37s16Y4if8rkmUbSilrizdZHAnvi0kjlwl9gFZuuc6dsxI/qlJQyJl8uMOCyEdY4g4= X-Received: by 2002:aa7:d915:: with SMTP id a21mr32791091edr.251.1608116872764; Wed, 16 Dec 2020 03:07:52 -0800 (PST) MIME-Version: 1.0 References: <8732c6f5-34ac-dcce-ee9f-69e7dd612e4e@elloe.vision> In-Reply-To: <8732c6f5-34ac-dcce-ee9f-69e7dd612e4e@elloe.vision> From: Peter Maydell Date: Wed, 16 Dec 2020 11:07:41 +0000 Message-ID: Subject: Re: Are user static builds really dynamically linked ? To: "Tj (Elloe Linux)" Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 16 Dec 2020 at 06:39, Tj (Elloe Linux) wrote: > > user --static builds are apparently resulting in dynamically linked > executables (to the glibc library, not other shared objects ) I think you mean that you end up with an executable that's dynamically linked but although it requires the dynamic linker (ld.so) it has an empty list of dynamic libraries (ie not even glibc). > Concise summary: > > $ file ../qemu-aarch64_v* > > ../qemu-aarch64_v4.2.1: ELF 64-bit LSB executable, x86-64, version 1 > (GNU/Linux), statically linked, > BuildID[sha1]=70f5e10ac0eb9b63d7758850e2f18d0a047d4b79, for GNU/Linux > 3.2.0, with debug_info, not stripped > > ../qemu-aarch64_v5.2: ELF 64-bit LSB shared object, x86-64, version 1 > (GNU/Linux), dynamically linked, > BuildID[sha1]=91fda2fa08f46d1bb6d19b6f72a4819a7c20fd7e, for GNU/Linux > 3.2.0, stripped > > $ ldd ../qemu-aarch64_v* > > ../qemu-aarch64_v4.2.1: > not a dynamic executable > ../qemu-aarch64_v5.2: > statically linked Something has definitely changed here. What you had with 4.2.1 is what you should be getting. The obvious suspect is that something weird happened in the meson conversion... That said, there must be something specific to your setup which is causing this. I just tried (on Ubuntu 18.04): $ git clone https://git.qemu.org/git/qemu.git $ cd qemu $ mkdir build $ cd build $ ../configure --disable-system --enable-linux-user --static --target-list=aarch64-linux-user $ make -j8 and 'file qemu-aarch64' says: qemu-aarch64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=c3e1ffd0a2805a7043a40659ecbc7774cb42f7bf, with debug_info, not stripped and 'ldd qemu-aarch64' says: not a dynamic executable as expected. thanks -- PMM