From patchwork Mon Oct 24 03:53:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617830 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2474662pvb; Sun, 23 Oct 2022 21:25:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IcsmM+iiI1kEITib6/rKruWwAcAiHDjEaeULNypCKu3fGKbUE0mkqFdFSLyJvRyttElk3 X-Received: by 2002:a05:622a:130d:b0:39c:eee6:11ed with SMTP id v13-20020a05622a130d00b0039ceee611edmr25486814qtk.297.1666585558603; Sun, 23 Oct 2022 21:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666585558; cv=none; d=google.com; s=arc-20160816; b=XUJRvZ9Jb9S3bSWrJIqz4Zz6otH2GmxWV7DYZ9t9/5KUWRGOvilVZ9nIKpE9Mjb+cn W7OI9Z9bZkXKfCDhRgX5nqRjgatfp/XVpX1q0fpPnGYam3EeY1cCluQ+EjxuUZX3TzLM O+w+fujYpBuNVRydiQnXQqtkSdDXapLMOKKGRhsJYbmRU8vq96EqCq/BohbKo3mv0A0t AYJiWYkHQ2VEFBCDRgxv9KUY+MBrfMwcP1KBgvqKZFbJYs2/sr+8ppOwl8pOj/G6e+I4 Fnjul+oPwfFC8UEkWV19sdnJ4efmaz8QtZJRV9rXZYQNg3VH+z8mCr0FVO68TW6X1598 zJEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=pne8A3hm0ExSQcaY2kW7jY45WvIIOKVwyTTixp+4MC/maiOE1f3EWunHJHk4DsbKA5 HJQ39OBNE1B0COk7YFLfWyxvbtCGcIYRfYMz/ZVKqZvhG0kY0slla/Yx/17AWxx0Hwqt dg7ZXVOOVAyyLAFlshE2Zk3BrVYMyuOwf4/xEChbm41lwfYpdfE0wzWqgqG6lrNP+EHD MfH0GHH8vOtiW0G/KI3oPqLW/XpuUhBEfhkjrDS4FD0j4MbiZF5dWAVgS6LSl66bDyHy 4Htvv3Y5vUdwlOe44b1SA6/fx7vOCC/XRGC3iQg3xMaT0B0TWs+meCLDhvNwFE0/XH7e b7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HIhB6959; 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=pass (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 dv22-20020a05620a1b9600b006eb0367f461si15845053qkb.396.2022.10.23.21.25.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Oct 2022 21:25:58 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=HIhB6959; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omoXH-0007Y2-FL; Sun, 23 Oct 2022 23:53:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omoXE-0007Sr-En for qemu-devel@nongnu.org; Sun, 23 Oct 2022 23:53:58 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omoXC-0000Yu-J2 for qemu-devel@nongnu.org; Sun, 23 Oct 2022 23:53:56 -0400 Received: by mail-pf1-x432.google.com with SMTP id b185so1798781pfb.9 for ; Sun, 23 Oct 2022 20:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=HIhB6959BuzB5qfu6/F5MZBhSykJG9nwhMtUkzL6SMRc+IQObCJd0oC1ZWnrxGy380 Ch7m8noOCGj8pMmO7sQnah1iUfiVxXPB932OrR/qmuu3Wdh0bLzr5jEXRpdi4geVCXLN Q3a25T00l8KGYFp5hYZUyTrHVu9+Qnb1c56OXUyEZvhZESk627JSu+4xyxmx7HWFIjMW RT1Q2Cn2+C2k9NztdP5l9WswFV+p5lldP9X+fyfHipOaONigou48O6AefYipEp7ISUFU efA3rY0Uyv/YwcIYDPe846Obw2E90D+SpXVZ1+PsLuqna+hR6uNq1ocdrRow9cNhtePq h8iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=j7eSwmeDp4xhTsaFCT6b7yOel8kj8U7zuV8IPIjU9lGjWnbXUJAhZTrdvb+2xfmf5v FCIofmDVlqHnEFrL2PqE7neARkVL0jT8a3vDx0hAfgBBCQyNCC0l2FMXUzLEo8OALqeK vxK5TcSFx3SSgzMBJdkmUgtXZYt993s+/iBlQwWkxY5653pLlHkK9S8QwOHsnKoZQ3eF 8Pdk32KQR3Z+g3YlK13xBMgKwdl3PyTYF0rN2jPgCH30tBrm92RBp1zNDS3oD+/1lptH SRPdyPQ3gSZZ+oVGdklvUKalzRkM3+6+2zVHACMM91mGVCE5BNYk4/UURJDRA13HYRiU dIYQ== X-Gm-Message-State: ACrzQf1hvplk28b4NWaU6BqHdeZ94G4Fxy7wTehQZq0umqTR0zkanA4Z Qm38A3bNvPFAw7U2byuQyTqMrYYzAXy5am1M X-Received: by 2002:a63:4955:0:b0:44e:d36e:4c2e with SMTP id y21-20020a634955000000b0044ed36e4c2emr26364047pgk.326.1666583632702; Sun, 23 Oct 2022 20:53:52 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id t15-20020a170902e84f00b00186a2dd3ffdsm1433569plg.15.2022.10.23.20.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 20:53:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org Subject: [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Date: Mon, 24 Oct 2022 13:53:41 +1000 Message-Id: <20221024035341.2971123-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org More closely follow the default linker script for nios2. This magically fixes a problem resolving .got relocs from the toolchain's libgcc.a. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258 Signed-off-by: Richard Henderson --- tests/tcg/nios2/10m50-ghrd.ld | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld index 7db0d59ad7..71cdda450c 100644 --- a/tests/tcg/nios2/10m50-ghrd.ld +++ b/tests/tcg/nios2/10m50-ghrd.ld @@ -44,11 +44,15 @@ SECTIONS .data : ALIGN(4) { *(.shdata) *(.data .data.* .gnu.linkonce.d.*) - . = ALIGN(4); - _gp = ABSOLUTE(. + 0x8000); - *(.got.plt) *(.got) - *(.lit8) - *(.lit4) + } >ram :RAM + + HIDDEN (_gp = ALIGN(16) + 0x7ff0); + PROVIDE_HIDDEN (gp = _gp); + .got : ALIGN(4) { + *(.got.plt) *(.igot.plt) *(.got) *(.igot) + } >ram :RAM + + .sdata : ALIGN(4) { *(.sdata .sdata.* .gnu.linkonce.s.*) } >ram :RAM