From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.30811.1680194865079848978 for ; Thu, 30 Mar 2023 09:47:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jfHu8kwV; spf=pass (domain: kernel.org, ip: 139.178.84.217, 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 dfw.source.kernel.org (Postfix) with ESMTPS id 7AB9162116 for ; Thu, 30 Mar 2023 16:47:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2FEDC433EF for ; Thu, 30 Mar 2023 16:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680194863; bh=zdTbYddYUl6PTdqkD4aa3KPE+373xojYbtqg8Jmbk0E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jfHu8kwVhj+gOpSF3UrDT/apd7jQWq5KnnjufRxPPn27PLvQ0xDFbpL+goi7OEfGr BK+7PEz0MRqkGH7m8flWjpqt7n24pYItCvJKUdkjEttTj1eENSUV8jXchyjIIalMU5 afCUiJv+Ts1vp+IaHyTbWmSmrYDnD+wdk6m2dOLhRLmPVhXlm4+8ihiXpaGCXcxGkV AG05ypfoBZ48o5cG/f7GXbomacdCHXxlk26uhGVT5nuAPa3rJaaXICwGLK5/kW/3XG KyFcQKfPfPSnEGs5Kjs61ER9AyWHVkcE1MnWGPNmfW6h4oI+vNuPQRRLywuYgYOoBk 9jXxQMrOH0isw== Received: by mail-lf1-f50.google.com with SMTP id c29so25350729lfv.3 for ; Thu, 30 Mar 2023 09:47:43 -0700 (PDT) X-Gm-Message-State: AAQBX9fc3iYs0bD2Bcw41m2wi3112hdATZgRrQFn8rO91DMhRjJEMAUN Mbzi55WgexpLwA7GLhb3l60hnu51oiqiQaqcB4A= X-Google-Smtp-Source: AKy350bssHfJsfJvDswaGZRnQWuvPJv44SOxRmx3upKr2ZYZnPBfk9wxdzfs19YpaFV3sN+XHjSBS1eNTAy0eUki/og= X-Received: by 2002:ac2:46e4:0:b0:4e9:8c46:32ad with SMTP id q4-20020ac246e4000000b004e98c4632admr6914166lfo.9.1680194861963; Thu, 30 Mar 2023 09:47:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 30 Mar 2023 18:47:30 +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 18:33, Ard Biesheuvel wrote: > > 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 Hmm seems we are already using that for XCODE5.