From patchwork Tue Sep 10 14:07:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 827001 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp325110wrc; Tue, 10 Sep 2024 07:08:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUeRde9GXYUCONawC1A+MWqkFN9ikAbyYq5AibX/6RjU5ncVK5jGuFn18HDcQu5ombMHoMxFg==@linaro.org X-Google-Smtp-Source: AGHT+IG20tMgT+MlMZZJnhziBmHSMHMIit7xwqDghJirCWDc5XRuNKZlTtBQ0fxL0sP/+J235APM X-Received: by 2002:a25:ae61:0:b0:e1d:3f80:2273 with SMTP id 3f1490d57ef6-e1d3f8024e0mr11087106276.56.1725977292065; Tue, 10 Sep 2024 07:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725977292; cv=none; d=google.com; s=arc-20240605; b=QCoGeYXmaj2qNzKsmkivnT9qPa24mHM5Qccw6Jk5Ebg0fwlzkAPyWfTBOEx7hNks5D ppj8smTRvR0BmAOU12sww7c1px6TGEZ2kmpP7Yg0wkeVKBz/4aDW13UD67tAKmhLTgaR ZDt2V+0E1g6SVgfn9tlCjfboO8VYrpD0oWFt8M7ES8goPXC8RrAYFPipgjraGq6ENYly PbWqbkuq1ZaZBJpARQICw/gRoxVs/SJ/xSdY4VOGH1BEN8LNZ0O4umh2RwZJk5R9G7f+ ClwXc2EDUkOW/9dXRL7CBWUW6zKg0BUMu6kaVJMhMppZgG4HI68cF+hUEOxIkrWAUCaq wncg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y9b0lTkZojj9hYO/C00YAyDV7juvCe44sJPqhBOockE=; fh=PhBQM8pmScIWHtkB7lnBtYO8zFHd76cVam1qPCuCqeM=; b=XoWgGV844ie+W5JDwky4P34h0lXMf6cFxdWWXIdt0ItxBdqOB5YghsSJGnJi9UOcAg TUvrGShsvLsl4Tdynb/CY/ojBGtSr2eUHSqKVar/9ijdX69OpnFJNqM0B7rmM8tPqq1u bUgoWUXlUb1eMDkrZX5qedXCWgCjbpoJt7D69FJ4DW9e8rZsfU7bpF92qIG2dZ1ONSl1 wIY4/woe3+VV4qitSg345OUH0X3WNvWDoSZzHcfXJqABPLLMso+kpBCgaJUjNGMgPAAl 4uZVPg5OcSMN/qG8C2bZX4h8Z8d1iJ6OpZurd5V5WZ/cwhJPZW/hjdz4FEl1jYURvvhi P6Bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IP0zdsKX; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3f1490d57ef6-e1d7bc0ce64si1010691276.573.2024.09.10.07.08.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 07:08:12 -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=IP0zdsKX; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so1X0-0007g4-3J; Tue, 10 Sep 2024 10:07:46 -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 1so1Wy-0007Zo-Is for qemu-devel@nongnu.org; Tue, 10 Sep 2024 10:07:44 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so1Wv-0006Uy-CD for qemu-devel@nongnu.org; Tue, 10 Sep 2024 10:07:44 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a8a7596b7dfso23608466b.0 for ; Tue, 10 Sep 2024 07:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725977260; x=1726582060; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y9b0lTkZojj9hYO/C00YAyDV7juvCe44sJPqhBOockE=; b=IP0zdsKXM8qmWnxqNvsEX8q72HmDyZ5gd27QDb+PUxbsyf+Bgx2ZTVRAIlEgSq2Bl+ uFmicV5otAjQJYSjw8lBEUIx6DLLJ/OifYMI0p5nmOctXF/liE1tBBgvy4Ege4sAKCi+ TJSnIPROO3elzi8sJxqvsfYWQX1IXNUb0lnIHFPGYIuTiaIqxVMkQOr+AiZIfNeE0yN9 eY3jKEdjvmEbFs66DJ3ygfy6K7Uhb880B6LGE2QScb18xDJ4ggqrRcNCRP4aqXVQMFRg 1S8laBR9vItebm+BiTKlWQER1lY9IgHPXkZ9GumD52Y1ZIgOYNjULo/GWOdKqsN8ACGZ nXxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725977260; x=1726582060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y9b0lTkZojj9hYO/C00YAyDV7juvCe44sJPqhBOockE=; b=E44kCbGBEfaudqVKQf4hCWKPMIMHbxSQOUr99kL10wR8uIBLFuSNcKyGfDfBRSlf3e OfGnkld7szuL2fh1M4zsid7qWQKfDJf+0lI76xY23xRL7tnM3RF6HTUS84DRY5iej9pE wowkqSR67ke+HY5ZS40oZMe1QwSCXI9yD2rgH73/eeI6yTfER088+ZI0YQt0tIIRhFab c2A7+U7B7quH4zKyG9U1/XippJ4Z9UYzrmss0xe0YrcfpqMkpfERzyrLGuL8i3ioll4I 1F79oWBgQzDLVx8330yGziPMWqAJLHvG47epG63Dtbc0slA4cUMxZSrD/A1voAO3mc4g TEkw== X-Gm-Message-State: AOJu0Yy9V5AtohGhmORDIl7SOtyvVDvDS/CQ06xvfBeAt2kcSV0auDKr JeuLsyl0+4tNYtkKEwm43/D1aNONwHmfKG5TfiNj35WVOyhorZ8Fp8Gb44jfCgM= X-Received: by 2002:a17:907:25c6:b0:a8a:8dd3:f135 with SMTP id a640c23a62f3a-a8ffab79894mr108768366b.14.1725977259513; Tue, 10 Sep 2024 07:07:39 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25835a76sm487586366b.39.2024.09.10.07.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 07:07:36 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 69F825FA11; Tue, 10 Sep 2024 15:07:34 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Zhao Liu , Marcel Apfelbaum , Beraldo Leal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Yanan Wang , Peter Maydell , Mahmoud Mandour , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, Jiaxun Yang , Paolo Bonzini , Richard Henderson , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH 08/26] tests/tcg/aarch64: Improve linker script organization Date: Tue, 10 Sep 2024 15:07:15 +0100 Message-Id: <20240910140733.4007719-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910140733.4007719-1-alex.bennee@linaro.org> References: <20240910140733.4007719-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Gustavo Romero Improve kernel.ld linker script organization by using MEMORY command. Signed-off-by: Richard Henderson Signed-off-by: Gustavo Romero Message-Id: <20240906143316.657436-5-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- tests/tcg/aarch64/system/kernel.ld | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/tcg/aarch64/system/kernel.ld b/tests/tcg/aarch64/system/kernel.ld index 7b3a76dcbf..5f39258d32 100644 --- a/tests/tcg/aarch64/system/kernel.ld +++ b/tests/tcg/aarch64/system/kernel.ld @@ -1,23 +1,23 @@ ENTRY(__start) -SECTIONS -{ - /* virt machine, RAM starts at 1gb */ - . = (1 << 30); +MEMORY { + /* On virt machine RAM starts at 1 GiB. */ + + /* Align text and rodata to the 1st 2 MiB chunk. */ + TXT (rx) : ORIGIN = 1 << 30, LENGTH = 2M + /* Align r/w data to the 2nd 2 MiB chunk. */ + DAT (rw) : ORIGIN = (1 << 30) + 2M, LENGTH = 2M +} + +SECTIONS { .text : { *(.text) - } - .rodata : { *(.rodata) - } - /* align r/w section to next 2mb */ - . = ALIGN(1 << 21); + } >TXT .data : { *(.data) - } - .bss : { *(.bss) - } + } >DAT /DISCARD/ : { *(.ARM.attributes) }