Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StandaloneMmPkg StandaloneMmCoreMemoryAllocationLib: Rename gMmst #10674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lzeng14
Copy link
Contributor

@lzeng14 lzeng14 commented Jan 25, 2025

StandaloneMmCoreMemoryAllocationLib.c and StandaloneMmServicesTableLib.c are both defining gMmst, StandaloneMmCoreMemoryAllocationLib will be linked to StandaloneMmCore directly, StandaloneMmServicesTableLib may be linked to StandaloneMmCore indirectly, when they are both linked to StandaloneMmCore, there will be "lld-link: error: duplicate symbol: gMmst" build error with Clang compiler.

gMmst is declared in MmServicesTableLib.h and its definition should be owned by MmServicesTableLib.

This patch renames gMmst in StandaloneMmCoreMemoryAllocationLib.c to mMemoryAllocationMmst to avoid this build error.

How This Was Tested

Local build pass with Clang compiler when StandaloneMmCoreMemoryAllocationLib and StandaloneMmServicesTableLib are both linked to StandaloneMmCore.

StandaloneMmCoreMemoryAllocationLib.c and StandaloneMmServicesTableLib.c
are both defining gMmst, StandaloneMmCoreMemoryAllocationLib will be
linked to StandaloneMmCore directly, StandaloneMmServicesTableLib may be
linked to StandaloneMmCore indirectly, when they are both linked to
StandaloneMmCore, there will be "lld-link: error: duplicate symbol: gMmst"
build error with Clang compiler.

gMmst is declared in MmServicesTableLib.h and its definition should be
owned by MmServicesTableLib.

This patch renames gMmst in StandaloneMmCoreMemoryAllocationLib.c to
mMemoryAllocationMmst to avoid this build error.

Signed-off-by: Star Zeng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant