+From 6451e0daf7f733a27e1afb3c7ac662a620d8b93b Mon Sep 17 00:00:00 2001
+From: Olivier Martin <olivier.martin@arm.com>
+Date: Tue, 14 Jan 2014 14:43:50 +0000
+Subject: [PATCH] EDK Shell patch to support GCC
+
+---
+ DeviceTree/devicetree.c | 4 +-
+ DeviceTree/devicetree.h | 1 +
+ DeviceTree/devicetree.inf | 28 +--
+ EfiCompress/Compress.h | 2 +-
+ EfiCompress/CompressMain.c | 2 +-
+ EfiCompress/compress.c | 2 +-
+ EfiCompress/compress.inf | 32 +--
+ EfiDecompress/Decompress.c | 8 +-
+ EfiDecompress/Decompress.h | 2 +-
+ EfiDecompress/Decompress.inf | 33 +--
+ IfConfig/IfConfig.c | 6 +-
+ IfConfig/IfConfig.h | 1 +
+ IfConfig/IfConfig.inf | 34 +--
+ IfConfig/ShellNetHelper.h | 1 +
+ IpConfig/IpConfig.c | 4 +-
+ IpConfig/IpConfig.h | 2 +-
+ IpConfig/IpConfig.inf | 29 +--
+ Library/Aarch64/efilibplat.h | 38 ++++
+ Library/Arm/efilibplat.h | 39 ++++
+ Library/CRC.c | 2 +-
+ Library/CRC.h | 4 +-
+ Library/ConsistMapping.c | 2 +-
+ Library/ConsistMapping.h | 4 +-
+ Library/DPath.c | 6 +-
+ Library/DPath.h | 3 +-
+ Library/Data.c | 2 +-
+ Library/Ebc/EfiLibPlat.h | 1 +
+ Library/EfiPart.h | 1 +
+ Library/EfiShellLib.h | 11 +-
+ Library/EfiShellLib.inf | 51 +++--
+ Library/Event.c | 2 +-
+ Library/Event.h | 4 +-
+ Library/FileIO.c | 6 +-
+ Library/FileIO.h | 4 +-
+ Library/Handle.c | 9 +-
+ Library/Handle.h | 1 +
+ Library/HiiSupport.c | 6 +-
+ Library/HiiSupport.h | 1 +
+ Library/IA32/efilibplat.h | 2 +-
+ Library/IO.c | 13 +-
+ Library/IO.h | 4 +-
+ Library/IPF/efilibplat.h | 1 +
+ Library/IPF/libsalpal.h | 2 +-
+ Library/IPF/palproc.h | 1 +
+ Library/Init.c | 2 +-
+ Library/LinkedList.h | 4 +-
+ Library/Lock.c | 2 +-
+ Library/Lock.h | 4 +-
+ Library/Mem.c | 2 +-
+ Library/Mem.h | 4 +-
+ Library/Misc.c | 15 +-
+ Library/Misc.h | 1 +
+ Library/Perf.c | 2 +-
+ Library/RtData.c | 2 +-
+ Library/ShellDebug.c | 2 +-
+ Library/ShellDebug.h | 1 +
+ Library/ShellEnvInt.c | 2 +-
+ Library/ShellEnvInt.h | 4 +-
+ Library/Str.c | 6 +-
+ Library/Str.h | 1 +
+ Library/VarCheck.c | 2 +-
+ Library/VarCheck.h | 3 +-
+ Library/X64/efilibplat.h | 1 +
+ LoadPciRom/LoadPciRom.c | 8 +-
+ LoadPciRom/LoadPciRom.h | 1 +
+ LoadPciRom/LoadPciRom.inf | 28 +--
+ Ping/Ping.c | 27 ++-
+ Ping/Ping.h | 1 +
+ Ping/Ping.inf | 34 +--
+ Shell.inf | 305 +++++++++++++-------------
+ ShellFull.inf | 494 ++++++++++++++++++++++---------------------
+ SmbiosView/EventLogInfo.c | 2 +-
+ SmbiosView/EventLogInfo.h | 1 +
+ SmbiosView/LibSmbios.h | 1 +
+ SmbiosView/LibSmbiosView.c | 10 +-
+ SmbiosView/LibSmbiosView.h | 3 +-
+ SmbiosView/PrintInfo.c | 2 +-
+ SmbiosView/PrintInfo.h | 1 +
+ SmbiosView/QueryTable.c | 2 +-
+ SmbiosView/QueryTable.h | 1 +
+ SmbiosView/Smbios.h | 1 +
+ SmbiosView/Smbiosview.inf | 33 +--
+ SmbiosView/smbiosview.c | 4 +-
+ SmbiosView/smbiosview.h | 1 +
+ TelnetMgmt/TelnetMgmt.c | 4 +-
+ TelnetMgmt/TelnetMgmt.h | 2 +-
+ TelnetMgmt/TelnetMgmt.inf | 29 +--
+ TelnetMgmt/TelnetServer.h | 1 +
+ attrib/attrib.c | 6 +-
+ attrib/attrib.h | 3 +-
+ attrib/attrib.inf | 28 +--
+ cls/cls.c | 4 +-
+ cls/cls.h | 1 +
+ cls/cls.inf | 29 +--
+ comp/comp.c | 2 +-
+ comp/comp.h | 2 +-
+ comp/comp.inf | 31 +--
+ cp/cp.c | 10 +-
+ cp/cp.h | 3 +-
+ cp/cp.inf | 29 +--
+ date/date.c | 10 +-
+ date/date.h | 1 +
+ date/date.inf | 29 +--
+ dblk/dblk.c | 2 +-
+ dblk/dblk.h | 1 +
+ dblk/dblk.inf | 31 +--
+ dblk/efidump.c | 18 +-
+ devices/devices.c | 4 +-
+ devices/devices.h | 1 +
+ devices/devices.inf | 28 +--
+ dmem/MemCommonPart.c | 14 +-
+ dmem/MemCommonPart.h | 2 +-
+ dmem/debug.h | 1 +
+ dmem/dmem.inf | 30 +--
+ dmem/efidump.c | 20 +-
+ dmpstore/dmpstore.c | 4 +-
+ dmpstore/dmpstore.h | 1 +
+ dmpstore/dmpstore.inf | 31 +--
+ drivers/drivers.c | 6 +-
+ drivers/drivers.h | 1 +
+ drivers/drivers.inf | 28 +--
+ drvcfg/drvcfg.c | 4 +-
+ drvcfg/drvcfg.h | 1 +
+ drvcfg/drvcfg.inf | 28 +--
+ drvdiag/drvdiag.c | 4 +-
+ drvdiag/drvdiag.h | 1 +
+ drvdiag/drvdiag.inf | 28 +--
+ edit/edit.inf | 32 +--
+ edit/editor.h | 5 +-
+ edit/editortype.h | 7 +-
+ edit/libEditor.c | 24 +--
+ edit/libFileBuffer.c | 24 ++-
+ edit/libInputBar.c | 26 +--
+ edit/libMenuBar.c | 9 +-
+ edit/libMisc.h | 1 +
+ edit/libStatusBar.c | 11 +-
+ edit/libTitleBar.c | 17 +-
+ edit/libeditor.h | 1 +
+ edit/libfilebuffer.h | 1 +
+ edit/libinputbar.h | 1 +
+ edit/libmenubar.h | 1 +
+ edit/libstatusbar.h | 1 +
+ edit/libtitlebar.h | 1 +
+ edit/main.c | 30 +--
+ err/DebugMask.h | 1 +
+ err/err.c | 12 +-
+ err/err.h | 2 +-
+ err/err.inf | 31 +--
+ guid/guid.c | 4 +-
+ guid/guid.h | 2 +-
+ guid/guid.inf | 33 +--
+ hexedit/heditor.h | 5 +-
+ hexedit/heditortype.h | 7 +-
+ hexedit/hexedit.inf | 31 +--
+ hexedit/libBufferImage.c | 37 ++--
+ hexedit/libEditor.c | 33 +--
+ hexedit/libInputBar.c | 11 +-
+ hexedit/libMemImage.c | 8 +-
+ hexedit/libMenuBar.c | 13 +-
+ hexedit/libMisc.h | 3 +-
+ hexedit/libStatusBar.c | 1 +
+ hexedit/libTitleBar.c | 24 ++-
+ hexedit/libbufferimage.h | 1 +
+ hexedit/libclipboard.h | 1 +
+ hexedit/libdiskimage.c | 17 +-
+ hexedit/libdiskimage.h | 1 +
+ hexedit/libeditor.h | 1 +
+ hexedit/libfileimage.h | 1 +
+ hexedit/libinputbar.h | 1 +
+ hexedit/libmemimage.h | 1 +
+ hexedit/libmenubar.h | 3 +-
+ hexedit/libstatusbar.h | 1 +
+ hexedit/libtitlebar.h | 1 +
+ hexedit/main.c | 78 +++----
+ inc/shellenv.h | 1 +
+ inc/shelltypes.h | 3 +-
+ load/load.c | 2 +-
+ load/load.h | 1 +
+ load/load.inf | 29 +--
+ ls/ls.c | 11 +-
+ ls/ls.h | 3 +-
+ ls/ls.inf | 28 +--
+ mem/MemCommonPart.c | 14 +-
+ mem/MemCommonPart.h | 2 +-
+ mem/debug.h | 1 +
+ mem/efidump.c | 20 +-
+ mem/mem.inf | 30 +--
+ memmap/memmap.c | 6 +-
+ memmap/memmap.h | 1 +
+ memmap/memmap.inf | 28 +--
+ mkdir/mkdir.c | 4 +-
+ mkdir/mkdir.h | 3 +-
+ mkdir/mkdir.inf | 28 +--
+ mm/mm.c | 72 +++----
+ mm/mm.h | 1 +
+ mm/mm.inf | 28 +--
+ mode/mode.c | 2 +-
+ mode/mode.h | 1 +
+ mode/mode.inf | 28 +--
+ mount/mount.c | 4 +-
+ mount/mount.h | 1 +
+ mount/mount.inf | 28 +--
+ mv/mv.c | 4 +-
+ mv/mv.h | 2 +-
+ mv/mv.inf | 28 +--
+ newshell/FakeHii.c | 6 +-
+ newshell/FakeHii.h | 1 +
+ newshell/init.c | 18 +-
+ newshell/nshell.h | 3 +-
+ newshell/nshell.inf | 34 +--
+ openinfo/openinfo.c | 4 +-
+ openinfo/openinfo.h | 1 +
+ openinfo/openinfo.inf | 28 +--
+ pci/pci.c | 19 +-
+ pci/pci.h | 3 +-
+ pci/pci.inf | 28 +--
+ pci/pci_class.c | 2 +-
+ pci/pci_class.h | 3 +-
+ reset/reset.c | 2 +-
+ reset/reset.h | 1 +
+ reset/reset.inf | 28 +--
+ rm/rm.c | 2 +-
+ rm/rm.h | 1 +
+ rm/rm.inf | 28 +--
+ sermode/sermode.c | 8 +-
+ sermode/sermode.h | 1 +
+ sermode/sermode.inf | 28 +--
+ shellenv/Connect.c | 20 +-
+ shellenv/ConsoleProxy.c | 6 +-
+ shellenv/batch.c | 15 +-
+ shellenv/conio.c | 2 +-
+ shellenv/dprot.c | 8 +-
+ shellenv/echo.c | 2 +-
+ shellenv/exec.c | 18 +-
+ shellenv/for.c | 7 +-
+ shellenv/help.c | 2 +-
+ shellenv/if.c | 3 -
+ shellenv/init.c | 2 +-
+ shellenv/map.c | 16 +-
+ shellenv/parsecmd.h | 3 +-
+ shellenv/pause.c | 2 +-
+ shellenv/protid.c | 22 +-
+ shellenv/shelle.h | 1 +
+ shellenv/shellenvguid.h | 1 +
+ shellenv/var.c | 6 +-
+ stall/stall.c | 2 +-
+ stall/stall.h | 1 +
+ stall/stall.inf | 28 +--
+ time/time.c | 10 +-
+ time/time.h | 1 +
+ time/time.inf | 28 +--
+ touch/touch.c | 2 +-
+ touch/touch.h | 2 +-
+ touch/touch.inf | 29 +--
+ type/type.c | 4 +-
+ type/type.h | 1 +
+ type/type.inf | 28 +--
+ tzone/timezone.inf | 32 +--
+ tzone/tzone.c | 4 +-
+ tzone/tzone.h | 1 +
+ unload/unload.c | 18 +-
+ unload/unload.h | 1 +
+ unload/unload.inf | 29 +--
+ ver/Ebc/verEbc.c | 2 +-
+ ver/Ver.inf | 36 ++--
+ ver/ver.c | 2 +-
+ ver/ver.h | 1 +
+ vol/Vol.inf | 28 +--
+ vol/vol.c | 4 +-
+ vol/vol.h | 1 +
+ 270 files changed, 1985 insertions(+), 1610 deletions(-)
+ create mode 100644 Library/Aarch64/efilibplat.h
+ create mode 100644 Library/Arm/efilibplat.h
+
+diff --git a/DeviceTree/devicetree.c b/DeviceTree/devicetree.c
+index 147e2cb..77e3cf4 100644
+--- a/DeviceTree/devicetree.c
++++ b/DeviceTree/devicetree.c
+@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
+ //
+ // Global Variables
+ //
+-EFI_HII_HANDLE HiiHandle;
++STATIC EFI_HII_HANDLE HiiHandle;
+ EFI_GUID EfiDevicetreeGuid = EFI_DEVICETREE_GUID;
+ SHELL_VAR_CHECK_ITEM DevicetreeCheckList[] = {
+ {
+@@ -67,7 +67,7 @@ SHELL_VAR_CHECK_ITEM DevicetreeCheckList[] = {