From patchwork Wed Sep 11 06:46:44 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: 827354 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp657235wrc; Tue, 10 Sep 2024 23:47:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5KNt8v30nx0z18TXDw8z52MLQ7BK6zObuOAwTpRgKIUl/2kP35Zehozf4qfofrujmOlzzpw==@linaro.org X-Google-Smtp-Source: AGHT+IHmKsXnqZInOqLl2tUyM7N32KerjG2cTmLPE5uqhO1uR2NqwohyMmsb0z2nFuE5jRhmyGW8 X-Received: by 2002:a05:620a:4593:b0:7a8:e4f:1efc with SMTP id af79cd13be357-7a9d3a167e4mr333741185a.7.1726037278425; Tue, 10 Sep 2024 23:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726037278; cv=none; d=google.com; s=arc-20240605; b=K7xVpZ7kN5ebM4HolG1wyIW+fNndINaoKlHtcdtftORMlxmWcWvQcOZZLIuFTBhjaf E1Hqfh+YokCfh9lau1w5K5KjW4rsCFHTWYCAMyx/tXAUfM3PMhXoV1zzkZ/Da4o+z1c4 7zR+ft1866hOPk2iDpxhBCphYYvJ4Ghu2f2daiDMLBrxGC7Q+j+jg0O/65z0eJNAbUs3 3hR+4Kmq7c0Z4qDJKK3XMWWiB+yXf8bylS2DDlbOiGY0SFfUnEwP+vy9i7MS8NL+sL8k yao+gCgs7FP1k2vBYeqvsjXoovc6t694FcawLde231OgGbnzWCKgKe9JG0Xi+I0p/K4z GoOw== 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=vZtRldQU1q8wU6EHCfF9wA3KDcDHpctGTgp2Kf7weoU=; fh=xfU5kIjl2Hy9XQk8eUJ3Oo21BVV/QvNpVcSCGpm7R7s=; b=KLV1wZzlP5yHB04RDHvDqnwqtYIhopREyE9VC7hH2IXFj7CnpOFF3fNQGEM9YbNfAP YSk0zKQmqqMULpYjYv1hbGHKnEnRHXlLxPA82kFyNKM8e2b6ePaVRg2DzoADlQ1Ukmjm KzWetgpm4m7bYWCVydrLMDsApn0wJEbmIGR1iPQkN/jSIILQDtABYA7PD0fJ2bEkHbk2 BEAh9FZd5Tb/XuB9RkM25f1WRdLjhYdpUopMdgttJUyEnSdrcUA3sWQb0pkBuVCA34Y3 8R3/pxAeSkcXoM//WeHThP7bY4tMGy4Mjzvn+edAifZJfihGVlQlMNE6Tv+1heM5ICTC 4k2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xSPoO/tQ"; 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 af79cd13be357-7a9a7a55edesi998886885a.580.2024.09.10.23.47.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 23:47: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="xSPoO/tQ"; 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 1soH84-00018z-U7; Wed, 11 Sep 2024 02:47:04 -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 1soH81-0000uh-AI for qemu-devel@nongnu.org; Wed, 11 Sep 2024 02:47:01 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soH7x-0004QX-Ga for qemu-devel@nongnu.org; Wed, 11 Sep 2024 02:47:00 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5356aa9a0afso10839345e87.2 for ; Tue, 10 Sep 2024 23:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726037214; x=1726642014; 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=vZtRldQU1q8wU6EHCfF9wA3KDcDHpctGTgp2Kf7weoU=; b=xSPoO/tQID3jne5T7GE5MfM4ysFZc5fTIMBwfPaBgRXlrHEPWH4eXF/SPMsT1vroW/ bQ80/EUvQWUBdieGDC49tCV8Rjf3aQ+AtdPyPyDpzY3N13fyizBbBNCtqoDUlMSNCe0I Kc1E1F37/i4+O2dbd57w6rhaA2oz3E2YjBV+KDnZAcrPmEXVJhoLsEcXjtV9D2ZgR0Ad diPB3jiU1hCaJOMUZ+TrlLHpWDbYI9EsW5rGJ3zDOL6cDmuQnZYQs2jxJGmZFyjp46ES eCnbHyMo1nqTNYUJIIXHeqDa5r/THJuyge1J/pqlA5bsJ0vJz4feY6BSVh43fmPk9hWd XayQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726037214; x=1726642014; 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=vZtRldQU1q8wU6EHCfF9wA3KDcDHpctGTgp2Kf7weoU=; b=sstC51jHW/I9Pdrw7/QHK9QMy+IliEnG1NRWiOjN4Rn/5M847Z7yjlA0OSGs94duv4 QA3vSSU512L0tmUzGtCYk8vBL+wPp3NUteckMRV4jTD8ys7ZPJ2XSzJlYZi+xGek2wAp oT8ivqqB+0kzM2+2gK8V2wlESNb8YoiqvnQb9Qa2K9mkaDzriz0tMefOrJgXTmaQYvaW 3tpqixs28UQVhhadKt06ygIPUQI3BG4/LWazyuRcMWptVmcNUXYDfsgG4/WmlxoRZ5WH PjUsQldA2DSIr0kOOxvpnn7w+JLzHMaAa2tUryxwJwIOQRHg8zO8s8LR4p26wWsOWxkZ hScQ== X-Gm-Message-State: AOJu0YycDvx1BcoQypfR6V7N/l4ZbPF3CMVDY8I/AnI8fFaoaKEvAklm jFBI7HLERAgeYsYnvMADo7nVDV7rWPv5P+jfjl0y66xXZyivohkKaMZxjF7/EmMMavsmVBM1ssH nHfI= X-Received: by 2002:a05:6512:3d20:b0:52c:deb9:904b with SMTP id 2adb3069b0e04-536587f8770mr12981179e87.38.1726037213381; Tue, 10 Sep 2024 23:46:53 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d258354d1sm578640466b.13.2024.09.10.23.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 23:46:50 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DC1115FA1C; Wed, 11 Sep 2024 07:46:46 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 09/10] tests/tcg/aarch64: Improve linker script organization Date: Wed, 11 Sep 2024 07:46:44 +0100 Message-Id: <20240911064645.357592-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240911064645.357592-1-alex.bennee@linaro.org> References: <20240911064645.357592-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x133.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 Message-Id: <20240910173900.4154726-10-alex.bennee@linaro.org> 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) }