]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/BootMaintenanceManagerUiLib: hide library-internal symbol
authorLaszlo Ersek <lersek@redhat.com>
Fri, 13 May 2016 09:50:42 +0000 (17:50 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 17 May 2016 02:09:53 +0000 (10:09 +0800)
Static storage duration objects that are internal to a library instance
should:
- either have internal linkage (i.e., be declared STATIC),
- or, if they are referenced in multiple files of the library instance,
  prefixed with a word that is specific to the library instance, and
  minimizes namespace collisions.

In this case, the "gHiiDriverList" variable (with static storage duration
and external linkage) is defined in both BootMaintenanceManagerUiLib and
UiApp. When these are linked together, GCC catches the multiple external
definitions and aborts the build. (GCC notices this due to commit
214a3b79417f.) Fix the error by applying the first rule above.

Fixes: a85be3ae48a8aaa40b755cd0ff7270c67cfed585
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c

index 177b2498d3ecfb8a64f0d1c0a84b80317da0a08b..fefb714b91669e56ac14c92ba02b85d45b2c312d 100644 (file)
@@ -26,7 +26,7 @@ typedef struct {
   BOOLEAN         EmptyLineAfter;\r
 } UI_HII_DRIVER_INSTANCE;\r
 \r
-UI_HII_DRIVER_INSTANCE       *gHiiDriverList;\r
+STATIC UI_HII_DRIVER_INSTANCE       *gHiiDriverList;\r
 \r
 \r
 /**\r