]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Define the global variables as weak to enable the proper linking with applications...
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jun 2012 17:45:56 +0000 (17:45 +0000)
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jun 2012 17:45:56 +0000 (17:45 +0000)
Submitted-by: Oliver Martin
Reviewed-by: lpleahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13475 6f19259b-4bc3-4df7-8a09-765794883524

StdLib/EfiSocketLib/UseEfiSocketLib.c

index 6f4248b3d2c51ac0f38d22a6317271675089b9d3..e44a7204355cf0db2a26b4cdcec0e600118ec219 100644 (file)
@@ -23,7 +23,7 @@
   \r
   Tag GUID - IPv4 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslIp4ServiceGuid = {\r
+CONST EFI_GUID mEslIp4ServiceGuid __attribute__((weak)) = {\r
   0x9c756011, 0x5d44, 0x4ee0, { 0xbc, 0xe7, 0xc3, 0x82, 0x18, 0xfe, 0x39, 0x8d }\r
 };\r
 \r
@@ -31,7 +31,7 @@ CONST EFI_GUID mEslIp4ServiceGuid = {
 /**\r
   Tag GUID - IPv6 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslIp6ServiceGuid = {\r
+CONST EFI_GUID mEslIp6ServiceGuid __attribute__((weak)) = {\r
   0xc51b2761, 0xc476, 0x45fe, { 0xbe, 0x61, 0xba, 0x4b, 0xcc, 0x32, 0xf2, 0x34 }\r
 };\r
 \r
@@ -39,7 +39,7 @@ CONST EFI_GUID mEslIp6ServiceGuid = {
 /**\r
   Tag GUID - TCPv4 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslTcp4ServiceGuid = {\r
+CONST EFI_GUID mEslTcp4ServiceGuid __attribute__((weak)) = {\r
   0xffc659c2, 0x4ef2, 0x4532, { 0xb8, 0x75, 0xcd, 0x9a, 0xa4, 0x27, 0x4c, 0xde }\r
 };\r
 \r
@@ -47,7 +47,7 @@ CONST EFI_GUID mEslTcp4ServiceGuid = {
 /**\r
   Tag GUID - TCPv6 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslTcp6ServiceGuid = {\r
+CONST EFI_GUID mEslTcp6ServiceGuid __attribute__((weak)) = {\r
   0x279858a4, 0x4e9e, 0x4e53, { 0x93, 0x22, 0xf2, 0x54, 0xe0, 0x7e, 0xef, 0xd4 }\r
 };\r
 \r
@@ -55,7 +55,7 @@ CONST EFI_GUID mEslTcp6ServiceGuid = {
 /**\r
   Tag GUID - UDPv4 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslUdp4ServiceGuid = {\r
+CONST EFI_GUID mEslUdp4ServiceGuid __attribute__((weak)) = {\r
   0x44e03a55, 0x8d97, 0x4511, { 0xbf, 0xef, 0xa, 0x8b, 0xc6, 0x2c, 0x25, 0xae }\r
 };\r
 \r
@@ -63,7 +63,7 @@ CONST EFI_GUID mEslUdp4ServiceGuid = {
 /**\r
   Tag GUID - UDPv6 in use by an application using EfiSocketLib\r
 **/\r
-CONST EFI_GUID mEslUdp6ServiceGuid = {\r
+CONST EFI_GUID mEslUdp6ServiceGuid __attribute__((weak)) = {\r
   0xaa4af677, 0x6efe, 0x477c, { 0x96, 0x68, 0xe8, 0x13, 0x9d, 0x2, 0xfd, 0x9b }\r
 };\r
 \r
@@ -327,7 +327,7 @@ EslServiceNetworkDisconnect (
 /**\r
   Socket layer's service binding protocol delcaration.\r
 **/\r
-CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding = {\r
+CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding __attribute__((weak)) = {\r
   NULL,\r
   NULL\r
 };\r
@@ -338,5 +338,5 @@ CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding = {
   for any socket application that links against the EfiSocketLib.\r
   Note that the SocketDxe driver uses different redirection.\r
 **/\r
-PFN_ESL_xSTRUCTOR mpfnEslConstructor = EslServiceNetworkConnect;    ///<  Constructor for EfiSocketLib\r
-PFN_ESL_xSTRUCTOR mpfnEslDestructor = EslServiceNetworkDisconnect;  ///<  Destructor for EfiSocketLib\r
+PFN_ESL_xSTRUCTOR mpfnEslConstructor __attribute__((weak)) = EslServiceNetworkConnect;    ///<  Constructor for EfiSocketLib\r
+PFN_ESL_xSTRUCTOR mpfnEslDestructor __attribute__((weak)) = EslServiceNetworkDisconnect;  ///<  Destructor for EfiSocketLib\r