Roman,

Sorry for the top post, as my email client seems to have eating your email.

1) In C static scopes the visibility of the symbol from a compiler linker point 
of view, but the static and non-static globals are going to be stored in the 
same section of the image. On macOS clang the only difference is the static 
global does not also have a .globl assembly directive to make the label visible 
outside the scope of the module.

In general Runtime Drivers will gather data that is only available at boot time 
and store this data in globals, so you can't clear out part of the image on 
fix-up as that would break a lot of other stuff.

2) The corrrect answer would be to fixup any pointers needed at runtime via 
RuntimeCryptLibAddressChangeEvent(). On option would be to have an array of the 
addresses of the static variables and have RuntimeCryptLibAddressChangeEvent() 
walk that and fixup the Physical addresses to virtual addresses by calling 
EfiConvertPointer().

Thanks,

Andrew Fish

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44873): https://edk2.groups.io/g/devel/message/44873
Mute This Topic: https://groups.io/mt/32686575/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to