public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm via groups.io" <leif.lindholm=oss.qualcomm.com@groups.io>
To: devel@edk2.groups.io, osde@linux.microsoft.com
Cc: kraxel@redhat.com, Leif Lindholm <quic_llindhol@quicinc.com>
Subject: Re: [edk2-devel] MicrovmX64, "Did not find any '.text' section"
Date: Wed, 6 Nov 2024 11:41:10 +0000	[thread overview]
Message-ID: <CAD=n3R17qXMB2W09xkku+gL3rQX7rzE8oeRxbW588VbDcaBsNg@mail.gmail.com> (raw)
In-Reply-To: <1e5bc28e-380c-49d2-b431-88c20b0e8568@linux.microsoft.com>

Hi Oliver, Gerd,

On Mon, 4 Nov 2024 at 21:17, Oliver Smith-Denny
<osde@linux.microsoft.com> wrote:
> >> While working on the FdtLib migration to the submodule variant, I decided to
> >> at least try to test build MicrovmX64 ... but I'm failing.
> >>
> >> Both clang and gcc builds bail out at a GenFw invocation to generate
> >> ResetVector.efi due to "Did not find any '.text' section". (Assert on line
> >> 938 of Elf64Convert.c.)
>
> So I was hitting this also when doing dynamic stack cookies and trying
> different ways to make ResetVector be okay being linked to the
> null stack cookie lib. There is something that BaseTools doesn't do well
> when ResetVector is linked against libraries, are you adding a library
> linkage here (say a NULL lib applied globally)?

No, I mean I'm building current edk2 HEAD unmodified, with current
in-tree BaseTools.
With GCC 14.2.0 using GCC profile, and clang 16.0.2 using CLANGDWARF profile.
(On Debian "testing".)

> To fix this for stack cookies, my PR converts ResetVector to be
> USER_DEFINED so that BaseTools will not link NULL libs against it.
>
> Worth a shot seeing if making that change (you need to change the
> RESETVECTOR rule in the FDF from SEC to USER_DEFINED also) makes
> a difference. If this is not being caused by a null library
> linkage, then I have no idea what is happening :).

I can confirm the above workaround fixes the build for both toolchain profiles.
Thanks a lot, that means I can get back to verifying my actual changes :)

Best Regards,

Leif


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120739): https://edk2.groups.io/g/devel/message/120739
Mute This Topic: https://groups.io/mt/108931674/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-11-06 11:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 15:52 [edk2-devel] MicrovmX64, "Did not find any '.text' section" Leif Lindholm
2024-11-01  9:55 ` Gerd Hoffmann
2024-11-04 21:17   ` Oliver Smith-Denny
2024-11-06 11:41     ` Leif Lindholm via groups.io [this message]
2024-11-06 16:32       ` Oliver Smith-Denny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=n3R17qXMB2W09xkku+gL3rQX7rzE8oeRxbW588VbDcaBsNg@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox