From patchwork Wed Dec 18 03:19:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181962 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp88070ile; Tue, 17 Dec 2019 19:22:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz1nf4Am+RR84hh8Syk8Om5iDh7lGqNnGtM83lYm8Xov05OwF/wrTEbJ016tu79AiX4zGSL X-Received: by 2002:a9d:768b:: with SMTP id j11mr174416otl.116.1576639321232; Tue, 17 Dec 2019 19:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576639321; cv=none; d=google.com; s=arc-20160816; b=WhfOocJal9Ko8SgF+orK2sG+LV78+GkgIV0NnkOmUyb+RbIHpfosam0eB+9XE6aymf tRAYhofdImoTVqSeKIvlU+fR3tKA0VPFnlX9+1peOs5wQmfGTEUDtfm1K7Oi/DdBIkAM Y/yseTKGqfDXFL90m7qjrAPfYz75Ui2B7egRPWmf+Rrqd7aiwDRoRnkau9YSV3uFJeJq p5gImon2te6AwjHO//kaW3jJXeSIcEz40487OVP0zmg/7ZBTqM0YZKwSGrzo2kRFiC65 ErQ0iB9EKK4T9MobMhrmgMOO7jqo0WmAiqPNOHzyZ3AmZYHy8LD2UiYTSLTPDNXaQjr9 8MeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=ihZfE8DpETfNLV/nWFmOLomurxv8JcwHssCMdL8p5Hw=; b=sNzj90C1UmtaCu7RCjEwnYnXMHpJYORR60k/px9vPVjRolCg6eQpsiQJMZU/TMp+Jw gKrfcBxtcvgRvIVuA4c2TigJ0xc4ykzo44PBY/iN2kdP1Z2SOuDRIkxDoOcdG4yi+H+H rRHz5Fbg/nCuMb/jXYdEQRP4VbepR8zf+ThSdJz1BjoUDkw0xpQ6KI99BF1NscFgbKpO z45a+tue4+uHjKuYEZfrbQwbocmedEbIo7ZVoyuR/XAobhyeTK2+pIqFf+SbXp+a8UPR OEVd9uvT4MhlMLrLFEllznOd0JjrpzlQNLmhik5HC1/d36tvmmaQIXUl1aT4IcQBLQfQ qXqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="HbDrWp/K"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c12si566754otf.18.2019.12.17.19.22.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2019 19:22:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="HbDrWp/K"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihPuR-0007EK-Vk for patch@linaro.org; Tue, 17 Dec 2019 22:22:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43857) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihPry-00042v-Vm for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihPrx-0002ck-NA for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:26 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:42908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihPrx-0002bb-GV for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:25 -0500 Received: by mail-pg1-x543.google.com with SMTP id s64so438166pgb.9 for ; Tue, 17 Dec 2019 19:19:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ihZfE8DpETfNLV/nWFmOLomurxv8JcwHssCMdL8p5Hw=; b=HbDrWp/Kx8GI+OrkUCx5RnC0BUMSA5xpmeAUdxPENjKfpe3Bp86SnV+QbRHAUbCc56 ZvF2LXy2NmcPTSPfsligSAAJYqWmBYDddYOr+mDFzSuprEJImZcMVgYGXhK9BO43ZE+H mffzY42BRxJEK3OVbyjICAnYhv5d54XEWpK4oT2edqvejOzTFv8iBlpTtRxc29R9QYQr LOdQcx+KiLWoprcEhxAtVh+HtxItQlqy3vkn0mPVyYunhp5NTwU6SgPhuD5iOXTv6cye z70g7SQZ1/aw9wX6AwRghBsRXI+XtJK7Qm+r/umsGF/1D3LX2Dz8OI7u2c0OsXxCRgXM GrjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ihZfE8DpETfNLV/nWFmOLomurxv8JcwHssCMdL8p5Hw=; b=OqWcCsBGe7K59BKRyQ1wAqbczs5MtlV8RLSt9Fmc4QjHoZLiM6Rf5E7aeCHlBNoqwn 6rIGOZ+wQ+96EXI2Xb0c3tm8qZiSN0VcPsRtcbja7ri+5iDvrIiWtK64/nB/V7Au+JjL j4VUMBPfF4qn0TIWmyqlCZ93fWwYNqfCwHlCOnIRS0Gs3EGu5F4vJLXLq+joQQg/+GMS IQwhqeLC5TBdZ69V5LNwft9MXcCHIIbwDn07lLRjmRNaGjFCblRGFqmW6596AWBv5XTo vQuv2KMv9SoXafHNRhpu3vDZev/f1bI23quxpzj7+EF2GLPjhFY+BpWhv3Xj45HKJgmL me2w== X-Gm-Message-State: APjAAAWhnIp6IOdlV4qji7Lc0+J3xBY47FoL85khOgx8ubAIs7WqrmaI 0CyF+uo9mnsyYbS0Mv+vE2xaqI+m+sM= X-Received: by 2002:aa7:9f47:: with SMTP id h7mr454686pfr.13.1576639163415; Tue, 17 Dec 2019 19:19:23 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id k27sm404870pfp.66.2019.12.17.19.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 19:19:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/7] configure: Improve PIE and other linkage Date: Tue, 17 Dec 2019 17:19:13 -1000 Message-Id: <20191218031920.6414-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 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: philmd@redhat.com, i@maskray.me, berrange@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This begins by dropping the -Ttext-segment stuff, which Fangrui Song correctly points out does not work with lld. But it's also obsolete, so instead of adding support for lld's --image-base, remove it all. Then, remove some other legacy random addresses that were supposed to apply to softmmu, but didn't really make any sense, and aren't used anyway when PIE is used, which is the default with a modern linux distribution. Then, clean up some of the configure logic surrounding PIE, and its current non-application to non-x86. Finally, add support for static-pie linking. r~ Richard Henderson (7): configure: Drop adjustment of textseg tcg: Remove softmmu code_gen_buffer fixed address configure: Do not force pie=no for non-x86 configure: Always detect -no-pie toolchain support configure: Unnest detection of -z,relro and -z,now configure: Override the os default with --disable-pie configure: Support -static-pie if requested accel/tcg/translate-all.c | 37 ++---------- configure | 120 ++++++++++++-------------------------- 2 files changed, 41 insertions(+), 116 deletions(-) -- 2.20.1