Skip to content
New issue

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

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

Already on GitHub? # to your account

edk2-libc: Remove use of weak symbols from StdLib to resolve conflict with /WHOLEARCHIVE when building SocketDxe (Bugzilla Bug 3572) #63

Open
tianocore-issues opened this issue Aug 18, 2021 · 2 comments

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 3572

Date: 2021-08-18T17:22:14+00:00
From: @mdkinney
To: @mdkinney
CC: @lgao4

Last updated: 2021-08-24T22:01:47+00:00

@tianocore-issues
Copy link
Author

Comment 16966

Date: 2021-08-18 17:22:14 +0000
From: @mdkinney

  • Industry Specification: ---
  • Release Observed: EDK II Master
  • Releases to Fix: EDK II Master
  • Target OS: ---
  • Bugzilla Assignee(s): @mdkinney

StdLib/EfiSocketLib in edk2-libc repo uses __attribute((weak)) for the
following symbols:

useefisocketlib.c:CONST EFI_GUID mEslIp4ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_GUID mEslIp6ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_GUID mEslTcp4ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_GUID mEslTcp6ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_GUID mEslUdp4ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_GUID mEslUdp6ServiceGuid attribute((weak)) = {
useefisocketlib.c:CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding attribute((weak)) = {
useefisocketlib.c:PFN_ESL_xSTRUCTOR mpfnEslConstructor attribute((weak)) = EslServiceNetworkConnect; ///< Constructor for EfiSocketLib
useefisocketlib.c:PFN_ESL_xSTRUCTOR mpfnEslDestructor attribute((weak)) = EslServiceNetworkDisconnect; ///< Destructor for EfiSocketLib

When this lib is linked against StdLib/SocketDxe multiple symbol errors
are generated from the use of the /WHOLEARCHIVE linker option.

weak symbol linking should no be used in edk2 repos, so this reason for
adding these needs to be investigated to produce a design change that
does not depend on weak symbols.

@tianocore-issues
Copy link
Author

Comment 17047

Date: 2021-08-24 22:01:47 +0000
From: @lgao4

Michael will check it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant