From nobody Tue Apr 23 12:41:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass(p=reject dis=none) header.from=seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1657676148; cv=none; d=zohomail.com; s=zohoarc; b=ZiGOlrApzKwv2SrQtkSI5e8YuiyiPVrYB1KmPa8xL87BAzV+zU7v4xKASgMp8FL5zFPrzBleDqULSowIid5KzgtEVouus+mN7DyV91ZyxaqH4MsRYR00mj5dIBksKs8sJSyyhnIKNTM5qBN5LjRZMt0OSUQqi6N3VbYhMN3X+hk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657676148; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=J7Ert4iX0iYO/kOx9kweT2RPNA3DRREIXKwpOJxkcBo=; b=f/pGO4PyvNM42q1puntlnPI4YotNYl5FXwzs9rRQmMQi4ayZ4AaEm1OXH13P4AQQ3DdHRLFalFptM0lJxuzAf9zLlOpb4KPxd4/p7EdiPjIIW/GTxTvMxoXStMy18PYXoHKzJkpUVMSUCMxfE1/TSLXF7GSlZwIhMq7GthfIyuI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1657676148163552.121389483391; Tue, 12 Jul 2022 18:35:48 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 5B2202D9BF; Wed, 13 Jul 2022 01:35:44 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 26AD12D696 for ; Wed, 13 Jul 2022 01:35:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Tue, 12 Jul 2022 18:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seabios.org; s=dkim; t=1657676145; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-owner: list-unsubscribe:list-subscribe:list-post; bh=J7Ert4iX0iYO/kOx9kweT2RPNA3DRREIXKwpOJxkcBo=; b=kqx10Z8gwRt1hG6LX0xcrL6Pkp1HhM9cwZAK0Roc3WsqfMPd3y7WZekfugV9USHBRz2Rci RQN/Jjg/aUEanEeDok1U7g7OEkmBQ0nzKehrlti82JjzBLaqhfur9Bopm1pMIUcEvKbrwa KEJfK4TIozdeMZ5ot+8AuTYqlhP/RHY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=UTVpE9Cm1AhiCfIj0fXCwQrV/I3COIW2H346vSDDxas=; b=L+hOotpPNsP7h47R4TvZ9bdRNG+HVcqaVc6ngA+axER3ahkE9YxCVQ6ku9WLXKfIPo eTo6cL2d0kR1+fC2+QdQPWTwDgk//MuOii9KHCaoC3rMupe35yznoPiGXHB3RC98Cuq3 9BzuSa7TGYGa8BP5GX4egy8xL2esqRJYnBYoSlXvzUDDLYp5Gw/ejm2FspxY/P8V1GK9 9KsNx0s8lIZ3AlYlyETcbgjc5WVSynkmGlondYnOWRLlQplYtN9i1QwkjXCrWlaTv6Be gcTrzgJn3oN5GpjaCIHqvDT/DLAFn7c4y17Fj+FflcgsT2UParlVkFn6fcXqRjl4ypmx Fsyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=UTVpE9Cm1AhiCfIj0fXCwQrV/I3COIW2H346vSDDxas=; b=T60qkxRUFj060O5H+65hYVhopMDD9rTCtu27rB+C22QxW6pEQDxZXPzjKIsIvZkScd 8Ebm/+RK4hRxU71hHJ9FlQ0ITQOtxl7oBCBpSAUSIR7jRCs3E848leT7h7Wt4p6mBGB+ IGBhoLQC0UVe4HoJks7pC+3AxoDsZo/weSM26KCPlexbhunnUgk2Q0t19AT6WF72HI/4 UPEqud1kEFjjb+o/Yd69Xhtr9cMg068e98xbgTY0mA6qB/DnF3+BoWRz/Zijgm/TMs+m upauPoFi6dt/BvH8+orUu3amVIzSAIvMOyBhPaUdzJnLB2MPizXvMwfXgwXHBqOt4/cn hSlQ== X-Gm-Message-State: AJIora/w+VZ4Y3rIFtW+GnS4p6T0gd41YxPAZiz9ZOdbsTYOVndfYiVl eZOqJ02hoEvHlxHoKdoENYsjuZnCLiwGEz8VSzTTxTaY4AeKYwv13/1QGYoL7gQcm1VATgMMUno p0hIqKR+TR/HGpCsY96Wq/aVCwgIasjAP8CAah0akeya6Qv/Os9d47csrSpj4 X-Google-Smtp-Source: AGRyM1ufJjVU0KpZWN3bmIPcf1CONbQAzqd5r58znO8T6grArwZAL6QaToVd2vjETSHiTChJmttwQgKRjDFX X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:200:2d73:f468:8288:85ec]) (user=maskray job=sendgmr) by 2002:a05:6902:1083:b0:66f:193f:edf with SMTP id v3-20020a056902108300b0066f193f0edfmr1253979ybu.281.1657676114972; Tue, 12 Jul 2022 18:35:14 -0700 (PDT) Date: Tue, 12 Jul 2022 18:35:05 -0700 In-Reply-To: <20220713013508.3428114-1-maskray@google.com> Message-Id: <20220713013508.3428114-2-maskray@google.com> Mime-Version: 1.0 References: <20220713013508.3428114-1-maskray@google.com> To: seabios@seabios.org, Brad Smith Message-ID-Hash: 2G6ZWCUSEIQLEVWZSYVZ6HMUWEV4KWIX X-Message-ID-Hash: 2G6ZWCUSEIQLEVWZSYVZ6HMUWEV4KWIX X-MailFrom: 3UiHOYgcKB-kXLdVcLjRZZRWP.NZXdPLMTZddPLMTZd.ZcR@flex--maskray.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fangrui Song X-Mailman-Version: 3.3.5rc1 Precedence: list Subject: [SeaBIOS] [PATCH v4 1/4] romlayout.S: Add missing SHF_ALLOC flag to .fixedaddr.\addr List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fangrui Song via SeaBIOS Reply-To: Fangrui Song Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZohoMail-DKIM: pass (identity @seabios.org) X-ZM-MESSAGEID: 1657676149318100001 Content-Type: text/plain; charset="utf-8" It does not make sense to reference a SHF_ALLOC section from a non-SHF_ALLOC section via R_386_PC16. Conceptually, even if a non-SHF_ALLOC is loaded as part of the memory image, the distance between it and a SHF_ALLOC section may not be a constant, so the linker cannot reasonably resolve the relocation. GNU ld allows it but lld will warn. Add the SHF_ALLOC flag. Signed-off-by: Fangrui Song --- src/romlayout.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/romlayout.S b/src/romlayout.S index c4a4635..a854783 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -587,7 +587,7 @@ entry_18: =20 // Specify a location in the fixed part of bios area. .macro ORG addr - .section .fixedaddr.\addr + .section .fixedaddr.\addr,"a" .endm =20 ORG 0xe05b --=20 2.37.0.144.g8ac04bfd2-goog _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Tue Apr 23 12:41:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass(p=reject dis=none) header.from=seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1657676161; cv=none; d=zohomail.com; s=zohoarc; b=AcPvRZ1f6g4xBCtyvx3AiuyKH5g35I2h0MXMYzMHkleZUnM0ir2Vq2f7ffaiSGzK+egtcQj6ZFjp8aKOy5oDcT0xado0+XKwDB+uBBUrutPh9apC/SJN+B16aIYSwpIQ4xqKa3WV1HqWy870oz1SpyDMhOdohXdfSOh5P6zT6R8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657676161; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=AfrZJNxbGUtggMkoIrt0prd4+hpzQKZTPHkuiSX5xVU=; b=F7jfxYH1URdMmsMlRJtJOBs0e88W29ViThsfIPVJoBOjNMLTCSBwsKL7ubNmfTYfVYNbLPvJebV4STQl132QORYy+7zPRY/5iKng0F9LYyyAdD+C0tHTCqj+JZqAMS5sc6PrI3wIGaPmKp36Njexuoca0uSJjxexP9sKlSLft64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1657676161500577.1829716851295; Tue, 12 Jul 2022 18:36:01 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 930AD2D9DE; Wed, 13 Jul 2022 01:35:56 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id BF3082D860 for ; Wed, 13 Jul 2022 01:35:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Tue, 12 Jul 2022 18:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seabios.org; s=dkim; t=1657676157; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-owner: list-unsubscribe:list-subscribe:list-post; bh=AfrZJNxbGUtggMkoIrt0prd4+hpzQKZTPHkuiSX5xVU=; b=qWRY6RfHjyVIywm0JMDIElsQ24tiub3QioXTbA3U5HCkrQBf6lN1QCoEFEiaqNecBNJUWw qUc8AY6M2xqsEHliF4uoaBfsEQypqxTJkKJ1tNQUTJoSOFvOfTnelM/7JSECjh7MoWuZ0R PsSlasrjDumzxDaXIYtVELgfH6r329w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=RF1UaKytpXcdJEEPQr8mczkIEP9xoB0VJMN/FFKpd5M=; b=lfnUqadSHumAsN3gnupiOvyUBGNwkLm4/wAaHkvQHxeTOhQAuC326dH6P2yWwM2I85 0XRTfT5viudmWj4rZ0YZPS78Ov4ahWD3+CKwsmZ0JoxLp+o8hZ1kIvGjzcbab/lZTdyY czMPYA9XLrYh//pKu4HTbGmvZyYGJE1R+73MpUrx+jpmUZ43qVi9w0qDmEevfTa7i2/9 Y27TTkeQqatI5ufCsRGQ2tMwusXmdpu/fOJhfrbeaVj8mH4DedTfwPVGO9yOdNswRSY/ kvnG63esIKDa+Gpepr1pfmxf5iUa6OCdxcQmSYsxsGojO6lUTbf0A797VkUueo35cc0H 8HaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=RF1UaKytpXcdJEEPQr8mczkIEP9xoB0VJMN/FFKpd5M=; b=3jLRapxORoJzZfrWWEIRfqVMgoDJt+bbAv/Pf3BbYu6ewZmT85hrQMAcz6hT7enMyq pv54enkPSOyMRq6zOwZl9hwhnNzI8e8giNqb2tmCiHesgJPVfGa2zo8PLg6ALdXfBahP G2KmiX0VDpmoV+a7DE2ka3pVkANSF3mxOhbJ5wiYzk27oQqgwrX866ui/DNbDNTGop+N +2+81o9T2FfF/ubMk5uKuA3V04jKHhCJf85jEEcZKhLR72XXORlRtqKCmcaOcbzOm7Tr QPSZsXhGC0gef+hP3C33gmSpfVu7eDrPpdV9MJkcKguHKviUNSrMibMtS7MprJ6Wyhs+ aPzA== X-Gm-Message-State: AJIora+BixE4Zh5V0lsrnCchAjeXNEqNihcxJgckEfmi5hf63K2pLZgU 614IHogxwYIvYGRL3fAtJF7lDvqV7U9kOGotPquwozAa7MD0FCHiyG29nHyNpStj8CD53qzpvEI cWFjPS7zW5o8jIJGPXbgxbqIKXB9BS+hJSLuk5Cmb9luU+ivV26WCyWJEZ0SZ X-Google-Smtp-Source: AGRyM1siXvMEZQKbCOs8LsYO4AK4akeRxQL09IURjgxxNYHeC/ZhOhCnPSLxuknE7luTiEcL57YwxNY0ciHs X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:200:2d73:f468:8288:85ec]) (user=maskray job=sendgmr) by 2002:a17:90a:249:b0:1e0:a8a3:3c6c with SMTP id t9-20020a17090a024900b001e0a8a33c6cmr213842pje.0.1657676117399; Tue, 12 Jul 2022 18:35:17 -0700 (PDT) Date: Tue, 12 Jul 2022 18:35:06 -0700 In-Reply-To: <20220713013508.3428114-1-maskray@google.com> Message-Id: <20220713013508.3428114-3-maskray@google.com> Mime-Version: 1.0 References: <20220713013508.3428114-1-maskray@google.com> To: seabios@seabios.org, Brad Smith Message-ID-Hash: XLHPEI2D5XU52QFKDKIQG3OXBF4M5A5I X-Message-ID-Hash: XLHPEI2D5XU52QFKDKIQG3OXBF4M5A5I X-MailFrom: 3VSHOYgcKB-waOgYfOmUccUZS.QcagSOPWcggSOPWcg.cfU@flex--maskray.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fangrui Song X-Mailman-Version: 3.3.5rc1 Precedence: list Subject: [SeaBIOS] [PATCH v4 2/4] Make rom16.o linkable with lld List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fangrui Song via SeaBIOS Reply-To: Fangrui Song Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ----- X-ZohoMail-DKIM: pass (identity @seabios.org) X-ZM-MESSAGEID: 1657676163360100001 Content-Type: text/plain; charset="utf-8" lld requires output section descriptions to be sorted by address. Just sort the addresses beforehand. -- Changes v2 -> v3 * Sort sections by finalloc unconditionally Signed-off-by: Fangrui Song --- scripts/layoutrom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py index abebf02..fa270ef 100755 --- a/scripts/layoutrom.py +++ b/scripts/layoutrom.py @@ -321,6 +321,7 @@ def outXRefs(sections, useseg=3D0, exportsyms=3D[], for= cedelta=3D0): =20 # Write LD script includes for the given sections def outSections(sections, useseg=3D0): + sections =3D sorted(sections, key=3Dlambda x: x.finalloc) out =3D "" for section in sections: loc =3D section.finalloc --=20 2.37.0.144.g8ac04bfd2-goog _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Tue Apr 23 12:41:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass(p=reject dis=none) header.from=seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1657676175; cv=none; d=zohomail.com; s=zohoarc; b=HSL1VXoMTqVTfXz9nBxkRRDrb2y7jeOzCAyf6TA2uq7LiAsY9Kw+dC9jSVu8Bnb1Vs580jrTT6helyndjvf+c8lYS8ygZnaJrD09uMTPXV7QfD4xnNjO67GhSCtfmteqByIIu5RwH16gEoRA0kOqJoIakOwEH7fsO2UCP0MF2rM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657676175; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=Z1RO+oM82zRVw3eSab5hyB2KokzltGPy8DJdJNRgoy4=; b=OqEkqpvghc6jU+Lw6mQyXamrT12fk3q9cf+6Fo5uybViPyQCQX9GebrztZxm/D1DdTBTubyaVC006vNNqWlvR35jZaJmHd6rDvAVdkf5AKKGL3um0wDnGZaueLRmmH6Yt/wYiFEIVE0eaDZxacXH2YOIoZLewQn0oJstuPv1khA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1657676175577757.340584054401; Tue, 12 Jul 2022 18:36:15 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id A80AB2DE6F; Wed, 13 Jul 2022 01:36:10 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 607612D860 for ; Wed, 13 Jul 2022 01:35:21 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Tue, 12 Jul 2022 18:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seabios.org; s=dkim; t=1657676172; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-owner: list-unsubscribe:list-subscribe:list-post; bh=Z1RO+oM82zRVw3eSab5hyB2KokzltGPy8DJdJNRgoy4=; b=0UCKw3XARD9tsXYF8jYC8JlegFuppJmn/oCmlMhcuGK4Nmo1l++pBlecsGY6L0YD1lMZfG VKOXBioEDF4NgXdKaSbSmJsO6ZWmzy5X3PwEMBCe1oLPXclajH3LHbY1Vag2+2/75AQlp9 +rHVJG0r9mYmsVWDygfPVDfQPTDZ8u0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=8G+gdTloox5jqF0b0baw/43t3B3oVNSWdmHAvvxtLbI=; b=Jy+Lv829WZWPJtNqsOPpGcr8k0ivFRKTQCMaJmLmI0xgYr4IFDz7F+jzq0XNdP4BwI dBzbIItTSwJ1Td9TV9ZBc84U5Tbd39KsE41t1F7Ycndf6e8xyV06HtXAC0bhlM6cx/5f O5pkStekDnfjATJ6gJ08cXnGuXrRF5eFPMTKaYHITK1gQTHmumP/h4y3xrMHXiDQQtdj hnmJt9kb3B8E80/DkXQfsZ6f5ZGkIRGVb7xbSfRB3ox26uGqdWU5B5vQKoM65M40LCGO 1wolkXs6RV9oKzv1EOiiiXJSlY9R67fgfDGehQXsdt3eq46U7m/2ZPFYfRmo+N+XI3JA sWRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=8G+gdTloox5jqF0b0baw/43t3B3oVNSWdmHAvvxtLbI=; b=uwzz7NMbpaU98qfQe+C90eh2qqU+KTMjv/TCwHXHt5ugMCXVSgVNNFerNiyaPVCeUM p+XWq0zT6NoglxalZjzfVD6xv7ZFUrIp9NtjQUNdKjXFmWZIMYcmeJB2KIxCv62fw+Dp 0GtIM1iVeGFjpS4aeTzZiVlJ55v8j8/SGWXd4hmIK8LPMa3C2GvWkz50T8M8Ys3OTN83 O6bu25CvRDneSQYDNrJc79prMEPskcE2ypD9DmtRx6ws4RKlg6tUkGyv73CZvffNqA7W lGGh5wQHjIuOI4/B3LnmzqZw0FkBcVsHOM0eYg6W9rGITdxhsSKMEUXwxFoYdHgFGHmA dfFA== X-Gm-Message-State: AJIora/gQh5oIoeIIUrMygVntWPGqvGUwRbknTaDYlUYb6fF0Fo/15av o958TCgfz7Q1RT9oPitciZegRQ69i0l1w7AQyT7xYocHGp6qTY+3tEglPKGiSFE+cCKJNk8LD9j GhPv6RhiXRSE9Ki9b6Wjd9VSCTbDyGF90QVtDs4w1VFqCA16xPEZvsY4mr4kn X-Google-Smtp-Source: AGRyM1vZ8SlYndcc+73vesxIGTYL9U0Dj1vwAerWmt0CZOP7Hzr36SH9icfsJYsW2bMuLCyAHr6eQ+z651yW X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:200:2d73:f468:8288:85ec]) (user=maskray job=sendgmr) by 2002:a25:bdc6:0:b0:66e:3b23:55f6 with SMTP id g6-20020a25bdc6000000b0066e3b2355f6mr1323025ybk.230.1657676120207; Tue, 12 Jul 2022 18:35:20 -0700 (PDT) Date: Tue, 12 Jul 2022 18:35:07 -0700 In-Reply-To: <20220713013508.3428114-1-maskray@google.com> Message-Id: <20220713013508.3428114-4-maskray@google.com> Mime-Version: 1.0 References: <20220713013508.3428114-1-maskray@google.com> To: seabios@seabios.org, Brad Smith Message-ID-Hash: Y6JFLERA2ESQMISGB33BYG5JCBHPBAIB X-Message-ID-Hash: Y6JFLERA2ESQMISGB33BYG5JCBHPBAIB X-MailFrom: 3WCHOYgcKB-8dRjbiRpXffXcV.TfdjVRSZfjjVRSZfj.fiX@flex--maskray.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fangrui Song X-Mailman-Version: 3.3.5rc1 Precedence: list Subject: [SeaBIOS] [PATCH v4 3/4] romlayout32flag.lds: Use `. +=` instead of `. =` List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fangrui Song via SeaBIOS Reply-To: Fangrui Song Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZohoMail-DKIM: pass (identity @seabios.org) X-ZM-MESSAGEID: 1657676177640100001 Content-Type: text/plain; charset="utf-8" This improves the portability of the linker script and allows lld to link r= om.o Dot assignment inside an output section has an inconsistent behavior which makes lld difficult to implement. See https://bugs.llvm.org/show_bug.cgi?id=3D43083 Dropping `. =3D` turns out to be beneficial to older GNU ld as well because we can delete an ld check detecting "cannot move location counter backwards". Signed-off-by: Fangrui Song --- scripts/layoutrom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py index fa270ef..7bc4a57 100755 --- a/scripts/layoutrom.py +++ b/scripts/layoutrom.py @@ -336,14 +336,19 @@ def outRelSections(sections, startsym, useseg=3D0): if section.finalloc is not None] sections.sort(key=3Doperator.itemgetter(0)) out =3D "" + location =3D "_reloc_init_end" for addr, section in sections: loc =3D section.finalloc if useseg: loc =3D section.finalsegloc - out +=3D ". =3D ( 0x%x - %s ) ;\n" % (loc, startsym) + if location =3D=3D "_reloc_init_end": + out +=3D ". +=3D 0x%x - %s ;\n" % (loc, location) + elif location < loc: + out +=3D ". +=3D 0x%x ;\n" % (loc-location,) if section.name in ('.rodata.str1.1', '.rodata'): out +=3D "_rodata%s =3D . ;\n" % (section.fileid,) out +=3D "*%s.*(%s)\n" % (section.fileid, section.name) + location =3D loc + section.size return out =20 # Build linker script output for a list of relocations. --=20 2.37.0.144.g8ac04bfd2-goog _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Tue Apr 23 12:41:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass(p=reject dis=none) header.from=seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1657676189; cv=none; d=zohomail.com; s=zohoarc; b=X6+tyfZQ7fimKFAScebRNnPb9scqpSIOubDsFhR4E4uIGT7uzTEQv5QzB55SqJpMKNtBYQeXiCIJXd6ZgIJUVmfFLQIvXbxf5kOlcKgbJujfSnXbH9t8b1QegESv9qI78doq5++Q+NhGETIlJuFOEITrNOOd4t7hCBCTAp1OKu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657676189; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=nquSVqh7wIs1grE2LXdKcDBMTOJA8h1hAQSU6fcrOwM=; b=LoTehiYaBV6BbbRMmDvfxldZz5LsooHKYQ2d4/ofwS6xk9CKcgW0m9o1i/+agvhvLtsafXdDBUmA+bRDhayqt8ADvOxcJwXCMqBBeljvCsEs3JtEvle1kQWCJHrGkWjmU+gIOlWVHYMJy3P797Y4ApJMLkc2ClSUUwVwSsA1oxA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1657676189936879.3544525945516; Tue, 12 Jul 2022 18:36:29 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 1302C2D9AE; Wed, 13 Jul 2022 01:36:25 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 9A9E12D860 for ; Wed, 13 Jul 2022 01:35:23 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Tue, 12 Jul 2022 18:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seabios.org; s=dkim; t=1657676187; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-owner: list-unsubscribe:list-subscribe:list-post; bh=nquSVqh7wIs1grE2LXdKcDBMTOJA8h1hAQSU6fcrOwM=; b=EXErHxpDY5y1zir/O1EUX9gjQV1PQ7zbHrQpWK6TE25bARogD83LFfmiDigIw82bFWpP5v lBZsE3GInoFJ2M7OPQWe7qOOaX2rpv9u52xJMZB3lnKmv0cOkLtXRxthKqIi7Roz1FYy+a e6AXQt1Rvt2Kp7UC/N4P+YYO3NxVsqc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Hs+wdBBIIVqxrBHkmtZ+IlYsNq/BDsziJjt4G0zlXeU=; b=QoZCViqXNaoh+bcPHReXyWn5+INl+zS0O4RnIjvcgQkvWUdIhbqTRU5FfQWuFphUsA lY0VQaWNsDVxUQAtd7Wmsvj/c7WUl7c4bS2AhGMaV3iC3SnE8Dm3qPyaeSAOEw+Oy3xZ GhHKkHX9AaEeW2X3ejcDj1Y8yodE5A/rEtlowpoQ03V6SauszZ5l81DXV0TmMzBzBnqJ z7N7AY5VhPg4O7oB2dkJ6nJhXHph+huav9YLv3H5W4tD9LMfA3X3zDg07EPvlaHHVuVi b4N7MD5AaqFUwKgPZ6cwjKaUYN3MmLoFVFAuFFnrjkZ4UODXa3NyZvYYdDuIcfWUBo9g 85Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Hs+wdBBIIVqxrBHkmtZ+IlYsNq/BDsziJjt4G0zlXeU=; b=Hriwa9rrlGSAbDPsIqfaxz3SsfcGKwJ6LpLqLcstCV1BddhPfyP0LZHb9t9iPy8QN/ xoA9okwMt/n1xEq3EPRNrvsDYS/nkk/UBuOY/pe/o8Rjh61KBvIb+vlksgQpQf7nU3fW Ye+AT1Ls6daKliC87HIlFAETxjNf0o7VHX49v1NseNI2SZESKUVcNeGmpDwOT/CAZig4 mJYgYSeVNKCaczmJL1LHb+X8fPASLTS2OfbuU1xYPR5zeYzoHoHtP7bT19CkC9+eOia8 5SNsqLUfSLMekBgclKIv45fTnBrxJNXMyrQQDif/RU109WFrLtb3RxkE+Pt7WWnSz2lj 8Bxg== X-Gm-Message-State: AJIora9yS2Q+1KQoS3a8Qw6x6Kk6wXz9Zg7GpeRgjPB0BT8WE4VDIVW4 n6Z+yyyoHPSch/IEyOq1jPmpXb/VUDq/NFWmZYvxAdMlWhF0Jcckt2QMyB9Fw2RYgXRtkF71i0h 4YXfLg1uz2SVLJYKGGfk+Pq1mFV2A0ueCvEYIp61845gPyPlSyNHxz1Mf+bG9 X-Google-Smtp-Source: AGRyM1sfn+xlG9siS+HSGz+qqTsekbGPIgPM5huqyDMqTqtPQWGJ0BnfdqzNoKqFEGZannJtmZSdY5El0+No X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:200:2d73:f468:8288:85ec]) (user=maskray job=sendgmr) by 2002:a25:cdc7:0:b0:66f:601f:5296 with SMTP id d190-20020a25cdc7000000b0066f601f5296mr1369484ybf.170.1657676122445; Tue, 12 Jul 2022 18:35:22 -0700 (PDT) Date: Tue, 12 Jul 2022 18:35:08 -0700 In-Reply-To: <20220713013508.3428114-1-maskray@google.com> Message-Id: <20220713013508.3428114-5-maskray@google.com> Mime-Version: 1.0 References: <20220713013508.3428114-1-maskray@google.com> To: seabios@seabios.org, Brad Smith Message-ID-Hash: BTT6MMNNKVEL7F4SDSEMKKLR55SULTPT X-Message-ID-Hash: BTT6MMNNKVEL7F4SDSEMKKLR55SULTPT X-MailFrom: 3WiHOYgcKB_EfTldkTrZhhZeX.VhflXTUbhllXTUbhl.hkZ@flex--maskray.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fangrui Song X-Mailman-Version: 3.3.5rc1 Precedence: list Subject: [SeaBIOS] [PATCH v4 4/4] test-build.sh: Delete unneeded LD capability test List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fangrui Song via SeaBIOS Reply-To: Fangrui Song Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZohoMail-DKIM: pass (identity @seabios.org) X-ZM-MESSAGEID: 1657676191520100001 Content-Type: text/plain; charset="utf-8" The previous commit changed romlayout32flag.lds to use `. +=3D ` instead of `. =3D`. We no longer need the LD capability test checking https://sourceware.org/bugzilla/show_bug.cgi?id=3D12726 Signed-off-by: Fangrui Song --- scripts/test-build.sh | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/scripts/test-build.sh b/scripts/test-build.sh index 25cc2f2..8b35d6f 100755 --- a/scripts/test-build.sh +++ b/scripts/test-build.sh @@ -4,50 +4,10 @@ mkdir -p ${OUT} TMPFILE1=3D${OUT}/tmp_testcompile1.c TMPFILE1o=3D${OUT}/tmp_testcompile1.o -TMPFILE1_ld=3D${OUT}/tmp_testcompile1.lds TMPFILE2=3D${OUT}/tmp_testcompile2.c TMPFILE2o=3D${OUT}/tmp_testcompile2.o TMPFILE3o=3D${OUT}/tmp_testcompile3.o =20 -# Test if ld's alignment handling is correct. This is a known problem -# with the linker that ships with Ubuntu 11.04. -cat - > $TMPFILE1 < $TMPFILE1_ld < /dev/null 2>&1 -if [ $? -ne 0 ]; then - echo "Unable to execute the C compiler ($CC)." >&2 - echo "" >&2 - echo "Please install a working compiler and retry." >&2 - echo -1 - exit 0 -fi -$LD -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null 2>&1 -if [ $? -ne 0 ]; then - echo "The version of LD on this system ($LD) does not properly handle"= >&2 - echo "alignments. As a result, this project can not be built." >&2 - echo "" >&2 - echo "The problem may be the result of this LD bug report:" >&2 - echo " http://sourceware.org/bugzilla/show_bug.cgi?id=3D12726" >&2 - echo "" >&2 - echo "Please update to a working version of binutils and retry." >&2 - echo -1 - exit 0 -fi - # Test for "-fwhole-program". Older versions of gcc (pre v4.1) don't # support the whole-program optimization - detect that. $CC -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1 @@ -87,4 +47,4 @@ echo 0 # "ebp" register is clobberred in an "asm" statement. The code has # been modified to not clobber "ebp" - no test is available yet. =20 -rm -f $TMPFILE1 $TMPFILE1o $TMPFILE1_ld $TMPFILE2 $TMPFILE2o $TMPFILE3o +rm -f $TMPFILE1 $TMPFILE1o $TMPFILE2 $TMPFILE2o $TMPFILE3o --=20 2.37.0.144.g8ac04bfd2-goog _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org