Re: [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build


Marvin Häuser
 

Hey Ard,

Thanks for commenting!

On 14.10.21 11:09, Ard Biesheuvel wrote:
On Thu, 14 Oct 2021 at 11:08, Marvin Häuser <mhaeuser@posteo.de> wrote:
Hey Steven,

As I said, I prefer my patch, but this would work too of course.
I talked about the PIE stuff with Ard before, so maybe he has an opinion
on this? :)

(Small correction for my last e-mail, of course we are not *guaranteed*
there are *no* relocations in .text, but they'd all point to GOT (or
whatever else the target uses for PIE), and references will probably be
relative; for ARM architectures I remember Ard talking about specific
kinds of relocations being avoided entirely).
Hello all,

As I understand it, we are talking about a native PE/COFF toolchain
here that does not rely on GenFw for ELF to PE/COFF conversion, right?
Yep.

If so, there is no way the self-relocation is going to work anyway, so
whether we pass -fpie or not for AArch64 is immaterial here.
It's not quite, because with -fpie it errors (also maybe PE/COFF PIE will be supported some day?). We can also pass -fno-pie and have some other way to kill compilation for CLANGPDB ARM/AARCH64, but it must not just silently succeed when this is eventually supported.

Best regards,
Marvin




Join devel@edk2.groups.io to automatically receive all group messages.