From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.30417.1680194051779011600 for ; Thu, 30 Mar 2023 09:34:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HKcJvTPR; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 098C3B8275D for ; Thu, 30 Mar 2023 16:34:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAA86C433A0 for ; Thu, 30 Mar 2023 16:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680194047; bh=V9aYh+rq4dWUZWfJeCAE6bGTm952XviEHW81RyDimnY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HKcJvTPRqQOVxhYy5XnaOCNsJqKpgq9xcwB6jDs3R2Hd4727mguJ45/0fFPIJTotM wJ1zO4ezbtAS2MdLP5qiFm5ykE/fId6W+3LGJFatu6jZ4bk3zr2Da/6VmP/uzpHSG8 t7jjZ9aCw3+JgYodxJLrof5W8dBiGazfTROTQh/GlbbgPV8puGELBRV5Y5Fum4Xlgm NQh0R/8wOssRgG5Rqs+IRqp8BaRzxPn2n/5OcuiTP90nDqGEgYWUoMOuH6r1iKivuC HqF+k7MLpFpJBIbirn1zetn3GKT/801wI//2hSkOfWHeVrK17kf1nOy+LgHptWZhWu iUioj3AxYwdPw== Received: by mail-lj1-f182.google.com with SMTP id by14so1049025ljb.12 for ; Thu, 30 Mar 2023 09:34:07 -0700 (PDT) X-Gm-Message-State: AAQBX9fT811CwgyTSq6IKDzWPC4LPaL2hdewgtqihey7m3fmXKyC0oac UYvEMuxQaCWpBRhh/xy9W9fZ/nBSQfHNKt0lKxY= X-Google-Smtp-Source: AKy350bUey8vLTOA+tJH0ZZ40O4IcKnUEXZLfbtk/jpeGwMsfKwA/oLHyDTrU+4tpNZSmL5O42uja9ISCZcIKnfe0gI= X-Received: by 2002:a2e:8782:0:b0:299:9de5:2f05 with SMTP id n2-20020a2e8782000000b002999de52f05mr7222836lji.2.1680194045718; Thu, 30 Mar 2023 09:34:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 30 Mar 2023 18:33:54 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] Is Xcode5ExceptionHandlerAsm.nasm still needed? To: "Ni, Ray" Cc: "devel@edk2.groups.io" , Rebecca Cran , Andrew Fish , "Kinney, Michael D" , "Liu, Zhiguang" Content-Type: text/plain; charset="UTF-8" On Thu, 30 Mar 2023 at 17:04, Ard Biesheuvel wrote: > > On Thu, 30 Mar 2023 at 16:25, Ni, Ray wrote: > > > > I am afraid they are not template code. > > That means if nx is set for data section, they can not be executed. > > > > Currently, we fix up the entries by writing to the .text section at > runtime, so NX seems out of scope in any case. > > Someone should check Xcode5, but for LLD, adding -Wl,-z,notext is > sufficient to work around the error. As far as I could figure out, '-read_only_relocs suppress' does the same thing as '-z notext' on the GNU linker, and permits the code to be built with the absolute relocations in the .text section. AFAICT, this means we don't need the runtime fixups, nor do we need to move that code out of .text i'll respin the series I sent out earlier today with that if I manage to build a working OVMF.fd with XCODE5