public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] MicrovmX64, "Did not find any '.text' section"
@ 2024-10-10 15:52 Leif Lindholm
  2024-11-01  9:55 ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2024-10-10 15:52 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Gerd Hoffmann

Hi Gerd, others,

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.)
OvmfPkgX64 builds without issue.

Is there something I'm missing?
Can anyone else build MicrovmX64 on current HEAD?

/
     Leif



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120615): https://edk2.groups.io/g/devel/message/120615
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] MicrovmX64, "Did not find any '.text' section"
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2024-11-01  9:55 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: devel@edk2.groups.io

On Thu, Oct 10, 2024 at 04:52:48PM +0100, Leif Lindholm wrote:
> Hi Gerd, others,
> 
> 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.)
> OvmfPkgX64 builds without issue.
> 
> Is there something I'm missing?
> Can anyone else build MicrovmX64 on current HEAD?

Works for me (Fedora 40, gcc 14.2.1).
Using in-tree C BaseTools.

The microvm build creates an
Build/MicrovmX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/DEBUG/ResetVector.dll
file which had no .text section indeed.

The OvmfPkgX64 build doesn't even though both use the same
ResetVector.inf.  Hmm, not sure why, but it's probably related.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120700): https://edk2.groups.io/g/devel/message/120700
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] MicrovmX64, "Did not find any '.text' section"
  2024-11-01  9:55 ` Gerd Hoffmann
@ 2024-11-04 21:17   ` Oliver Smith-Denny
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Smith-Denny @ 2024-11-04 21:17 UTC (permalink / raw)
  To: devel, kraxel, Leif Lindholm

On 11/1/2024 2:55 AM, Gerd Hoffmann wrote:
> On Thu, Oct 10, 2024 at 04:52:48PM +0100, Leif Lindholm wrote:
>> Hi Gerd, others,
>>
>> 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)?

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 :).

Oliver




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120713): https://edk2.groups.io/g/devel/message/120713
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-04 21:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox