Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-2541: Redesigned the importer's load library option set. The user now has finer grained control over where libraries are loaded from, as well as how many libraries are loaded.

Ryan Kurtzf62320a50bfc
diff --git a/Ghidra/Features/Base/certification.manifest b/Ghidra/Features/Base/certification.manifest
index 344f7c7936..292a996e04 100644
--- a/Ghidra/Features/Base/certification.manifest
+++ b/Ghidra/Features/Base/certification.manifest
@@ -36,6 +36,17 @@ data/parserprofiles/vs12Local.prf||GHIDRA||||END|
data/pcodetest/EmuTesting.gdt||GHIDRA||||END|
data/stringngrams/StringModel.sng||GHIDRA||reviewed||END|
data/symbols/README.txt||GHIDRA||||END|
+data/symbols/win16/commctrl.exports||GHIDRA||||END|
+data/symbols/win16/commdlg.exports||GHIDRA||||END|
+data/symbols/win16/gdi.exports||GHIDRA||||END|
+data/symbols/win16/kernel.exports||GHIDRA||||END|
+data/symbols/win16/krnl386.exports||GHIDRA||||END|
+data/symbols/win16/lzexpand.exports||GHIDRA||||END|
+data/symbols/win16/mmsystem.exports||GHIDRA||||END|
+data/symbols/win16/toolhelp.exports||GHIDRA||||END|
+data/symbols/win16/user.exports||GHIDRA||||END|
+data/symbols/win16/ver.exports||GHIDRA||||END|
+data/symbols/win16/win87em.exports||GHIDRA||||END|
data/symbols/win32/kernel32.hints||GHIDRA||||END|
data/symbols/win32/mfc100.exports||GHIDRA||||END|
data/symbols/win32/mfc100u.exports||GHIDRA||||END|
diff --git a/Ghidra/Features/Base/data/symbols/win16/commctrl.exports b/Ghidra/Features/Base/data/symbols/win16/commctrl.exports
new file mode 100644
index 0000000000..cb2e72525c
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/commctrl.exports
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="commctrl.dll" PATH="COMMCTRL.DLL" DATE="Sun Jun 21 11:21:26 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="17" NAME="INITCOMMONCONTROLS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="DRAWINSERT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="CREATEHEADERWINDOW" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="GETEFFECTIVECLIENTRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="GETPRIVATEPROFILESTRUCT" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="CREATESTATUSWINDOW" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="MENUHELP" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="CREATEMAPPEDBITMAP" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="CREATETOOLBAR" PURGE="20" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="MAKEDRAGLIST" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="SHOWHIDEMENUCTL" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="WRITEPRIVATEPROFILESTRUCT" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="DRAWSTATUSTEXT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="CREATEUPDOWNCONTROL" PURGE="26" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="LBITEMFROMPT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="UPDOWNWNDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="STATUSWNDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="TOOLBARWNDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="HEADERWNDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="TRACKBARWNDPROC" PURGE="10" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/commdlg.exports b/Ghidra/Features/Base/data/symbols/win16/commdlg.exports
new file mode 100644
index 0000000000..fd8c7050b7
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/commdlg.exports
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="commdlg.dll" PATH="COMMDLG.DLL" DATE="Sun Jun 21 11:21:24 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="29" NAME="DWLBSUBCLASS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="FONTSTYLEENUMPROC" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="FORMATCHARDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="COLORDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="CHOOSEFONT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="DWUPARROWHACK" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="DWOKSUBCLASS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="PRINTDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="22" NAME="PRINTSETUPDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="26" NAME="COMMDLGEXTENDEDERROR" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="FILEOPENDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="GETSAVEFILENAME" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="23" NAME="EDITINTEGERONLY" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="CHOOSECOLOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="GETOPENFILENAME" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="LOADALTERBITMAP" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="FILESAVEDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="25" NAME="WANTARROWS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="REPLACETEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="PRINTDLG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="FINDTEXTDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="REPLACETEXTDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="FONTFAMILYENUMPROC" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="27" NAME="GETFILETITLE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="FINDTEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="28" NAME="WEP" PURGE="2" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/gdi.exports b/Ghidra/Features/Base/data/symbols/win16/gdi.exports
new file mode 100644
index 0000000000..a7bdfb4dfa
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/gdi.exports
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="gdi.exe" PATH="GDI.EXE" DATE="Sun Jun 21 11:21:24 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="474" NAME="GETWINDOWEXTEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="47" NAME="COMBINERGN" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="482" NAME="SETWINDOWORGEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="480" NAME="SETVIEWPORTORGEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="155" NAME="QUERYABORT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="301" NAME="ENGINEDELETEFONT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="232" NAME="EXTRACTPQ" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="149" NAME="GETBRUSHORG" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="449" NAME="DEVICECOLORMATCH" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="33" NAME="TEXTOUT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="132" NAME="SETENVIRONMENT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="376" NAME="RESETDC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="SETSTRETCHBLTMODE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="58" NAME="CREATEHATCHBRUSH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="304" NAME="ENGINESETFONTCONTEXT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="29" NAME="PATBLT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="481" NAME="SETWINDOWEXTEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="194" NAME="GETBOUNDSRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="34" NAME="BITBLT" PURGE="20" COMMENT="" />
+ <EXPORT ORDINAL="379" NAME="STARTPAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="OFFSETWINDOWORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="348" NAME="CHORD" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="148" NAME="SETBRUSHORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="53" NAME="CREATEDC" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="24" NAME="ELLIPSE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="162" NAME="GETBITMAPDIMENSION" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="161" NAME="PTINREGION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="472" NAME="GETVIEWPORTEXTEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="442" NAME="CREATEDIBITMAP" PURGE="20" COMMENT="" />
+ <EXPORT ORDINAL="445" NAME="CREATEDIBPATTERNBRUSH" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="128" NAME="MULDIV" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="84" NAME="GETPOLYFILLMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="154" NAME="GETNEARESTCOLOR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="466" NAME="RECTINREGION_EHH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="411" NAME="GETCURLOGFONT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="68" NAME="DELETEDC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="244" NAME="DELETEJOB" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="151" NAME="COPYMETAFILE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="89" NAME="GETTEXTCHARACTEREXTRA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="124" NAME="GETMETAFILE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="102" NAME="OFFSETVISRGN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="48" NAME="CREATEBITMAP" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="81" NAME="GETMAPMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="42" NAME="INVERTRGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="215" NAME="DMGETCHARWIDTH" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="193" NAME="SETBOUNDSRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="40" NAME="FILLRGN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="22" NAME="INTERSECTCLIPRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="476" NAME="OFFSETVIEWPORTORGEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="233" NAME="INSERTPQ" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="208" NAME="DMOUTPUT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="99" NAME="LPTODP" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="67" NAME="DPTOLP" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="350" NAME="GETCHARWIDTH" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="163" NAME="SETBITMAPDIMENSION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="136" NAME="REMOVEFONTRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="484" NAME="SCALEVIEWPORTEXTEX" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="479" NAME="SETVIEWPORTEXTEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="368" NAME="RESIZEPALETTE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="176" NAME="PLAYMETAFILERECORD" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="122" NAME="RESURRECTION" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="SETPOLYFILLMODE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="351" NAME="EXTTEXTOUT" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="216" NAME="DMSTRETCHBLT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="104" NAME="RECTVISIBLE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="353" NAME="GETASPECTRATIOFILTER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="131" NAME="INQUIREVISRGN" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="97" NAME="GETWINDOWORG" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="63" NAME="CREATEPOLYGONRGN" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="214" NAME="DMEXTTEXTOUT" PURGE="40" COMMENT="" />
+ <EXPORT ORDINAL="201" NAME="DMBITBLT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="462" NAME="ISGDIOBJECT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="SETTEXTCHARACTEREXTRA" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="231" NAME="MINPQ" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="310" NAME="CREATESCALABLEFONTRESOURCE" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="153" NAME="CREATEIC" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="130" NAME="RESTOREVISRGN" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="SETMAPMODE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="175" NAME="ENUMMETAFILE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="86" NAME="GETRELABS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="95" NAME="GETVIEWPORTORG" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="41" NAME="FRAMERGN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="330" NAME="ENUMFONTFAMILIES" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="303" NAME="ENGINEGETCHARWIDTH" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="49" NAME="CREATEBITMAPINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="308" NAME="GETOUTLINETEXTMETRICS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="242" NAME="WRITEDIALOG" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="443" NAME="SETDIBITSTODEVICE" PURGE="28" COMMENT="" />
+ <EXPORT ORDINAL="105" NAME="SELECTVISRGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="345" NAME="GETTEXTALIGN" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="209" NAME="DMPIXEL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="485" NAME="SCALEWINDOWEXTEX" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="96" NAME="GETWINDOWEXT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="MOVETO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="218" NAME="DMSTRETCHDIBITS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="SETWINDOWORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="25" NAME="FLOODFILL" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="98" NAME="INTERSECTVISRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="82" NAME="GETOBJECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="75" NAME="GETBKCOLOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="314" NAME="ENGINEEXTTEXTOUT" PURGE="42" COMMENT="" />
+ <EXPORT ORDINAL="87" NAME="GETSTOCKOBJECT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="469" NAME="GETBRUSHORGEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="51" NAME="CREATECOMPATIBLEBITMAP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="61" NAME="CREATEPEN" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="SETRELABS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="126" NAME="CLOSEMETAFILE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="93" NAME="GETTEXTMETRICS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="66" NAME="CREATESOLIDBRUSH" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="SETVIEWPORTORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="312" NAME="CONVERTOUTLINEFONTFILE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="173" NAME="GETCLIPRGN" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="55" NAME="CREATEELLIPTICRGNINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="346" NAME="SETTEXTALIGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="207" NAME="DMENUMOBJ" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="372" NAME="EXTFLOODFILL" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="465" NAME="RECTVISIBLE_EHH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="403" NAME="GDIINIT2" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="234" NAME="SIZEPQ" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="441" NAME="GETDIBITS" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="SETWINDOWEXT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="195" NAME="SELECTBITMAP" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="170" NAME="SETDCSTATUS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="91" NAME="GETTEXTEXTENT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="SETTEXTJUSTIFICATION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="332" NAME="GETKERNINGPAIRS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="134" NAME="GETRGNBOX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="SETBKCOLOR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="477" NAME="OFFSETWINDOWORGEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="35" NAME="STRETCHBLT" PURGE="24" COMMENT="" />
+ <EXPORT ORDINAL="80" NAME="GETDEVICECAPS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="378" NAME="ENDDOC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="307" NAME="GETCHARABCWIDTHS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="36" NAME="POLYGON" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="213" NAME="BRUTE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="69" NAME="DELETEOBJECT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="43" NAME="PAINTRGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="410" NAME="ISVALIDMETAFILE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="467" NAME="UNICODETOANSI" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="355" NAME="FTRAPPING0" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="305" NAME="ENGINEGETGLYPHBMP" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="73" NAME="EXCLUDEVISRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="250" NAME="COPY" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="179" NAME="GETDCSTATE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="94" NAME="GETVIEWPORTEXT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="440" NAME="SETDIBITS" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="470" NAME="GETCURRENTPOSITIONEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="409" NAME="CREATEUSERDISCARDABLEBITMAP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="254" NAME="SPOOLFILE" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="172" NAME="SETRECTRGN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="39" NAME="RESTOREDC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="202" NAME="DMCOLORINFO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="38" NAME="ESCAPE" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="377" NAME="STARTDOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="354" NAME="SHRINKGDIHEAP" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="77" NAME="GETCLIPBOX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="65" NAME="CREATERECTRGNINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="309" NAME="GETGLYPHOUTLINE" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="230" NAME="CREATEPQ" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="169" NAME="ISDCDIRTY" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="SCALEVIEWPORTEXT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="381" NAME="SETABORTPROC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="375" NAME="GETSYSTEMPALETTEENTRIES" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="135" NAME="SCANLR" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="382" NAME="ABORTDOC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="306" NAME="ENGINEMAKEFONTDIR" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="241" NAME="WRITESPOOL" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="101" NAME="OFFSETRGN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="405" NAME="FINALGDIINIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="191" NAME="GETDCHOOK" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="235" NAME="DELETEPQ" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="180" NAME="SETDCSTATE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="SETVIEWPORTEXT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="76" NAME="GETBKMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="57" NAME="CREATEFONTINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="380" NAME="ENDPAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="245" NAME="GETSPOOLJOB" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="247" NAME="ENDSPOOLPAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="103" NAME="PTVISIBLE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="313" NAME="GETRASTERIZERCAPS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="50" NAME="CREATEBRUSHINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="253" NAME="DELETESPOOLPAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="23" NAME="ARC" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="EXCLUDECLIPRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="311" NAME="GETFONTDATA" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="92" NAME="GETTEXTFACE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="90" NAME="GETTEXTCOLOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="129" NAME="SAVEVISRGN" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="85" NAME="GETROP2" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="32" NAME="OFFSETCLIPRGN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="210" NAME="DMREALIZEOBJECT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="190" NAME="SETDCHOOK" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="119" NAME="ADDFONTRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="401" NAME="GDIMOVEBITMAP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="121" NAME="DEATH" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="45" NAME="SELECTOBJECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="26" NAME="PIE" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="SCALEWINDOWEXT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="246" NAME="STARTSPOOLPAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="243" NAME="CLOSEJOB" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="52" NAME="CREATECOMPATIBLEDC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="SETBKMODE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="100" NAME="LINEDDA" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="352" NAME="GETPHYSICALFONTHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="219" NAME="DMSETDIBTODEV" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="463" NAME="MAKEOBJECTPRIVATE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="SETTEXTCOLOR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="83" NAME="GETPIXEL" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="468" NAME="GETBITMAPDIMENSIONEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="123" NAME="PLAYMETAFILE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="SETROP2" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="471" NAME="GETTEXTEXTENTPOINT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="28" NAME="ROUNDRECT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="444" NAME="CREATEROUNDRECTRGN" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="60" NAME="CREATEPATTERNBRUSH" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="300" NAME="ENGINEENUMERATEFONT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="400" NAME="FASTWINDOWFRAME" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="360" NAME="CREATEPALETTE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="212" NAME="DMSCANLR" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="44" NAME="SELECTCLIPRGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="439" NAME="STRETCHDIBITS" PURGE="32" COMMENT="" />
+ <EXPORT ORDINAL="370" NAME="GETNEARESTPALETTEINDEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="248" NAME="QUERYJOB" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="159" NAME="GETMETAFILEBITS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="37" NAME="POLYLINE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="196" NAME="SETMETAFILEBITSBETTER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="211" NAME="DMSTRBLT" PURGE="30" COMMENT="" />
+ <EXPORT ORDINAL="150" NAME="UNREALIZEOBJECT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="366" NAME="UPDATECOLORS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="349" NAME="SETMAPPERFLAGS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="156" NAME="CREATEDISCARDABLEBITMAP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="374" NAME="GETSYSTEMPALETTEUSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="SETPIXEL" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="478" NAME="SETBITMAPDIMENSIONEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="54" NAME="CREATEELLIPTICRGN" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="SAVEDC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="240" NAME="OPENJOB" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="407" NAME="CREATEUSERBITMAP" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="17" NAME="OFFSETVIEWPORTORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="125" NAME="CREATEMETAFILE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="78" NAME="GETCURRENTPOSITION" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="160" NAME="SETMETAFILEBITS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="72" NAME="EQUALRGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="363" NAME="GETPALETTEENTRIES" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="74" NAME="GETBITMAPBITS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="181" NAME="RECTINREGION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="79" NAME="GETDCORG" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="460" NAME="GDITASKTERMINATION" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="56" NAME="CREATEFONT" PURGE="30" COMMENT="" />
+ <EXPORT ORDINAL="486" NAME="GETASPECTRATIOFILTEREX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="361" NAME="GDISELECTPALETTE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="127" NAME="DELETEMETAFILE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="461" NAME="SETOBJECTOWNER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="62" NAME="CREATEPENINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="475" NAME="GETWINDOWORGEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="473" NAME="GETVIEWPORTORGEX" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="412" NAME="ISDCCURRENTPALETTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="206" NAME="DMENUMDFONTS" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="71" NAME="ENUMOBJECTS" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="220" NAME="DMTRANSPOSE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="192" NAME="SETHOOKFLAGS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="451" NAME="CREATEPOLYPOLYGONRGN" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="373" NAME="SETSYSTEMPALETTEUSE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="450" NAME="POLYPOLYGON" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="367" NAME="ANIMATEPALETTE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="133" NAME="GETENVIRONMENT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="70" NAME="ENUMFONTS" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="362" NAME="GDIREALIZEPALETTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="464" NAME="FIXUPBOGUSPUBLISHERMETAFILE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="27" NAME="RECTANGLE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="88" NAME="GETSTRETCHBLTMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="483" NAME="MOVETOEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="452" NAME="GDISEEGDIDO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="365" NAME="REALIZEDEFAULTPALETTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="LINETO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="217" NAME="DMDIBBITS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="302" NAME="ENGINEREALIZEFONT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="364" NAME="SETPALETTEENTRIES" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="106" NAME="SETBITMAPBITS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="64" NAME="CREATERECTRGN" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="117" NAME="SETDCORG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="59" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="46" NAME="__GP" PURGE="-1" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/kernel.exports b/Ghidra/Features/Base/data/symbols/win16/kernel.exports
new file mode 100644
index 0000000000..116c7691b5
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/kernel.exports
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="kernel.exe" PATH="KERNEL.EXE" DATE="Sun Jun 21 11:21:24 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="173" NAME="__ROMBIOS" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="GLOBALUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="184" NAME="GLOBALDOSALLOC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="127" NAME="GETPRIVATEPROFILEINT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="166" NAME="WINEXEC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="122" NAME="ISTASKLOCKED" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="99" NAME="GETLPERRMODE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="88" NAME="LSTRCPY" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="81" NAME="_LCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="335" NAME="ISBADWRITEPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="171" NAME="ALLOCDSTOCSALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="170" NAME="ALLOCCSTODSALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="137" NAME="FATALAPPEXIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="183" NAME="__0000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="GLOBALLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="161" NAME="LOCALCOUNTFREE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="193" NAME="__0040H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="42" NAME="DISABLEDOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="198" NAME="GLOBALUNFIX" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="120" NAME="UNDEFDYNLINK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="159" NAME="GLOBALHANDLENORIP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="85" NAME="_LOPEN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="141" NAME="INITTASK1" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="164" NAME="GLOBALLRUNEWEST" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="130" NAME="FILECDR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="55" NAME="CATCH" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="26" NAME="GLOBALFREEALL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="128" NAME="GETPRIVATEPROFILESTRING" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="339" NAME="DIAGQUERY" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="77" NAME="RESERVED1" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="78" NAME="RESERVED2" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="101" NAME="NOHOOKDOSCALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="79" NAME="RESERVED3" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="83" NAME="_LCREAT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="110" NAME="PATCHCODEHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="80" NAME="RESERVED4" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="87" NAME="RESERVED5" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="53" NAME="CALLPROCINSTANCE" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="341" NAME="TOOLHELPHOOK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="320" NAME="ISTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="318" NAME="FATALEXITHOOK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="126" NAME="MEMORYFREED" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="165" NAME="A20PROC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="51" NAME="MAKEPROCINSTANCE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="107" NAME="SETERRORMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="343" NAME="REGISTERWINOLDAPHOOK" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="204" NAME="SWAPRECORDING" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="158" NAME="ISWINOLDAPTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="84" NAME="_LLSEEK" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="33" NAME="LOCKCURRENTTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="319" NAME="FLUSHCACHEDFILEHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="316" NAME="GETFREEMEMINFO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="93" NAME="GETCODEHANDLE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="52" NAME="FREEPROCINSTANCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="152" NAME="GETNUMTASKS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="LOCALFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="LOCALSIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="192" NAME="GLOBALPAGEUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="346" NAME="ISBADHUGEREADPTR" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="163" NAME="GLOBALLRUOLDEST" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="25" NAME="GLOBALCOMPACT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="65" NAME="SIZEOFRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="LOCALLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="121" NAME="LOCALSHRINK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="105" NAME="GETEXEVERSION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="124" NAME="ENABLEKERNEL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="LOCALCOMPACT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="EXITKERNEL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="311" NAME="GETSETKERNELDOSPROC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="162" NAME="LOCALHEAPSIZE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="76" NAME="DELETEPATHNAME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="LOCALINIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="131" NAME="GETDOSENVIRONMENT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="WAITEVENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="117" NAME="OLDYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="100" NAME="VALIDATECODESEGMENTS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="36" NAME="GETCURRENTTASK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="134" NAME="GETWINDOWSDIRECTORY" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="129" NAME="WRITEPRIVATEPROFILESTRING" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="328" NAME="_DEBUGOUTPUT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="177" NAME="PRESTOCHANGOSELECTOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="104" NAME="GETCODEINFO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="95" NAME="LOADLIBRARY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="197" NAME="GLOBALFIX" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="191" NAME="GLOBALPAGELOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="403" NAME="K403" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="GLOBALSIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="404" NAME="K404" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="98" NAME="GETLASTDISKCHANGE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="340" NAME="DIAGOUTPUT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="LOCALUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="23" NAME="LOCKSEGMENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="200" NAME="VALIDATEFREESPACES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="35" NAME="GETTASKQUEUE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="338" NAME="HASGPHANDLER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="22" NAME="GLOBALFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="169" NAME="GETFREESPACE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="59" NAME="WRITEPROFILESTRING" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="188" NAME="GETSELECTORLIMIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="327" NAME="K327" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="111" NAME="GLOBALWIRE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="102" NAME="DOS3CALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="37" NAME="GETCURRENTPDB" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="348" NAME="HMEMCPY" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="180" NAME="LONGPTRADD" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="329" NAME="K329" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="74" NAME="OPENFILE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="32" NAME="SETPRIORITY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="202" NAME="REGISTERPTRACE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="151" NAME="WINOLDAPCALL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="112" NAME="GLOBALUNWIRE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="353" NAME="LSTRCPYN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="56" NAME="THROW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="96" NAME="FREELIBRARY" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="68" NAME="INITATOMTABLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="34" NAME="SETTASKQUEUE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="138" NAME="GETHEAPSPACES" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="47" NAME="GETMODULEHANDLE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="92" NAME="GETTEMPDRIVE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="354" NAME="GETAPPCOMPATFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="150" NAME="DIRECTEDYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="345" NAME="ISSHAREDSELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="189" NAME="SETSELECTORLIMIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="199" NAME="SETHANDLECOUNT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="114" NAME="__AHINCR" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="72" NAME="GETATOMNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="139" NAME="DOSIGNAL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="115" NAME="OUTPUTDEBUGSTRING" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="28" NAME="GLOBALMASTERHANDLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="347" NAME="ISBADHUGEWRITEPTR" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="310" NAME="LOCALHANDLEDELTA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="113" NAME="__AHSHIFT" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="344" NAME="GETWINOLDAPHOOKS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="167" NAME="GETEXPWINVER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="58" NAME="GETPROFILESTRING" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="38" NAME="SETTASKSIGNALPROC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="326" NAME="ISROMFILE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="201" NAME="REPLACEINST" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="64" NAME="ACCESSRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="156" NAME="LIMITEMSPAGES" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="50" NAME="GETPROCADDRESS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="350" NAME="_HWRITE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="174" NAME="__A000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="90" NAME="LSTRLEN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="168" NAME="DIRECTRESALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="135" NAME="GETSYSTEMDIRECTORY" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="351" NAME="BUNNY_351" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="97" NAME="GETTEMPFILENAME" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="132" NAME="GETWINFLAGS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="181" NAME="__B000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="45" NAME="LOADMODULE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="185" NAME="GLOBALDOSFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="203" NAME="DEBUGBREAK" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="337" NAME="ISBADSTRINGPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="LOCALREALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="LOCALHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="89" NAME="LSTRCAT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="GLOBALHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="195" NAME="__C000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="182" NAME="__B800H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="86" NAME="_LWRITE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="LOCALALLOC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="205" NAME="CVWBREAK" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="GETVERSION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="123" NAME="KBDRST" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="109" NAME="SWITCHSTACKBACK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="155" NAME="GETTASKDS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="179" NAME="__D000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="54" NAME="GETINSTANCEDATA" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="73" NAME="GETATOMHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="71" NAME="DELETEATOM" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="125" NAME="DISABLEKERNEL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="190" NAME="__E000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="67" NAME="SETRESOURCEHANDLER" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="61" NAME="LOADRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="355" NAME="GETWINDEBUGINFO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="325" NAME="LOGPARAMERROR" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="175" NAME="ALLOCSELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="91" NAME="INITTASK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="140" NAME="SETSIGHANDLER" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="136" NAME="GETDRIVETYPE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="194" NAME="__F000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="57" NAME="GETPROFILEINT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="46" NAME="FREEMODULE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="69" NAME="FINDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="106" NAME="SETSWAPAREASIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="LOCALNOTIFY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="332" NAME="THHOOK" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="315" NAME="WRITEOUTPROFILES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="196" NAME="SELECTORACCESSRIGHTS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="133" NAME="GETEXEPTR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="334" NAME="ISBADREADPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="324" NAME="LOGERROR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="157" NAME="GETCURPID" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="62" NAME="LOCKRESOURCE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="POSTEVENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="GLOBALREALLOC" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="356" NAME="SETWINDEBUGINFO" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="323" NAME="ISROMMODULE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="17" NAME="GLOBALFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="186" NAME="GETSELECTORBASE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="41" NAME="ENABLEDOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="FATALEXIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="103" NAME="NETBIOSCALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="116" NAME="INITLIB" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="75" NAME="OPENPATHNAME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="49" NAME="GETMODULEFILENAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="63" NAME="FREERESOURCE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="207" NAME="ISDBCSLEADBYTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="LOCALFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="314" NAME="DEBUGDEFINESEGMENT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="160" NAME="EMSCOPY" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="70" NAME="ADDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="66" NAME="ALLOCRESOURCE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="336" NAME="ISBADCODEPTR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="154" NAME="GLOBALNOTIFY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="349" NAME="_HREAD" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="176" NAME="FREESELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="172" NAME="ALLOCALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="187" NAME="SETSELECTORBASE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="24" NAME="UNLOCKSEGMENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="206" NAME="ALLOCSELECTORARRAY" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="178" NAME="__WINFLAGS" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="108" NAME="SWITCHSTACKTO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="GLOBALALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="29" NAME="YIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="48" NAME="GETMODULEUSAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="118" NAME="GETTASKQUEUEDS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="94" NAME="DEFINEHANDLETABLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="82" NAME="_LREAD" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="119" NAME="GETTASKQUEUEES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="60" NAME="FINDRESOURCE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="342" NAME="__GP" PURGE="-1" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/krnl386.exports b/Ghidra/Features/Base/data/symbols/win16/krnl386.exports
new file mode 100644
index 0000000000..0aae843212
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/krnl386.exports
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="krnl386.exe" PATH="KRNL386.EXE" DATE="Sun Jun 21 11:21:24 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="173" NAME="__ROMBIOS" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="GLOBALUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="184" NAME="GLOBALDOSALLOC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="127" NAME="GETPRIVATEPROFILEINT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="166" NAME="WINEXEC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="122" NAME="ISTASKLOCKED" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="99" NAME="GETLPERRMODE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="88" NAME="LSTRCPY" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="81" NAME="_LCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="335" NAME="ISBADWRITEPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="171" NAME="ALLOCDSTOCSALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="170" NAME="ALLOCCSTODSALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="137" NAME="FATALAPPEXIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="183" NAME="__0000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="GLOBALLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="161" NAME="LOCALCOUNTFREE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="193" NAME="__0040H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="42" NAME="DISABLEDOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="198" NAME="GLOBALUNFIX" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="120" NAME="UNDEFDYNLINK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="159" NAME="GLOBALHANDLENORIP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="85" NAME="_LOPEN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="141" NAME="INITTASK1" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="164" NAME="GLOBALLRUNEWEST" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="130" NAME="FILECDR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="55" NAME="CATCH" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="26" NAME="GLOBALFREEALL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="128" NAME="GETPRIVATEPROFILESTRING" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="339" NAME="DIAGQUERY" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="77" NAME="RESERVED1" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="78" NAME="RESERVED2" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="101" NAME="NOHOOKDOSCALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="79" NAME="RESERVED3" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="83" NAME="_LCREAT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="110" NAME="PATCHCODEHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="80" NAME="RESERVED4" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="87" NAME="RESERVED5" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="53" NAME="CALLPROCINSTANCE" PURGE="2147483647" COMMENT="" />
+ <EXPORT ORDINAL="341" NAME="TOOLHELPHOOK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="320" NAME="ISTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="318" NAME="FATALEXITHOOK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="126" NAME="MEMORYFREED" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="165" NAME="A20PROC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="51" NAME="MAKEPROCINSTANCE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="107" NAME="SETERRORMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="343" NAME="REGISTERWINOLDAPHOOK" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="204" NAME="SWAPRECORDING" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="158" NAME="ISWINOLDAPTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="84" NAME="_LLSEEK" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="33" NAME="LOCKCURRENTTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="319" NAME="FLUSHCACHEDFILEHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="316" NAME="GETFREEMEMINFO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="93" NAME="GETCODEHANDLE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="52" NAME="FREEPROCINSTANCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="152" NAME="GETNUMTASKS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="LOCALFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="LOCALSIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="192" NAME="GLOBALPAGEUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="346" NAME="ISBADHUGEREADPTR" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="163" NAME="GLOBALLRUOLDEST" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="25" NAME="GLOBALCOMPACT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="65" NAME="SIZEOFRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="LOCALLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="121" NAME="LOCALSHRINK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="105" NAME="GETEXEVERSION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="124" NAME="ENABLEKERNEL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="LOCALCOMPACT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="EXITKERNEL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="311" NAME="GETSETKERNELDOSPROC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="162" NAME="LOCALHEAPSIZE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="76" NAME="DELETEPATHNAME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="LOCALINIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="131" NAME="GETDOSENVIRONMENT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="WAITEVENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="117" NAME="OLDYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="100" NAME="VALIDATECODESEGMENTS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="36" NAME="GETCURRENTTASK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="134" NAME="GETWINDOWSDIRECTORY" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="129" NAME="WRITEPRIVATEPROFILESTRING" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="328" NAME="_DEBUGOUTPUT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="177" NAME="PRESTOCHANGOSELECTOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="104" NAME="GETCODEINFO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="95" NAME="LOADLIBRARY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="197" NAME="GLOBALFIX" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="191" NAME="GLOBALPAGELOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="403" NAME="K403" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="GLOBALSIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="404" NAME="K404" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="98" NAME="GETLASTDISKCHANGE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="340" NAME="DIAGOUTPUT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="LOCALUNLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="23" NAME="LOCKSEGMENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="200" NAME="VALIDATEFREESPACES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="35" NAME="GETTASKQUEUE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="338" NAME="HASGPHANDLER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="22" NAME="GLOBALFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="169" NAME="GETFREESPACE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="59" NAME="WRITEPROFILESTRING" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="188" NAME="GETSELECTORLIMIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="327" NAME="K327" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="111" NAME="GLOBALWIRE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="102" NAME="DOS3CALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="37" NAME="GETCURRENTPDB" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="348" NAME="HMEMCPY" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="180" NAME="LONGPTRADD" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="329" NAME="K329" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="74" NAME="OPENFILE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="32" NAME="SETPRIORITY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="202" NAME="REGISTERPTRACE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="151" NAME="WINOLDAPCALL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="112" NAME="GLOBALUNWIRE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="353" NAME="LSTRCPYN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="56" NAME="THROW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="96" NAME="FREELIBRARY" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="68" NAME="INITATOMTABLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="34" NAME="SETTASKQUEUE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="138" NAME="GETHEAPSPACES" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="47" NAME="GETMODULEHANDLE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="92" NAME="GETTEMPDRIVE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="354" NAME="GETAPPCOMPATFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="150" NAME="DIRECTEDYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="345" NAME="ISSHAREDSELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="189" NAME="SETSELECTORLIMIT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="199" NAME="SETHANDLECOUNT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="114" NAME="__AHINCR" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="72" NAME="GETATOMNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="139" NAME="DOSIGNAL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="115" NAME="OUTPUTDEBUGSTRING" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="28" NAME="GLOBALMASTERHANDLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="347" NAME="ISBADHUGEWRITEPTR" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="310" NAME="LOCALHANDLEDELTA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="113" NAME="__AHSHIFT" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="344" NAME="GETWINOLDAPHOOKS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="167" NAME="GETEXPWINVER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="58" NAME="GETPROFILESTRING" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="38" NAME="SETTASKSIGNALPROC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="326" NAME="ISROMFILE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="201" NAME="REPLACEINST" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="64" NAME="ACCESSRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="156" NAME="LIMITEMSPAGES" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="50" NAME="GETPROCADDRESS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="350" NAME="_HWRITE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="174" NAME="__A000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="90" NAME="LSTRLEN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="168" NAME="DIRECTRESALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="135" NAME="GETSYSTEMDIRECTORY" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="351" NAME="BUNNY_351" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="97" NAME="GETTEMPFILENAME" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="132" NAME="GETWINFLAGS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="181" NAME="__B000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="45" NAME="LOADMODULE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="185" NAME="GLOBALDOSFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="203" NAME="DEBUGBREAK" PURGE="2147483647" COMMENT="" />
+ <EXPORT ORDINAL="337" NAME="ISBADSTRINGPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="LOCALREALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="LOCALHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="89" NAME="LSTRCAT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="GLOBALHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="195" NAME="__C000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="182" NAME="__B800H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="86" NAME="_LWRITE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="LOCALALLOC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="205" NAME="CVWBREAK" PURGE="2147483647" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="GETVERSION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="123" NAME="KBDRST" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="109" NAME="SWITCHSTACKBACK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="155" NAME="GETTASKDS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="179" NAME="__D000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="54" NAME="GETINSTANCEDATA" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="73" NAME="GETATOMHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="71" NAME="DELETEATOM" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="125" NAME="DISABLEKERNEL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="190" NAME="__E000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="67" NAME="SETRESOURCEHANDLER" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="61" NAME="LOADRESOURCE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="355" NAME="GETWINDEBUGINFO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="325" NAME="LOGPARAMERROR" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="175" NAME="ALLOCSELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="91" NAME="INITTASK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="140" NAME="SETSIGHANDLER" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="136" NAME="GETDRIVETYPE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="194" NAME="__F000H" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="57" NAME="GETPROFILEINT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="46" NAME="FREEMODULE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="69" NAME="FINDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="106" NAME="SETSWAPAREASIZE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="LOCALNOTIFY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="332" NAME="THHOOK" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="315" NAME="WRITEOUTPROFILES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="196" NAME="SELECTORACCESSRIGHTS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="133" NAME="GETEXEPTR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="334" NAME="ISBADREADPTR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="324" NAME="LOGERROR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="157" NAME="GETCURPID" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="62" NAME="LOCKRESOURCE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="POSTEVENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="GLOBALREALLOC" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="356" NAME="SETWINDEBUGINFO" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="323" NAME="ISROMMODULE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="17" NAME="GLOBALFREE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="186" NAME="GETSELECTORBASE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="41" NAME="ENABLEDOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="FATALEXIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="103" NAME="NETBIOSCALL" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="116" NAME="INITLIB" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="75" NAME="OPENPATHNAME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="49" NAME="GETMODULEFILENAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="63" NAME="FREERESOURCE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="207" NAME="ISDBCSLEADBYTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="LOCALFLAGS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="314" NAME="DEBUGDEFINESEGMENT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="160" NAME="EMSCOPY" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="70" NAME="ADDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="66" NAME="ALLOCRESOURCE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="336" NAME="ISBADCODEPTR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="154" NAME="GLOBALNOTIFY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="349" NAME="_HREAD" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="176" NAME="FREESELECTOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="172" NAME="ALLOCALIAS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="187" NAME="SETSELECTORBASE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="24" NAME="UNLOCKSEGMENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="206" NAME="ALLOCSELECTORARRAY" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="178" NAME="__WINFLAGS" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="108" NAME="SWITCHSTACKTO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="GLOBALALLOC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="29" NAME="YIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="48" NAME="GETMODULEUSAGE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="118" NAME="GETTASKQUEUEDS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="94" NAME="DEFINEHANDLETABLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="82" NAME="_LREAD" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="119" NAME="GETTASKQUEUEES" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="60" NAME="FINDRESOURCE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="342" NAME="__GP" PURGE="-1" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/lzexpand.exports b/Ghidra/Features/Base/data/symbols/win16/lzexpand.exports
new file mode 100644
index 0000000000..43ddef8429
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/lzexpand.exports
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="lzexpand.dll" PATH="LZEXPAND.DLL" DATE="Sun Jun 21 11:21:26 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="5" NAME="LZREAD" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="LZCOPY" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="LZCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="LZINIT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="GETEXPANDEDNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="LZSEEK" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="LZOPENFILE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="COPYLZFILE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="LZDONE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="LZSTART" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="___EXPORTEDSTUB" PURGE="0" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/mmsystem.exports b/Ghidra/Features/Base/data/symbols/win16/mmsystem.exports
new file mode 100644
index 0000000000..57e97f2c86
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/mmsystem.exports
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="mmsystem.dll" PATH="MMSYSTEM.DLL" DATE="Sun Jun 21 11:21:26 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="211" NAME="MIDIOUTGETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="OUTPUTDEBUGSTR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="412" NAME="WAVEOUTGETPOSITION" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="304" NAME="MIDIINOPEN" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="1226" NAME="MMIORENAME" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="353" NAME="AUXSETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="210" NAME="MIDIOUTRESET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="900" NAME="MMTASKCREATE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="32" NAME="STACKENTER" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="212" NAME="MIDIOUTSETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="502" NAME="WAVEINGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="215" NAME="MIDIOUTGETID" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="109" NAME="JOYSETCALIBRATION" PURGE="26" COMMENT="" />
+ <EXPORT ORDINAL="1103" NAME="DRVGETMODULEHANDLE" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="213" NAME="MIDIOUTCACHEPATCHES" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="903" NAME="MMTASKSIGNAL" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="303" NAME="MIDIINGETERRORTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="511" NAME="WAVEINRESET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="207" NAME="MIDIOUTUNPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1212" NAME="MMIOREAD" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="706" NAME="MCIGETERRORSTRING" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="404" NAME="WAVEOUTOPEN" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="350" NAME="AUXGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="103" NAME="JOYGETPOS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="101" NAME="JOYGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="1101" NAME="DRVCLOSE" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="201" NAME="MIDIOUTGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="206" NAME="MIDIOUTPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1219" NAME="MMIOADVANCE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="354" NAME="AUXOUTMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="605" NAME="TIMEBEGINPERIOD" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="421" NAME="WAVEOUTMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="310" NAME="MIDIINSTOP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="715" NAME="MCIGETDEVICEIDFROMELEMENTID" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="402" NAME="WAVEOUTGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="602" NAME="TIMESETEVENT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="1223" NAME="MMIODESCEND" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="208" NAME="MIDIOUTSHORTMSG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="507" NAME="WAVEINUNPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="509" NAME="WAVEINSTART" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="313" NAME="MIDIINMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="SNDPLAYSOUND" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="205" NAME="MIDIOUTCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1214" NAME="MMIOSEEK" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="308" NAME="MIDIINADDBUFFER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1225" NAME="MMIOCREATECHUNK" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="513" NAME="WAVEINGETID" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="105" NAME="JOYRELEASECAPTURE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="902" NAME="MMTASKBLOCK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1104" NAME="DRVDEFDRIVERPROC" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="505" NAME="WAVEINCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="301" NAME="MIDIINGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="403" NAME="WAVEOUTGETERRORTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="702" NAME="MCISENDSTRING" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="711" NAME="MCIDRIVERNOTIFY" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="1211" NAME="MMIOCLOSE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="306" NAME="MIDIINPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="106" NAME="JOYSETCAPTURE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1220" NAME="MMIOSTRINGTOFOURCC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="1210" NAME="MMIOOPEN" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="415" NAME="WAVEOUTGETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="504" NAME="WAVEINOPEN" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="413" NAME="WAVEOUTGETPITCH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="512" NAME="WAVEINGETPOSITION" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="607" NAME="TIMEGETTIME" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="606" NAME="TIMEENDPERIOD" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="411" NAME="WAVEOUTRESET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1221" NAME="MMIOINSTALLIOPROC" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="1213" NAME="MMIOWRITE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="416" NAME="WAVEOUTSETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="209" NAME="MIDIOUTLONGMSG" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="302" NAME="MIDIINGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="420" NAME="WAVEOUTGETID" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="414" NAME="WAVEOUTSETPITCH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="904" NAME="MMGETCURRENTTASK" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="604" NAME="TIMEGETDEVCAPS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="104" NAME="JOYGETTHRESHOLD" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="1100" NAME="DRVOPEN" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="710" NAME="MCIDRIVERYIELD" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="MMSYSTEMGETVERSION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="1222" NAME="MMIOSENDMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="107" NAME="JOYSETTHRESHOLD" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="410" NAME="WAVEOUTRESTART" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="704" NAME="MCIPARSECOMMAND" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="1215" NAME="MMIOGETINFO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="503" NAME="WAVEINGETERRORTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="712" NAME="MCIEXECUTE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="311" NAME="MIDIINRESET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="717" NAME="MCIGETCREATORTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="407" NAME="WAVEOUTUNPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="716" NAME="MCIGETYIELDPROC" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="703" NAME="MCIGETDEVICEID" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="419" NAME="WAVEOUTBREAKLOOP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1218" NAME="MMIOFLUSH" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="204" NAME="MIDIOUTOPEN" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="33" NAME="STACKLEAVE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="714" NAME="MCISETYIELDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="401" NAME="WAVEOUTGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="1216" NAME="MMIOSETINFO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="406" NAME="WAVEOUTPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="351" NAME="AUXGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1102" NAME="DRVSENDMESSAGE" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="102" NAME="JOYGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="510" NAME="WAVEINSTOP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="216" NAME="MIDIOUTMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="1224" NAME="MMIOASCEND" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="202" NAME="MIDIOUTGETDEVCAPS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="1217" NAME="MMIOSETBUFFER" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="601" NAME="TIMEGETSYSTEMTIME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="603" NAME="TIMEKILLEVENT" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="307" NAME="MIDIINUNPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="214" NAME="MIDIOUTCACHEDRUMPATCHES" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="417" NAME="WAVEOUTGETPLAYBACKRATE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="309" NAME="MIDIINSTART" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="DRIVERCALLBACK" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="514" NAME="WAVEINMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="34" NAME="MMDRVINSTALL" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="405" NAME="WAVEOUTCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="508" NAME="WAVEINADDBUFFER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="418" NAME="WAVEOUTSETPLAYBACKRATE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="708" NAME="MCIGETDRIVERDATA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="312" NAME="MIDIINGETID" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="705" NAME="MCILOADCOMMANDRESOURCE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="409" NAME="WAVEOUTPAUSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="408" NAME="WAVEOUTWRITE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="707" NAME="MCISETDRIVERDATA" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="501" NAME="WAVEINGETNUMDEVS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="305" NAME="MIDIINCLOSE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="203" NAME="MIDIOUTGETERRORTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="905" NAME="MMTASKYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="506" NAME="WAVEINPREPAREHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="701" NAME="MCISENDCOMMAND" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="352" NAME="AUXGETVOLUME" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="713" NAME="MCIFREECOMMANDRESOURCE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="DRIVERPROC" PURGE="16" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/toolhelp.exports b/Ghidra/Features/Base/data/symbols/win16/toolhelp.exports
new file mode 100644
index 0000000000..b623fad135
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/toolhelp.exports
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="toolhelp.dll" PATH="TOOLHELP.DLL" DATE="Sun Jun 21 11:21:28 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="81" NAME="TASKSETCSIP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="72" NAME="MEMMANINFO" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="66" NAME="STACKTRACEFIRST" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="79" NAME="MEMORYWRITE" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="53" NAME="GLOBALINFO" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="64" NAME="TASKNEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="70" NAME="CLASSNEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="54" NAME="GLOBALENTRYHANDLE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="50" NAME="GLOBALHANDLETOSEL" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="75" NAME="INTERRUPTREGISTER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="67" NAME="STACKTRACECSIPFIRST" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="58" NAME="LOCALNEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="76" NAME="INTERRUPTUNREGISTER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="60" NAME="MODULENEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="56" NAME="LOCALINFO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="65" NAME="TASKFINDHANDLE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="83" NAME="TASKSWITCH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="78" NAME="MEMORYREAD" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="73" NAME="NOTIFYREGISTER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="52" NAME="GLOBALNEXT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="80" NAME="TIMERCOUNT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="62" NAME="MODULEFINDHANDLE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="59" NAME="MODULEFIRST" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="55" NAME="GLOBALENTRYMODULE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="68" NAME="STACKTRACENEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="51" NAME="GLOBALFIRST" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="71" NAME="SYSTEMHEAPINFO" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="77" NAME="TERMINATEAPP" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="63" NAME="TASKFIRST" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="74" NAME="NOTIFYUNREGISTER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="82" NAME="TASKGETCSIP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="69" NAME="CLASSFIRST" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="61" NAME="MODULEFINDNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="57" NAME="LOCALFIRST" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="WEP" PURGE="2" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/user.exports b/Ghidra/Features/Base/data/symbols/win16/user.exports
new file mode 100644
index 0000000000..2252569b12
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/user.exports
@@ -0,0 +1,417 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="user.exe" PATH="USER.EXE" DATE="Sun Jun 21 01:41:38 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="525" NAME="WNETCONNECTDIALOG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="465" NAME="DRAGDETECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="372" NAME="GETINTERNALICONHEADER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="404" NAME="GETCLASSINFO" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="292" NAME="UNHOOKWINDOWSHOOKEX" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="175" NAME="LOADBITMAP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="88" NAME="ENDDIALOG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="272" NAME="ISZOOMED" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="255" NAME="DEFDRIVERPROC" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="168" NAME="SETCARETBLINKTIME" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="147" NAME="SETCLIPBOARDVIEWER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="43" NAME="CLOSEWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="518" NAME="WNETCANCELCONNECTION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="423" NAME="DLGDIRSELECTCOMBOBOXEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="58" NAME="GETCLASSNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="51" NAME="BEAR51" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="314" NAME="SIGNALPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="261" NAME="ENDDEFERWINDOWPOS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="191" NAME="CHILDWINDOWFROMPOINT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="454" NAME="ADJUSTWINDOWRECTEX" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="136" NAME="SETWINDOWLONG" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="247" NAME="GETCURSOR" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="524" NAME="WNETWRITEJOB" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="282" NAME="SELECTPALETTE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="22" NAME="SETFOCUS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="421" NAME="WVSPRINTF" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="38" NAME="GETWINDOWTEXTLENGTH" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="481" NAME="HARDWARE_EVENT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="109" NAME="PEEKMESSAGE" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="505" NAME="WNETRELEASEJOB" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="240" NAME="DIALOGBOXINDIRECTPARAM" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="116" NAME="POSTAPPMESSAGE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="27" NAME="ENUMPROPS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="83" NAME="FRAMERECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="432" NAME="ANSILOWER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="235" NAME="DEFHOOKPROC" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="151" NAME="CREATEMENU" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="331" NAME="ENABLEHARDWAREINPUT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="133" NAME="GETWINDOWWORD" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="41" NAME="CREATEWINDOW" PURGE="34" COMMENT="" />
+ <EXPORT ORDINAL="499" NAME="WNETERRORTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="463" NAME="SCROLLCHILDREN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="273" NAME="CONTROLPANELINFO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="155" NAME="ENABLEMENUITEM" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="252" NAME="OPENDRIVER" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="91" NAME="GETDLGITEM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="288" NAME="GETMESSAGEEXTRAINFO" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="86" NAME="BEAR86" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="515" NAME="WNETBROWSEDIALOG" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="501" NAME="WNETOPENJOB" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="471" NAME="LSTRCMPI" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="358" NAME="ISMENU" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="326" NAME="GETCONTROLBRUSH" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="47" NAME="ISWINDOW" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="420" NAME="_WSPRINTF" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="289" NAME="KEYBD_EVENT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="69" NAME="SETCURSOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="413" NAME="DELETEMENU" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="264" NAME="GETMENUITEMID" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="198" NAME="CASCADECHILDWINDOWS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="483" NAME="SYSTEMPARAMETERSINFO" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="249" NAME="GETASYNCKEYSTATE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="68" NAME="RELEASEDC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="472" NAME="ANSINEXT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="211" NAME="CLEARCOMMBREAK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="POSTQUITMESSAGE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="166" NAME="HIDECARET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="7" NAME="EXITWINDOWS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="MESSAGEBOX" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="335" NAME="GETINPUTSTATE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="408" NAME="CREATECURSORICONINDIRECT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="319" NAME="SCROLLWINDOWEX" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="246" NAME="EXITWINDOWSEXEC" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="163" NAME="CREATECARET" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="124" NAME="UPDATEWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="290" NAME="REDRAWWINDOW" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="176" NAME="LOADSTRING" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="137" NAME="OPENCLIPBOARD" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="66" NAME="GETDC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="13" NAME="GETTICKCOUNT" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="134" NAME="SETWINDOWWORD" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="67" NAME="GETWINDOWDC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="457" NAME="DESTROYICON" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="100" NAME="DLGDIRLIST" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="222" NAME="GETKEYBOARDSTATE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="143" NAME="COUNTCLIPBOARDFORMATS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="112" NAME="WAITMESSAGE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="504" NAME="WNETHOLDJOB" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="15" NAME="GETCURRENTTIME" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="470" NAME="STRINGFUNC" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="530" NAME="WNETGETDIRECTORYTYPE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="400" NAME="FINALUSERINIT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="187" NAME="ENDMENU" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="75" NAME="ISRECTEMPTY" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="462" NAME="CALCCHILDSCROLL" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="373" NAME="SUBTRACTRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="299" NAME="MOUSE_EVENT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="119" NAME="GETMESSAGEPOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="204" NAME="READCOMM" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="138" NAME="CLOSECLIPBOARD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="131" NAME="GETCLASSLONG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="230" NAME="GETNEXTWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="189" NAME="GETSYSMODALWINDOW" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="160" NAME="DRAWMENUBAR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="325" NAME="PAINTRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="269" NAME="GLOBALDELETEATOM" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="259" NAME="BEGINDEFERWINDOWPOS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="185" NAME="GRAYSTRING" PURGE="22" COMMENT="" />
+ <EXPORT ORDINAL="81" NAME="FILLRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="77" NAME="OFFSETRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="266" NAME="SETMESSAGEQUEUE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="104" NAME="MESSAGEBEEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="519" NAME="WNETGETERROR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="332" NAME="USERYIELD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="512" NAME="WNETGETCONNECTION" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="256" NAME="GETDRIVERINFO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="174" NAME="LOADICON" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="291" NAME="SETWINDOWSHOOKEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="173" NAME="LOADCURSOR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="161" NAME="GETMENUSTRING" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="57" NAME="REGISTERCLASS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="522" NAME="WNETDISABLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="322" NAME="WINOLDAPPHACKOMATIC" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="336" NAME="LOADCURSORICONHANDLER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="232" NAME="SETWINDOWPOS" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="202" NAME="GETCOMMSTATE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="INITAPP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="258" NAME="MAPWINDOWPOINTS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="223" NAME="SETKEYBOARDSTATE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="514" NAME="WNETDEVICEMODE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="466" NAME="DRAWFOCUSRECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="197" NAME="GETTABBEDTEXTEXTENT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="156" NAME="GETSYSTEMMENU" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="78" NAME="INFLATERECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="510" NAME="WNETLOCKQUEUEDATA" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="414" NAME="MODIFYMENU" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="412" NAME="REMOVEMENU" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="214" NAME="ESCAPECOMMFUNCTION" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="118" NAME="REGISTERWINDOWMESSAGE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="49" NAME="ISWINDOWVISIBLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="111" NAME="SENDMESSAGE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="194" NAME="DLGDIRSELECTCOMBOBOX" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="411" NAME="APPENDMENU" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="54" NAME="ENUMWINDOWS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="422" NAME="DLGDIRSELECTEX" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="150" NAME="LOADMENU" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="132" NAME="SETCLASSLONG" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="84" NAME="DRAWICON" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="53" NAME="DESTROYWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="415" NAME="CREATEPOPUPMENU" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="437" NAME="ANSIUPPERBUFF" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="188" NAME="SETSYSMODALWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="102" NAME="ADJUSTWINDOWRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="321" NAME="SETEVENTHOOK" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="60" NAME="GETACTIVEWINDOW" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="218" NAME="DIALOGBOXINDIRECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="403" NAME="UNREGISTERCLASS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="40" NAME="ENDPAINT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="164" NAME="DESTROYCARET" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="324" NAME="FILLWINDOW" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="203" NAME="GETCOMMERROR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="98" NAME="ISDLGBUTTONCHECKED" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="201" NAME="SETCOMMSTATE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="172" NAME="SWITCHTOTHISWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="113" NAME="TRANSLATEMESSAGE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="506" NAME="WNETCANCELJOB" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="24" NAME="REMOVEPROP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="108" NAME="GETMESSAGE" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="280" NAME="SETSYSTEMMENU" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="171" NAME="WINHELP" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="341" NAME="_FFFE_FARFRAME" PURGE="-1" COMMENT="" />
+ <EXPORT ORDINAL="333" NAME="ISUSERIDLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="65" NAME="GETSCROLLRANGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="309" NAME="GETCLIPCURSOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="159" NAME="GETSUBMENU" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="97" NAME="CHECKDLGBUTTON" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="50" NAME="FINDWINDOW" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="245" NAME="ENABLECOMMNOTIFICATION" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="52" NAME="ANYPOPUP" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="276" NAME="LOCKMYTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="152" NAME="DESTROYMENU" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="76" NAME="PTINRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="14" NAME="GETTIMERRESOLUTION" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="19" NAME="RELEASECAPTURE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="213" NAME="BUILDCOMMDCB" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="190" NAME="GETUPDATERECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="181" NAME="SETSYSCOLORS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="142" NAME="GETCLIPBOARDDATA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="129" NAME="GETCLASSWORD" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="63" NAME="GETSCROLLPOS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="59" NAME="SETACTIVEWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="456" NAME="LOADICONHANDLER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="268" NAME="GLOBALADDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="238" NAME="EXCLUDEUPDATERGN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="89" NAME="CREATEDIALOG" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="80" NAME="UNIONRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="220" NAME="LOADMENUINDIRECT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="16" NAME="CLIPCURSOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="186" NAME="SWAPMOUSEBUTTON" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="139" NAME="EMPTYCLIPBOARD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="30" NAME="WINDOWFROMPOINT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="103" NAME="MAPDIALOGRECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="236" NAME="GETCAPTURE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="162" NAME="HILITEMENUITEM" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="438" NAME="ANSILOWERBUFF" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="287" NAME="GETLASTACTIVEPOPUP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="207" NAME="CLOSECOMM" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="217" NAME="LOOKUPMENUHANDLE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="44" NAME="OPENICON" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="61" NAME="SCROLLWINDOW" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="46" NAME="GETPARENT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="221" NAME="SCROLLDC" PURGE="20" COMMENT="" />
+ <EXPORT ORDINAL="199" NAME="TILECHILDWINDOWS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="527" NAME="WNETCONNECTIONDIALOG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="179" NAME="GETSYSTEMMETRICS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="146" NAME="GETCLIPBOARDFORMATNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="128" NAME="VALIDATERGN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="64" NAME="SETSCROLLRANGE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="532" NAME="WNETGETPROPERTYTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="254" NAME="GETDRIVERMODULEHANDLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="90" NAME="ISDIALOGMESSAGE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="359" NAME="GETDCEX" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="239" NAME="DIALOGBOXPARAM" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="226" NAME="LOCKINPUT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="74" NAME="COPYRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="418" NAME="SETMENUITEMBITMAPS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="262" NAME="GETWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="250" NAME="GETMENUSTATE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="72" NAME="SETRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="231" NAME="GETSYSTEMDEBUGSTATE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="154" NAME="CHECKMENUITEM" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="12" NAME="KILLTIMER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="144" NAME="ENUMCLIPBOARDFORMATS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="141" NAME="SETCLIPBOARDDATA" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="130" NAME="SETCLASSWORD" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="62" NAME="SETSCROLLPOS" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="212" NAME="UNGETCOMMCHAR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="205" NAME="WRITECOMM" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="31" NAME="ISICONIC" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="362" NAME="DCHOOK" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="200" NAME="OPENCOMM" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="436" NAME="ISCHARLOWER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="114" NAME="DISPATCHMESSAGE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="417" NAME="GETMENUCHECKMARKDIMENSIONS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="402" NAME="GETPRIORITYCLIPBOARDFORMAT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="18" NAME="SETCAPTURE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="455" NAME="GETICONID" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="278" NAME="GETDESKTOPHWND" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="526" NAME="WNETDISCONNECTDIALOG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="219" NAME="CREATEDIALOGINDIRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="243" NAME="GETDIALOGBASEUNITS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="209" NAME="GETCOMMEVENTMASK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="25" NAME="GETPROP" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="127" NAME="VALIDATERECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="233" NAME="SETPARENT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="229" NAME="GETTOPWINDOW" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="107" NAME="DEFWINDOWPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="140" NAME="GETCLIPBOARDOWNER" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="42" NAME="SHOWWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="OLDEXITWINDOWS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="523" NAME="WNETRESTORECONNECTION" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="157" NAME="GETMENU" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="122" NAME="CALLWINDOWPROC" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="105" NAME="FLASHWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="193" NAME="ISCLIPBOARDFORMATAVAILABLE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="35" NAME="ISWINDOWENABLED" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="248" NAME="GETOPENCLIPBOARDWINDOW" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="521" NAME="WNETENABLE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="178" NAME="TRANSLATEACCELERATOR" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="167" NAME="SHOWCARET" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="528" NAME="WNETVIEWQUEUEDIALOG" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="482" NAME="ENABLESCROLLBAR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="73" NAME="SETRECTEMPTY" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="237" NAME="GETUPDATERGN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="33" NAME="GETCLIENTRECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="320" NAME="SYSERRORBOX" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="234" NAME="UNHOOKWINDOWSHOOK" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="182" NAME="BEAR182" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="121" NAME="SETWINDOWSHOOK" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="257" NAME="GETNEXTDRIVER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="241" NAME="CREATEDIALOGPARAM" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="125" NAME="INVALIDATERECT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="460" NAME="GETINTERNALWINDOWPOS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="224" NAME="GETWINDOWTASK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="21" NAME="GETDOUBLECLICKTIME" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="433" NAME="ISCHARALPHA" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="306" NAME="BEAR306" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="99" NAME="DLGDIRSELECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="294" NAME="LOCKWINDOWUPDATE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="208" NAME="SETCOMMEVENTMASK" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="26" NAME="SETPROP" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="277" NAME="GETDLGCTRLID" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="110" NAME="POSTMESSAGE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="244" NAME="EQUALRECT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="445" NAME="DEFFRAMEPROC" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="SETTIMER" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="430" NAME="LSTRCMP" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="356" NAME="LOADDIBCURSORHANDLER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="192" NAME="INSENDMESSAGE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="158" NAME="SETMENU" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="115" NAME="REPLYMESSAGE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="17" NAME="GETCURSORPOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="464" NAME="DRAGOBJECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="434" NAME="ISCHARALPHANUMERIC" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="215" NAME="FLUSHCOMM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="101" NAME="SENDDLGITEMMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="517" NAME="WNETADDCONNECTION" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="96" NAME="CHECKRADIOBUTTON" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="39" NAME="BEGINPAINT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="509" NAME="WNETUNWATCHQUEUE" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="447" NAME="DEFMDICHILDPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="95" NAME="GETDLGITEMINT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="459" NAME="DUMPICON" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="216" NAME="USERSEEUSERDO" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="195" NAME="DLGDIRLISTCOMBOBOX" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="410" NAME="INSERTMENU" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="71" NAME="SHOWCURSOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="206" NAME="TRANSMITCOMMCHAR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="271" NAME="GLOBALGETATOMNAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="285" NAME="BEAR285" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="265" NAME="SHOWOWNEDPOPUPS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="153" NAME="CHANGEMENU" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="461" NAME="SETINTERNALWINDOWPOS" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="406" NAME="CREATECURSOR" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="20" NAME="SETDOUBLECLICKTIME" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="452" NAME="CREATEWINDOWEX" PURGE="34" COMMENT="" />
+ <EXPORT ORDINAL="368" NAME="COPYICON" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="85" NAME="DRAWTEXT" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="48" NAME="ISCHILD" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="369" NAME="COPYCURSOR" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="32" NAME="GETWINDOWRECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="473" NAME="ANSIPREV" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="308" NAME="DEFDLGPROC" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="183" NAME="GETCARETPOS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="55" NAME="ENUMCHILDWINDOWS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="260" NAME="DEFERWINDOWPOS" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="513" NAME="WNETGETCAPS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="284" NAME="GETFREESYSTEMRESOURCES" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="242" NAME="CREATEDIALOGINDIRECTPARAM" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="225" NAME="ENUMTASKWINDOWS" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="516" NAME="WNETGETUSER" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="416" NAME="TRACKPOPUPMENU" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="227" NAME="GETNEXTDLGGROUPITEM" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="435" NAME="ISCHARUPPER" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="253" NAME="CLOSEDRIVER" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="267" NAME="SHOWSCROLLBAR" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="210" NAME="SETCOMMBREAK" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="70" NAME="SETCURSORPOS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="184" NAME="QUERYSENDMESSAGE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="123" NAME="CALLMSGFILTER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="87" NAME="DIALOGBOX" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="337" NAME="GETMOUSEEVENTPROC" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="DISABLEOEMLAYER" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="56" NAME="MOVEWINDOW" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="29" NAME="SCREENTOCLIENT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="28" NAME="CLIENTTOSCREEN" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="283" NAME="REALIZEPALETTE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="94" NAME="SETDLGITEMINT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="458" NAME="DESTROYCURSOR" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="407" NAME="CREATEICON" PURGE="18" COMMENT="" />
+ <EXPORT ORDINAL="196" NAME="TABBEDTEXTOUT" PURGE="20" COMMENT="" />
+ <EXPORT ORDINAL="177" NAME="LOADACCELERATORS" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="34" NAME="ENABLEWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="ENABLEOEMLAYER" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="293" NAME="CALLNEXTHOOKEX" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="507" NAME="WNETSETJOBCOPIES" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="480" NAME="GETUSERLOCALOBJTYPE" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="165" NAME="SETCARETPOS" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="343" NAME="GETFILEPORTNAME" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="508" NAME="WNETWATCHQUEUE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="120" NAME="GETMESSAGETIME" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="36" NAME="GETWINDOWTEXT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="370" NAME="GETWINDOWPLACEMENT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="93" NAME="GETDLGITEMTEXT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="274" NAME="GETNEXTQUEUEWINDOW" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="82" NAME="INVERTRECT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="529" NAME="WNETPROPERTYDIALOG" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="357" NAME="LOADDIBICONHANDLER" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="180" NAME="GETSYSCOLOR" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="270" NAME="GLOBALFINDATOM" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="228" NAME="GETNEXTDLGTABITEM" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="169" NAME="GETCARETBLINKTIME" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="503" NAME="WNETABORTJOB" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="148" NAME="GETCLIPBOARDVIEWER" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="106" NAME="GETKEYSTATE" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="301" NAME="BOZOSLIVEHERE" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="263" NAME="GETMENUITEMCOUNT" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="145" NAME="REGISTERCLIPBOARDFORMAT" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="135" NAME="GETWINDOWLONG" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="286" NAME="GETDESKTOPWINDOW" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="279" NAME="OLDSETDESKPATTERN" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="334" NAME="GETQUEUESTATUS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="126" NAME="INVALIDATERGN" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="23" NAME="GETFOCUS" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="431" NAME="ANSIUPPER" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="251" NAME="SENDDRIVERMESSAGE" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="45" NAME="BRINGWINDOWTOTOP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="511" NAME="WNETUNLOCKQUEUEDATA" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="275" NAME="REPAINTSCREEN" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="170" NAME="ARRANGEICONICWINDOWS" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="79" NAME="INTERSECTRECT" PURGE="12" COMMENT="" />
+ <EXPORT ORDINAL="502" NAME="WNETCLOSEJOB" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="323" NAME="GETMESSAGE2" PURGE="14" COMMENT="" />
+ <EXPORT ORDINAL="451" NAME="TRANSLATEMDISYSACCEL" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="37" NAME="SETWINDOWTEXT" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="531" NAME="WNETDIRECTORYNOTIFY" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="371" NAME="SETWINDOWPLACEMENT" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="149" NAME="CHANGECLIPBOARDCHAIN" PURGE="4" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="BEAR11" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="520" NAME="WNETGETERRORTEXT" PURGE="10" COMMENT="" />
+ <EXPORT ORDINAL="92" NAME="SETDLGITEMTEXT" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="484" NAME="__GP" PURGE="-1" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/ver.exports b/Ghidra/Features/Base/data/symbols/win16/ver.exports
new file mode 100644
index 0000000000..c2fa210725
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/ver.exports
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="ver.dll" PATH="VER.DLL" DATE="Sun Jun 21 11:21:26 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="7" NAME="GETFILEVERSIONINFO" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="2" NAME="GETFILERESOURCESIZE" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="11" NAME="VERQUERYVALUE" PURGE="16" COMMENT="" />
+ <EXPORT ORDINAL="8" NAME="VERFINDFILE" PURGE="30" COMMENT="" />
+ <EXPORT ORDINAL="10" NAME="VERLANGUAGENAME" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="6" NAME="GETFILEVERSIONINFOSIZE" PURGE="8" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="GETFILERESOURCE" PURGE="24" COMMENT="" />
+ <EXPORT ORDINAL="9" NAME="VERINSTALLFILE" PURGE="30" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="WEP" PURGE="2" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/data/symbols/win16/win87em.exports b/Ghidra/Features/Base/data/symbols/win16/win87em.exports
new file mode 100644
index 0000000000..4085a7e12e
--- /dev/null
+++ b/Ghidra/Features/Base/data/symbols/win16/win87em.exports
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LIBRARY NAME="win87em.dll" PATH="WIN87EM.DLL" DATE="Sun Jun 21 11:21:28 EDT 2020" VERSION="">
+ <EXPORT ORDINAL="2" NAME="WEP" PURGE="2" COMMENT="" />
+ <EXPORT ORDINAL="1" NAME="__FPMATH" PURGE="0" COMMENT="" />
+ <EXPORT ORDINAL="3" NAME="__WIN87EMINFO" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="4" NAME="__WIN87EMRESTORE" PURGE="6" COMMENT="" />
+ <EXPORT ORDINAL="5" NAME="__WIN87EMSAVE" PURGE="6" COMMENT="" />
+</LIBRARY>
+
diff --git a/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/importer.htm b/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/importer.htm
index f06baf5dc6..534d1bca12 100644
--- a/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/importer.htm
+++ b/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/importer.htm
@@ -32,6 +32,8 @@
<LI>Common Object File Format (COFF)</LI>
<LI>Debug Symbols (DBG)</LI>
+
+ <LI>DYLD Shared Cache</LI>
<LI>Executable and Linking Format (ELF)</LI>
@@ -259,7 +261,7 @@
<H3>Common Options <A name="Common_Options"></A></H3>
<BLOCKQUOTE>
- <P>These options appear many of the standard executable program formats such as ELF, PE,
+ <P>These options appear in many of the standard executable program formats such as ELF, PE,
etc.</P>
<H4>Apply Processor Defined Labels</H4>
@@ -280,38 +282,32 @@
off, the symbols will move with the image base or the memory block.</P>
</BLOCKQUOTE>
- <H4>Create Export Symbol Files</H4>
+ <H4>Load Local Libraries</H4>
<BLOCKQUOTE>
- <P>Creates symbol files for each library used by an executable. The symbol file will
- contain stack purge information for each exported symbol in the library. The symbol files
- will be stored in <CODE>&lt;GHIDRA_INSTALL_DIR&gt;/Ghidra/Features/Base/data/symbols/&lt;OS&gt;</CODE>.</P>
-
- <P><IMG alt="" src="../../shared/note.yellow.png"> When running Ghidra with .symbols files
- created from an older operating system, you may receive the following warning
- message:</P>
-
- <BLOCKQUOTE>
- <P><I>Unable to locate [<CODE>symbol_name</CODE>] in
- [<CODE>&lt;filepath&gt;.exports</CODE>].
- Please verify the version is correct.</I></P>
- </BLOCKQUOTE>
-
- <P>This warning message indicates which symbols do not exist in the corresponding
- <I>.exports</I> file. The only information lost by not including these symbols is
- function purge and comments. If you require this information, manually delete the
- <I>.exports</I> file and Ghidra will regenerate it.</P>
+ <P>Searches the executable's directory to recursively resolve the external libraries used
+ by the executable. The entire library dependency tree will be traversed in a depth-first
+ manner and a program will be created for each found library (if it doesn't exist already).
+ The <A href="help/topics/ReferencesPlugin/References_from.htm#extRefs">external references</A>
+ in these programs will be resolved.<BR>
</BLOCKQUOTE>
+
+ <H4>Load System Libraries</H4>
- <H4>Load External Libraries</H4>
+ <BLOCKQUOTE>
+ <P>Searches a user-defined path list to recursively resolve the external libraries used
+ by the executable. The entire library dependency tree will be traversed in a depth-first
+ manner and a program will be created for each found library (if it doesn't exist already).
+ The <A href="help/topics/ReferencesPlugin/References_from.htm#extRefs">external references</A>
+ in these program will be resolved.<BR>
+ The "Edit Paths" button will bring up the <A href="#Library_Paths">Library Paths Dialog</A></P>
+ </BLOCKQUOTE>
+
+ <H4>Recursive Library Load Depth</H4>
<BLOCKQUOTE>
- <P>Recursively resolves the external libraries used by the executable. The entire library
- dependency tree will be traversed in a depth-first manner and a program will be created
- for each library. The <A href=
- "help/topics/ReferencesPlugin/References_from.htm#extRefs">external references</A> in
- these program will be resolved.<BR>
- The "..." button will bring up the <A href="#Library_Paths">Library Paths Dialog</A></P>
+ <P>Specifies how many levels deep the depth-first library dependency tree will be
+ traversed when loading local or system libraries.</P>
</BLOCKQUOTE>
</BLOCKQUOTE>
@@ -352,13 +348,6 @@
the program is run. These sections will not be stored in a special address space called
"other".</P>
</BLOCKQUOTE>
-
- <H4>Fixup Unresolved External Symbols</H4>
-
- <BLOCKQUOTE>
- <P>If selected, Ghidra will attemp to resolve external references against other programs
- already imported into Ghidra that are in the destination folder for this import.</P>
- </BLOCKQUOTE>
</BLOCKQUOTE>
<H3>Intel Hex Options<A name="Options_Intel_Hex"/></H3>
@@ -374,7 +363,7 @@
<H4>Overlay</H4>
<BLOCKQUOTE>
- <P>If selected, the bytes will be loaded as an initiailized overlay block. A new overlay space will be
+ <P>If selected, the bytes will be loaded as an initialized overlay block. A new overlay space will be
created with the same name as the Block Name.</P>
</BLOCKQUOTE>
@@ -422,11 +411,58 @@
<BLOCKQUOTE>
<P>The MZ format has only the <A href="#Common_Options">Common Options</A>.</P>
</BLOCKQUOTE>
+
+ <H3>NE Options<A name="Options_New_Executable__NE_"/></H3>
+
+ <BLOCKQUOTE>
+ <P>The NE format has all the <A href="#Common_Options">Common Options</A>, plus:</P>
+
+ <H4>Perform Library Ordinal Lookup</H4>
+
+ <BLOCKQUOTE>
+ <P>Looks up and applies pre-generated exported symbol ordinal name mappings and stack
+ purge information. This information is stored in symbol files located in
+ <CODE>&lt;GHIDRA_INSTALL_DIR&gt;/Ghidra/Features/Base/data/symbols/&lt;OS&gt;</CODE>.</P>
+
+ <P>If there is no pre-generated information for a given library but the ordinal name
+ mappings and/or stack purge information is extracted during the library load/analysis
+ process, the information will be cached locally to the user's <CODE>.ghidra/</CODE>
+ directory to speed up future imports.</P>
+ </BLOCKQUOTE>
+ </BLOCKQUOTE>
<H3>PE Options<A name="Options_Portable_Executable__PE_"/></H3>
<BLOCKQUOTE>
<P>The PE format has all the <A href="#Common_Options">Common Options</A>, plus:</P>
+
+ <H4>Perform Library Ordinal Lookup</H4>
+
+ <BLOCKQUOTE>
+ <P>Looks up and applies pre-generated exported symbol ordinal name mappings and stack
+ purge information. This information is stored in symbol files located in
+ <CODE>&lt;GHIDRA_INSTALL_DIR&gt;/Ghidra/Features/Base/data/symbols/&lt;OS&gt;</CODE>.</P>
+
+ <P>If there is no pre-generated information for a given library but the ordinal name
+ mappings and/or stack purge information is extracted during the library load/analysis
+ process, the information will be cached locally to the user's <CODE>.ghidra/</CODE>
+ directory to speed up future imports.</P>
+
+ <P><IMG alt="" src="../../shared/note.yellow.png"> When running Ghidra with symbol files
+ created from an older operating system, you may receive the following warning
+ message:</P>
+
+ <BLOCKQUOTE>
+ <P><I>Unable to locate [<CODE>symbol_name</CODE>] in
+ [<CODE>&lt;filepath&gt;.exports</CODE>].
+ Please verify the version is correct.</I></P>
+ </BLOCKQUOTE>
+
+ <P>This warning message indicates which symbols do not exist in the corresponding
+ <I>.exports</I> file. The only information lost by not including these symbols is
+ function purge and comments. If you require this information, manually delete the
+ <I>.exports</I> file and Ghidra will regenerate it.</P>
+ </BLOCKQUOTE>
<H4>Parse CLI headers (if present)</H4>
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/OptionsEditorPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/OptionsEditorPanel.java
index 380359d337..f375b942da 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/OptionsEditorPanel.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/OptionsEditorPanel.java
@@ -178,7 +178,7 @@ public class OptionsEditorPanel extends JPanel {
public Component getEditorComponent(Option option) {
//special case for load library paths
- if (option.getName().equals(AbstractLibrarySupportLoader.LIB_OPTION_NAME)) {
+ if (option.getName().equals(AbstractLibrarySupportLoader.SYSTEM_LIBRARY_OPTION_NAME)) {
return buildLoadLibraryPathsEditor(option);
}
@@ -224,11 +224,9 @@ public class OptionsEditorPanel extends JPanel {
Boolean value = (Boolean) option.getValue();
boolean initialState = value != null ? value : false;
GCheckBox jCheckBox = new GCheckBox("", initialState);
- button.setEnabled(initialState);
jCheckBox.addActionListener(e -> {
boolean b = jCheckBox.isSelected();
option.setValue(b);
- button.setEnabled(b);
});
panel.add(jCheckBox, BorderLayout.WEST);
panel.add(button, BorderLayout.EAST);
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java
index 7fd09a946c..aa48a41f2d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java
@@ -17,6 +17,7 @@ package ghidra.app.util.opinion;
import java.io.File;
import java.io.IOException;
+import java.nio.file.AccessMode;
import java.util.*;
import java.util.stream.Collectors;
@@ -24,34 +25,39 @@ import org.apache.commons.io.FilenameUtils;
import ghidra.app.util.Option;
import ghidra.app.util.bin.ByteProvider;
-import ghidra.app.util.bin.RandomAccessByteProvider;
+import ghidra.app.util.bin.FileByteProvider;
import ghidra.app.util.importer.LibrarySearchPathManager;
import ghidra.app.util.importer.MessageLog;
import ghidra.formats.gfilesystem.FSRL;
+import ghidra.formats.gfilesystem.FileSystemService;
import ghidra.framework.model.*;
-import ghidra.framework.options.Options;
import ghidra.program.model.address.Address;
import ghidra.program.model.lang.*;
-import ghidra.program.model.listing.*;
-import ghidra.program.model.symbol.*;
+import ghidra.program.model.listing.Library;
+import ghidra.program.model.listing.Program;
+import ghidra.program.model.symbol.ExternalManager;
import ghidra.util.Msg;
-import ghidra.util.exception.*;
+import ghidra.util.exception.CancelledException;
+import ghidra.util.exception.InvalidInputException;
import ghidra.util.task.TaskMonitor;
import utilities.util.FileUtilities;
/**
* An abstract {@link Loader} that provides a framework to conveniently load {@link Program}s with
* support for linking against libraries contained in other {@link Program}s.
- * Subclasses are responsible for the actual load.
* <p>
+ * Subclasses may override various protected methods to customize how libraries are loaded.
*/
public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader {
- public static final String SYM_OPTION_NAME = "Create Export Symbol Files";
- public static final String LIB_OPTION_NAME = "Load External Libraries";
+ public static final String LOCAL_LIBRARY_OPTION_NAME = "Load Local Libraries";
+ static final boolean LOCAL_LIBRARY_OPTION_DEFAULT = false;
- static final boolean IS_CREATE_EXPORT_SYMBOL_FILES_DEFAULT = true;
- static final boolean IS_LOAD_LIBRARIES_DEFAULT = false;
+ public static final String SYSTEM_LIBRARY_OPTION_NAME = "Load System Libraries";
+ static final boolean SYSTEM_LIBRARY_OPTION_DEFAULT = false;
+
+ public static final String DEPTH_OPTION_NAME = "Recursive Library Load Depth";
+ static final int DEPTH_OPTION_DEFAULT = 1;
/**
* Loads bytes in a particular format into the given {@link Program}.
@@ -74,30 +80,23 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
DomainFolder programFolder, LoadSpec loadSpec, List<Option> options, MessageLog log,
Object consumer, TaskMonitor monitor) throws CancelledException, IOException {
- Queue<String> libraryNameQueue = new LinkedList<>();
- Set<String> resolvedSet = new HashSet<>();
List<Program> programList = new ArrayList<>();
+ List<String> libraryNameList = new ArrayList<>();
boolean success = false;
try {
- Program program = doLoad(provider, programName, programFolder, loadSpec, options, log,
- consumer, monitor, libraryNameQueue);
+ // Load the primary program
+ Program program = doLoad(provider, programName, programFolder, loadSpec,
+ libraryNameList, options, consumer, log, monitor);
programList.add(program);
- monitor.checkCanceled();
-
- String parent = getProviderFilePath(provider);
-
- List<String> paths = LibrarySearchPathManager.getLibraryPathsList();
- if (parent != null) {
- // add the imported file's parent directory as first search location.
- paths.add(0, parent);
+ // Load the libraries, if applicable
+ if (shouldLoadLibraries(options)) {
+ List<Program> libraries = loadLibraries(provider, program, programFolder, loadSpec,
+ options, log, consumer, libraryNameList, monitor);
+ programList.addAll(libraries);
}
- loadLibraries(programFolder, paths, loadSpec, options, log, consumer, libraryNameQueue,
- resolvedSet, programList, monitor);
-
- apply(programList, options, log, monitor);
success = true;
return programList;
}
@@ -126,50 +125,138 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
return true;
}
+ @Override
+ protected void postLoadProgramFixups(List<Program> loadedPrograms, DomainFolder folder,
+ List<Option> options, MessageLog messageLog, TaskMonitor monitor)
+ throws CancelledException, IOException {
+ if (isLoadLocalLibraries(options) || isLoadSystemLibraries(options)) {
+ fixupExternalLibraries(loadedPrograms, folder, true, messageLog, monitor);
+ }
+ }
+
+ @Override
+ public LoaderTier getTier() {
+ return LoaderTier.GENERIC_TARGET_LOADER;
+ }
+
+ @Override
+ public int getTierPriority() {
+ return 50;
+ }
+
@Override
public List<Option> getDefaultOptions(ByteProvider provider, LoadSpec loadSpec,
DomainObject domainObject, boolean loadIntoProgram) {
List<Option> list =
super.getDefaultOptions(provider, loadSpec, domainObject, loadIntoProgram);
- list.add(new Option(SYM_OPTION_NAME, IS_CREATE_EXPORT_SYMBOL_FILES_DEFAULT, Boolean.class,
- Loader.COMMAND_LINE_ARG_PREFIX + "-createExportSymbolFiles"));
- list.add(new Option(LIB_OPTION_NAME, IS_LOAD_LIBRARIES_DEFAULT, Boolean.class,
- Loader.COMMAND_LINE_ARG_PREFIX + "-loadExternalLibs"));
+ list.add(new Option(LOCAL_LIBRARY_OPTION_NAME, LOCAL_LIBRARY_OPTION_DEFAULT, Boolean.class,
+ Loader.COMMAND_LINE_ARG_PREFIX + "-loadLocalLibraries"));
+ list.add(new Option(SYSTEM_LIBRARY_OPTION_NAME, SYSTEM_LIBRARY_OPTION_DEFAULT, Boolean.class,
+ Loader.COMMAND_LINE_ARG_PREFIX + "-loadSystemLibraries"));
+ list.add(new Option(DEPTH_OPTION_NAME, DEPTH_OPTION_DEFAULT, Integer.class,
+ Loader.COMMAND_LINE_ARG_PREFIX + "-libraryLoadDepth"));
return list;
}
@Override
public String validateOptions(ByteProvider provider, LoadSpec loadSpec, List<Option> options,
Program program) {
-
if (options != null) {
for (Option option : options) {
String name = option.getName();
- if (name.equals(SYM_OPTION_NAME) || name.equals(LIB_OPTION_NAME)) {
+ if (name.equals(LOCAL_LIBRARY_OPTION_NAME) || name.equals(SYSTEM_LIBRARY_OPTION_NAME)) {
if (!Boolean.class.isAssignableFrom(option.getValueClass())) {
return "Invalid type for option: " + name + " - " + option.getValueClass();
}
}
+ else if (name.equals(DEPTH_OPTION_NAME)) {
+ if (!Integer.class.isAssignableFrom(option.getValueClass())) {
+ return "Invalid type for option: " + name + " - " + option.getValueClass();
+ }
+ }
}
}
return super.validateOptions(provider, loadSpec, options, program);
}
- @Override
- public LoaderTier getTier() {
- return LoaderTier.GENERIC_TARGET_LOADER;
+ /**
+ * Checks to see if local libraries should be loaded. Local libraries are libraries that live
+ * in the same directory as the imported program.
+ *
+ * @param options a {@link List} of {@link Option}s
+ * @return True if local libraries should be loaded; otherwise, false
+ */
+ protected boolean isLoadLocalLibraries(List<Option> options) {
+ boolean isLoadLocalLibraries = LOCAL_LIBRARY_OPTION_DEFAULT;
+ if (options != null) {
+ for (Option option : options) {
+ String optName = option.getName();
+ if (optName.equals(LOCAL_LIBRARY_OPTION_NAME)) {
+ isLoadLocalLibraries = (Boolean) option.getValue();
+ }
+ }
+ }
+ return isLoadLocalLibraries;
}
- @Override
- public int getTierPriority() {
- return 50;
+ /**
+ * Checks to see if system libraries should be loaded. System libraries are libraries that live
+ * in the directories specified in the GUI path list.
+ *
+ * @param options a {@link List} of {@link Option}s
+ * @return True if system libraries should be loaded; otherwise, false
+ */
+ protected boolean isLoadSystemLibraries(List<Option> options) {
+ boolean isLoadSystemLibraries = SYSTEM_LIBRARY_OPTION_DEFAULT;
+ if (options != null) {
+ for (Option option : options) {
+ String optName = option.getName();
+ if (optName.equals(SYSTEM_LIBRARY_OPTION_NAME)) {
+ isLoadSystemLibraries = (Boolean) option.getValue();
+ }
+ }
+ }
+ return isLoadSystemLibraries;
}
- @Override
- protected void postLoadProgramFixups(List<Program> loadedPrograms, DomainFolder folder,
- List<Option> options, MessageLog messageLog, TaskMonitor monitor)
- throws CancelledException, IOException {
- resolveExternalLibs(loadedPrograms, folder, true, messageLog, monitor);
+ /**
+ * Gets the desired recursive library load depth
+ *
+ * @param options a {@link List} of {@link Option}s
+ * @return The desired recursive library load depth
+ */
+ protected int getLibraryLoadDepth(List<Option> options) {
+ int depth = DEPTH_OPTION_DEFAULT;
+ if (options != null) {
+ for (Option option : options) {
+ String optName = option.getName();
+ if (optName.equals(DEPTH_OPTION_NAME)) {
+ depth = (int) option.getValue();
+ }
+ }
+ }
+ return depth;
+ }
+
+ /**
+ * Checks whether or not libraries should be loaded (local or system)
+ *
+ * @param options a {@link List} of {@link Option}s
+ * @return True if any libraries should be loaded (local or system); otherwise, false
+ */
+ protected boolean shouldLoadLibraries(List<Option> options) {
+ return (isLoadLocalLibraries(options) || isLoadSystemLibraries(options)) &&
+ getLibraryLoadDepth(options) > 0;
+ }
+
+ /**
+ * Checks whether or not to search for libraries using all possible search paths, regardless
+ * of what options are set
+ *
+ * @return True if all possible search paths should be used, regardless of what options are set
+ */
+ protected boolean shouldSearchAllPaths() {
+ return false;
}
/**
@@ -179,18 +266,12 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
* Derived loader classes should override this method and specify if the OS that normally
* handles this type of binary is case-insensitive.
*
- * @return - true if case-insensitive or false if case-sensitive.
+ * @return True if case-insensitive or false if case-sensitive.
*/
protected boolean isCaseInsensitiveLibraryFilenames() {
return false;
}
- protected Comparator<String> getLibNameComparator() {
- return isCaseInsensitiveLibraryFilenames()
- ? String.CASE_INSENSITIVE_ORDER
- : (s1, s2) -> s1.compareTo(s2);
- }
-
/**
* Specifies if this loader can refer to library filenames without filename extensions.
* <p>
@@ -204,149 +285,332 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
/**
- * Returns the path the loaded {@link ByteProvider} is located in.
+ * Creates a {@link ByteProvider} for the given library file
+ *
+ * @param libFile The library file to get a {@link ByteProvider} for
+ * @param loadSpec An optional {@link LoadSpec} the {@link ByteProvider} should conform to
+ * @param log The log
+ * @return A {@link ByteProvider} for the given library file, or null if one could not be
+ * created that matches the given {@link LoadSpec}
+ * @throws IOException If there was an IO-related issue
+ */
+ protected ByteProvider createLibraryByteProvider(File libFile, LoadSpec loadSpec,
+ MessageLog log) throws IOException {
+ return new FileByteProvider(libFile, FileSystemService.getInstance().getLocalFSRL(libFile),
+ AccessMode.READ);
+ }
+
+ /**
+ * Checks whether or not the given library should be loaded.
* <p>
- * Special case when the ByteProvider specifies a {@link FSRL}, try to get the 'real'
- * path on the local filesystem, otherwise return null.
- *
- * @param provider The {@link ByteProvider}.
- * @return The path the loaded {@link ByteProvider} is located in.
+ * It may be appropriate to not load a specific library after examining its bytes.
+ *
+ * @param libraryName The name of the library
+ * @param libraryFile The library {@link File}
+ * @param provider The library bytes
+ * @param desiredLoadSpec The desired {@link LoadSpec}
+ * @param log The log
+ * @return True if the given library should be loaded; otherwise, false
+ * @throws IOException If an IO-related error occurred
*/
- private String getProviderFilePath(ByteProvider provider) {
- FSRL fsrl = provider.getFSRL();
- if ((fsrl != null) && !fsrl.getFS().hasContainer()) {
- return FilenameUtils.getFullPathNoEndSeparator(fsrl.getPath());
+ protected boolean shouldLoadLibrary(String libraryName, File libraryFile, ByteProvider provider,
+ LoadSpec desiredLoadSpec, MessageLog log) throws IOException {
+ if (matchSupportedLoadSpec(desiredLoadSpec, provider) == null) {
+ log.appendMsg("Skipping library which is the wrong architecture: " + libraryFile);
+ return false;
}
- File f = provider.getFile();
- return (f != null) ? f.getParent() : null;
+ return true;
+ }
+
+ /**
+ * Performs optional follow-on actions after an the given library has been loaded
+ *
+ * @param library The loaded library {@link Program}
+ * @param libraryName The name of the library
+ * @param libraryFile The library {@link File}
+ * @param provider The library bytes
+ * @param loadSpec The {@link LoadSpec} used for the load
+ * @param options The options
+ * @param log The log
+ * @param monitor A cancel.able monitor
+ * @return True if the library should be saved to the project; otherwise, false
+ * @throws IOException If an IO-related error occurred
+ * @throws CancelledException If the user cancelled the action
+ */
+ protected boolean processLibrary(Program library, String libraryName, File libraryFile,
+ ByteProvider provider, LoadSpec loadSpec, List<Option> options, MessageLog log,
+ TaskMonitor monitor) throws IOException, CancelledException {
+ return true;
}
/**
- * Attempts to import all libraries listed in {@code unprocessedLibs}, placing the newly
- * created {@link DomainObject} instances in {@code programList}.
+ * Loads the given list of libraries into the given {@link DomainFolder folder}
*
+ * @param provider The {@link ByteProvider} of the program being loaded
+ * @param program The {@link Program} being loaded
* @param programFolder The domain folder where the new program will be stored, if null
* the program should not be pre-saved. NOTE: the newly imported libraries will not be written
* to this folder yet, that is handled in a later follow on step.
- * @param paths A list of paths on the local filesystem to search for library files.
- * @param loadSpec The {@link LoadSpec}.
- * @param options The load options.
- * @param log The log.
- * @param consumer A consumer object for {@link DomainObject}s generated.
- * @param unprocessedLibs A queue of libraries that need to be loaded.
- * @param processedLibs A list of libraries that have been loaded (used to prevent the same
- * library from being processed more than once)
- * @param programList A list to hold newly loaded programs and libraries. Any program
- * added to the list is the callers responsibility to release.
- * @param monitor A cancelable task monitor.
- * @throws IOException if there was an IO-related problem loading.
- * @throws CancelledException if the user cancelled the load.
+ * @param desiredLoadSpec The desired {@link LoadSpec}
+ * @param options The load options
+ * @param log The log
+ * @param consumer A consumer object for {@link DomainObject}s generated
+ * @param monitor A cancelable task monitor
+ * @return A {@link List} of newly loaded programs and libraries. Any program in the list is
+ * the caller's responsibility to release.
+ * @throws IOException if there was an IO-related problem loading
+ * @throws CancelledException if the user cancelled the load
*/
- private void loadLibraries(DomainFolder programFolder, List<String> paths, LoadSpec loadSpec,
- List<Option> options, MessageLog log, Object consumer, Queue<String> unprocessedLibs,
- Set<String> processedLibs, List<Program> programList, TaskMonitor monitor)
+ private List<Program> loadLibraries(ByteProvider provider, Program program,
+ DomainFolder programFolder, LoadSpec desiredLoadSpec, List<Option> options,
+ MessageLog log, Object consumer, List<String> libraryNameList, TaskMonitor monitor)
throws CancelledException, IOException {
- // TODO warning - hack alert
- if (loadSpec.getLoader() instanceof PeLoader) {
- if (!isCreateExportSymbolFiles(options) && !isLoadLibraries(options)) {
- return;
- }
- }
- else {
- if (!isLoadLibraries(options)) {
- return;
- }
- }
+ List<Program> programList = new ArrayList<>();
+ Set<String> processed = new HashSet<>();
+ Queue<UnprocessedLibrary> unprocessed =
+ createUnprocessedQueue(libraryNameList, getLibraryLoadDepth(options));
+ List<String> searchPaths = getLibrarySearchPaths(provider, options);
- while (!unprocessedLibs.isEmpty()) {
+ while (!unprocessed.isEmpty()) {
monitor.checkCanceled();
- String libName = unprocessedLibs.remove();
- if (processedLibs.contains(libName)) {
+ UnprocessedLibrary unprocessedLibrary = unprocessed.remove();
+ String libraryName = unprocessedLibrary.name();
+ int depth = unprocessedLibrary.depth();
+ if (depth == 0 || processed.contains(libraryName)) {
continue;
}
- boolean libImported = false;
- if (findAlreadyImportedLibrary(libName, programFolder) == null) {
- log.appendMsg("Searching for referenced library: " + libName + " ...");
- String simpleLibName = FilenameUtils.getName(libName);
-
- List<File> candidateLibFiles =
- findLibraryFileToImport(FilenameUtils.separatorsToUnix(libName), paths);
- for (File libFile : candidateLibFiles) {
+ boolean foundLibrary = false;
+ if (findLibrary(libraryName, programFolder) == null) {
+ String simpleLibraryName = FilenameUtils.getName(libraryName);
+
+ List<File> candidateLibraryFiles =
+ findLibrary(FilenameUtils.separatorsToUnix(libraryName), searchPaths);
+ for (File candidateLibraryFile : candidateLibraryFiles) {
monitor.checkCanceled();
- if (importLibrary(simpleLibName, programFolder, libFile, loadSpec, options,
- log, consumer, unprocessedLibs, programList, monitor)) {
- libImported = true;
- log.appendMsg("Found and imported external library: " + libFile);
+ List<String> newLibraryList = new ArrayList<>();
+ Program library =
+ loadLibrary(simpleLibraryName, programFolder, candidateLibraryFile,
+ desiredLoadSpec, newLibraryList, options, consumer, log, monitor);
+ for (String newLibraryName : newLibraryList) {
+ unprocessed.add(new UnprocessedLibrary(newLibraryName, depth - 1));
+ }
+ if (library != null) {
+ foundLibrary = true;
+ if (processLibrary(library, libraryName, candidateLibraryFile, provider,
+ desiredLoadSpec, options, log, monitor)) {
+ programList.add(library);
+ log.appendMsg(
+ "Library " + libraryName + ": Saving " + candidateLibraryFile);
+ }
+ else {
+ library.release(consumer);
+ log.appendMsg(
+ "Library " + libraryName + ": Examining " + candidateLibraryFile);
+ }
break;
}
}
- if (!libImported) {
- log.appendMsg("Unable to find external library: " + libName);
+ if (!foundLibrary) {
+ log.appendMsg("Library " + libraryName + ": Not found");
}
}
- processedLibs.add(libName);
+ else {
+ log.appendMsg("Library " + libraryName + ": Already loaded ");
+ }
+ processed.add(libraryName);
}
log.appendMsg(
- "Finished importing referenced libraries for: " + programList.get(0).getName());
+ "Finished importing referenced libraries for: " + program.getName());
+ return programList;
}
- private void apply(List<Program> programs, List<Option> options, MessageLog log,
- TaskMonitor monitor) throws CancelledException {
- monitor.initialize(programs.size());
-
- for (int i = 0; i < programs.size() && isCreateExportSymbolFiles(options); ++i) {
- Program p = programs.get(i);
+ /**
+ * Find the library within the specified {@link DomainFolder folder}. This method will handle
+ * relative path normalization.
+ * <p>
+ * If the library path is a simple name without any path separators, only the given folder
+ * will be searched.
+ * <p>
+ * If the library path has a path, it will be treated as a relative path under
+ * given folder and if found that {@link DomainFile} will be returned.
+ * <p>
+ * If the library path has a path and it wasn't found under the given folder, the
+ * filename part of library path will be used to search the given folder for matches.
+ * <p>
+ * @param libraryPath path with filename of the library to find
+ * @param folder {@link DomainFolder} within which imported libraries will be searched.
+ * If null this method will return null.
+ * @return The found {@link DomainFile} or null if not found
+ */
+ private DomainFile findLibrary(String libraryPath, DomainFolder folder) {
+ if (folder == null) {
+ return null;
+ }
- monitor.checkCanceled();
- monitor.setProgress(i);
+ // Lookup by full project path
+ // NOTE: probably no need to support optional extensions and case-insensitivity for this case
+ String projectPath = appendPath(folder.getPathname(), libraryPath);
+ DomainFile ret =
+ folder.getProjectData().getFile(FilenameUtils.separatorsToUnix(projectPath));
+ if (ret != null) {
+ return ret;
+ }
- int id = p.startTransaction("apply");
- boolean success = false;
- try {
- applyLibrarySymbols(p, log, monitor);
- applyImports(p, log, monitor);
+ // Quick lookup by library filename (ignoring full library path) in given folder.
+ // We try this first to hopefully avoid needing to iterate over the files in the folder
+ // factoring in case and extensions
+ String libraryName = FilenameUtils.getName(libraryPath);
+ if ((ret = folder.getFile(libraryName)) != null) {
+ return ret;
+ }
- success = true;
+ // Factoring in case and optional file extensions, iterate over given folder looking for
+ // a match
+ boolean noExtension = FilenameUtils.getExtension(libraryName).equals("");
+ Comparator<String> comparator = getLibraryNameComparator();
+ for (DomainFile file : folder.getFiles()) {
+ String candidateName = file.getName();
+ if (isOptionalLibraryFilenameExtensions() && noExtension) {
+ candidateName = FilenameUtils.getBaseName(candidateName);
}
- finally {
- p.endTransaction(id, success);
+ if (comparator.compare(candidateName, libraryName) == 0) {
+ return file;
}
}
- LibraryLookupTable.cleanup();
+ return null;
}
- protected boolean isCreateExportSymbolFiles(List<Option> options) {
- boolean isCreateExportSymbolFiles = IS_CREATE_EXPORT_SYMBOL_FILES_DEFAULT;
- if (options != null) {
- for (Option option : options) {
- String optName = option.getName();
- if (optName.equals(SYM_OPTION_NAME)) {
- isCreateExportSymbolFiles = (Boolean) option.getValue();
- }
+ /**
+ * Find the library on the filesystem, returning a {@link List} of possible candidate files.
+ * <p>
+ * Each search path directory will be searched for the library file in order.
+ * <p>
+ * If the library file specifies a path, it is treated as a relative subdirectory of
+ * each search path directory that is searched, and if not found, the filename part of
+ * the library is used to search just the search path directory.
+ * <p>
+ * If the library specifies an absolute path, its native path is searched on the local
+ * filesystem.
+ * <p>
+ * @param libraryPath Either a path_and_filename, or just a filename of a library
+ * that should be searched for
+ * @param searchPaths A {@link List} of filesystem paths on the local filesystem that will be
+ * searched
+ * @return A {@link List} of files that match the requested library path
+ */
+ private List<File> findLibrary(String libraryPath, List<String> searchPaths) {
+
+ String libraryName = FilenameUtils.getName(libraryPath);
+ List<File> results = new ArrayList<>();
+
+ for (String searchPath : searchPaths) {
+
+ // ignore garbage entries: relative, non-existent, not directory
+ searchPath = FilenameUtils.normalizeNoEndSeparator(searchPath);
+ if (searchPath == null || searchPath.isEmpty()) {
+ continue;
+ }
+ File searchDir = new File(searchPath);
+ if (!searchDir.isAbsolute() || !searchDir.isDirectory()) {
+ continue;
+ }
+
+ // 1) Try as possible subpath under the search path
+ String candidatePath =
+ FilenameUtils.separatorsToSystem(appendPath(searchPath, libraryPath));
+ File f = resolveLibraryFile(new File(candidatePath));
+ if (f == null || !f.isFile()) {
+ // 2) Fall back to looking for the library in the user specified search path, sans
+ // any subpath built into the library string
+ f = resolveLibraryFile(new File(searchDir, libraryName));
+ }
+ if (f != null && f.isFile() && !results.contains(f)) {
+ results.add(f);
+ }
+ }
+
+ if (FilenameUtils.getPrefixLength(libraryPath) > 0) {
+ // 3) Search the local filesystem (as if the importPath list contained "/")
+ // if the specified library string specifies an absolute path
+ File f = resolveLibraryFile(new File(libraryPath));
+ if (f != null && f.isAbsolute() && f.isFile() && !results.contains(f)) {
+ results.add(f);
}
}
- return isCreateExportSymbolFiles;
+
+ return results;
}
- protected boolean isLoadLibraries(List<Option> options) {
- boolean isLoadLibraries = IS_LOAD_LIBRARIES_DEFAULT;
- if (options != null) {
- for (Option option : options) {
- String optName = option.getName();
- if (optName.equals(LIB_OPTION_NAME)) {
- isLoadLibraries = (Boolean) option.getValue();
- }
+ /**
+ * Imports a library file into a ghidra project. Use this method if you already have
+ * a {@link ByteProvider} available.
+ *
+ * @param libraryName The name of the library to load
+ * @param programFolder The domain folder where the new program will be stored, if null
+ * the program should not be pre-saved. NOTE: the newly imported libraries will not be written
+ * to this folder yet, that is handled in a later follow on step.
+ * @param libraryFile The library file to load
+ * @param desiredLoadSpec The desired {@link LoadSpec}
+ * @param libraryNameList A {@link List} to be populated with the given library's dependent
+ * library names
+ * @param options The load options
+ * @param log The log
+ * @param consumer A consumer object for {@link DomainObject}s generated
+ * @param monitor A cancelable task monitor
+ * @return The loaded {@link Program}, or null if the load was not successful
+ * @throws CancelledException if the user cancelled the load operation
+ * @throws IOException if there was an IO-related error during the load
+ */
+ private Program loadLibrary(String libraryName, DomainFolder programFolder, File libraryFile,
+ LoadSpec desiredLoadSpec, List<String> libraryNameList, List<Option> options,
+ Object consumer, MessageLog log, TaskMonitor monitor)
+ throws CancelledException, IOException {
+
+ try (ByteProvider provider = createLibraryByteProvider(libraryFile, desiredLoadSpec, log)) {
+ if (!shouldLoadLibrary(libraryName, libraryFile, provider, desiredLoadSpec, log)) {
+ return null;
+ }
+
+ LoadSpec libLoadSpec = matchSupportedLoadSpec(desiredLoadSpec, provider);
+ if (libLoadSpec == null) {
+ log.appendMsg("Skipping library which is the wrong architecture: " + libraryFile);
+ return null;
+ }
+
+ Program library = doLoad(provider, libraryName, programFolder, libLoadSpec,
+ libraryNameList, options, consumer, log, monitor);
+
+ if (library == null) {
+ log.appendMsg("Library " + libraryFile + " failed to load for some reason");
+ return null;
}
+
+ return library;
}
- return isLoadLibraries;
}
+ /**
+ * Loads the given provider
+ *
+ * @param provider The {@link ByteProvider} to load
+ * @param programName The name of the new program
+ * @param programFolder The folder to load the program into
+ * @param loadSpec The {@link LoadSpec}
+ * @param libraryNameList A {@link List} to be populated with the loaded program's dependent
+ * library names
+ * @param options The load options
+ * @param log The log
+ * @param consumer A consumer object for {@link DomainObject}s generated
+ * @param monitor A cancelable task monitor
+ * @return The newly loaded {@link Program}
+ * @throws CancelledException if the user cancelled the load operation
+ * @throws IOException if there was an IO-related error during the load
+ */
private Program doLoad(ByteProvider provider, String programName, DomainFolder programFolder,
- LoadSpec loadSpec, List<Option> options, MessageLog log, Object consumer,
- TaskMonitor monitor, Queue<String> unprocessedLibraries)
- throws CancelledException, IOException {
+ LoadSpec loadSpec, List<String> libraryNameList, List<Option> options, Object consumer,
+ MessageLog log, TaskMonitor monitor) throws CancelledException, IOException {
LanguageCompilerSpecPair pair = loadSpec.getLanguageCompilerSpec();
Language language = getLanguageService().getLanguage(pair.languageID);
CompilerSpec compilerSpec = language.getCompilerSpecByID(pair.compilerSpecID);
@@ -360,9 +624,8 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
Program program = createProgram(provider, programName, imageBaseAddr, getName(), language,
compilerSpec, consumer);
- Comparator<String> libNameComparator = getLibNameComparator();
- int transactionID = program.startTransaction("importing");
+ int transactionID = program.startTransaction("Loading");
boolean success = false;
try {
log.appendMsg("----- Loading " + provider.getAbsolutePath() + " -----");
@@ -370,19 +633,18 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
createDefaultMemoryBlocks(program, language, log);
- if (unprocessedLibraries != null) {
- ExternalManager extMgr = program.getExternalManager();
- String[] externalNames = extMgr.getExternalLibraryNames();
- Arrays.sort(externalNames, libNameComparator);
- for (String name : externalNames) {
- if (libNameComparator.compare(name, provider.getName()) == 0 ||
- libNameComparator.compare(name, program.getName()) == 0 ||
- Library.UNKNOWN.equals(name)) {
- // skip self-references and UNKNOWN library...
- continue;
- }
- unprocessedLibraries.add(name);
+ ExternalManager extMgr = program.getExternalManager();
+ String[] externalNames = extMgr.getExternalLibraryNames();
+ Comparator<String> comparator = getLibraryNameComparator();
+ Arrays.sort(externalNames, comparator);
+ for (String name : externalNames) {
+ if (comparator.compare(name, provider.getName()) == 0 ||
+ comparator.compare(name, program.getName()) == 0 ||
+ Library.UNKNOWN.equals(name)) {
+ // skip self-references and UNKNOWN library...
+ continue;
}
+ libraryNameList.add(name);
}
success = true;
@@ -398,24 +660,24 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
/**
- * For each program in the programs list, fix up its external Library entries so
- * that they point to a path in the ghidra project.
+ * For each program in the given list, fix up its external library entries so that they point
+ * to a path in the project.
* <p>
- * Other programs in the programs list are matched first, then the
- * ghidraLibSearchFolders are searched for matches.
+ * Other programs in the given list are matched first, then the ghidraLibSearchFolders are
+ * searched for matches.
*
* @param programs the list of programs to resolve against each other. Programs not saved
- * to the project will be considered as a valid external library.
+ * to the project will be considered as a valid external library.
* @param domainFolder the {@link DomainFolder} folder within which imported libraries will
- * be searched. This folder will be searched if a library is not found within the
- * list of programs supplied. If null, only the list of programs will be considered.
+ * be searched. This folder will be searched if a library is not found within the
+ * list of programs supplied. If null, only the list of programs will be considered.
* @param saveIfModified flag to have this method save any programs it modifies
* @param messageLog log for messages.
* @param monitor the task monitor
* @throws IOException if there was an IO-related problem resolving.
* @throws CancelledException if the user cancelled the load.
*/
- private void resolveExternalLibs(List<Program> programs, DomainFolder domainFolder,
+ private void fixupExternalLibraries(List<Program> programs, DomainFolder domainFolder,
boolean saveIfModified, MessageLog messageLog, TaskMonitor monitor)
throws CancelledException, IOException {
@@ -439,9 +701,9 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
monitor.setMessage("Resolving..." + program.getName());
- int id = program.startTransaction("resolving external references");
+ int id = program.startTransaction("Resolving external references");
try {
- resolveExternalLibs(program, progsByName, domainFolder, monitor, messageLog);
+ resolveExternalLibraries(program, progsByName, domainFolder, monitor, messageLog);
}
finally {
program.endTransaction(id, true);
@@ -453,29 +715,29 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
/**
- * Fix up program's external Library entries so
- * that they point to a path in the ghidra project.
+ * Fix up program's external library entries so that they point to a path in the project.
* <p>
- * Other programs in the progsByName map are matched first, then the
- * ghidraLibSearchFolders are searched for matches.
+ * Other programs in the map are matched first, then the ghidraLibSearchFolders
+ * are searched for matches.
*
* @param program the program whose Library entries are to be resolved. An open transaction
- * on program is required.
+ * on program is required.
* @param progsByName map of recently imported programs to be considered
- * first when resolving external Libraries. Programs not saved to the project
- * will be ignored.
+ * first when resolving external Libraries. Programs not saved to the project
+ * will be ignored.
* @param domainFolder the {@link DomainFolder} folder within which imported libraries will
- * be searched. This folder will be searched if a library is not found within the
- * progsByName map. If null, only progsByName will be considered.
+ * be searched. This folder will be searched if a library is not found within the
+ * progsByName map. If null, only progsByName will be considered.
* @param messageLog log for messages.
* @param monitor the task monitor
* @throws CancelledException if the user cancelled the load.
*/
- private void resolveExternalLibs(Program program, Map<String, Program> progsByName,
+ private void resolveExternalLibraries(Program program, Map<String, Program> progsByName,
DomainFolder domainFolder, TaskMonitor monitor, MessageLog messageLog)
throws CancelledException {
ExternalManager extManager = program.getExternalManager();
String[] extLibNames = extManager.getExternalLibraryNames();
+ messageLog.appendMsg("Linking external programs to " + program.getName() + "...");
for (String externalLibName : extLibNames) {
if (Library.UNKNOWN.equals(externalLibName)) {
continue;
@@ -493,17 +755,15 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
else {
DomainFile alreadyImportedLib =
- findAlreadyImportedLibrary(externalLibName, domainFolder);
+ findLibrary(externalLibName, domainFolder);
if (alreadyImportedLib != null) {
extManager.setExternalPath(externalLibName,
alreadyImportedLib.getPathname(), false);
- messageLog.appendMsg(
- " [" + program.getName() + ":" + externalLibName + "] -> [" +
- alreadyImportedLib.getPathname() + "] (previously imported)");
+ messageLog.appendMsg(" [" + externalLibName + "] -> [" +
+ alreadyImportedLib.getPathname() + "] (previously imported)");
}
else {
- messageLog.appendMsg(
- " [" + program.getName() + ":" + externalLibName + "] -> not found");
+ messageLog.appendMsg(" [" + externalLibName + "] -> not found");
}
}
}
@@ -513,507 +773,115 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
}
- protected Program findLibraryWithCaseCorrectSearch(Map<String, Program> progsByName,
- String libName) {
- Comparator<String> comparator = getLibNameComparator();
- for (String s : progsByName.keySet()) {
- if (comparator.compare(libName, s) == 0) {
- return progsByName.get(s);
- }
- }
- return null;
- }
-
/**
- * Find the libPathFilename within the specified importFolder. This method will handle
- * relative path normalization.
- * <p>
- * If libPathFilename is a simple name without any path separators, only the
- * importFolder folder will be searched.
- * <p>
- * If libPathFilename has a path, it will be treated as a relative path under
- * {@code importFolder} and if found that DomainFile will be returned.
- * <p>
- * If libPathFilename has a path and it wasn't found under importFolder, the
- * filename part of libPathFilename will be used to search the importFolder for matches.
- * <p>
- * @param libPathFilename String path with filename of the library to find
- * @param domainFolder {@link DomainFolder} folder within which imported libraries will
- * be searched. If null this method will return null.
- * @return found {@link DomainFile} or null if not found
+ * A library that has not been processed by the loader yet
+ *
+ * @param name The name of the library
+ * @param depth The recursive load depth of the library (based on the original binary being
+ * loaded)
*/
- protected DomainFile findAlreadyImportedLibrary(String libPathFilename,
- DomainFolder domainFolder) {
- if (domainFolder == null) {
- return null;
- }
-
- // Lookup by full project path
- // NOTE: probably no need to support optional extensions and case-insensitivity for this case
- String projectPath = appendPath(domainFolder.getPathname(), libPathFilename);
- DomainFile ret =
- domainFolder.getProjectData().getFile(FilenameUtils.separatorsToUnix(projectPath));
- if (ret != null) {
- return ret;
- }
-
- // Quick lookup by library filename (ignoring full library path) in given folder.
- // We try this first to hopefully avoid needing to iterate over the files in the folder
- // factoring in case and extensions
- String libName = FilenameUtils.getName(libPathFilename);
- if ((ret = domainFolder.getFile(libName)) != null) {
- return ret;
- }
-
- // Factoring in case and optional file extensions, iterate over given folder looking for
- // a match
- boolean noExtension = FilenameUtils.getExtension(libName).equals("");
- Comparator<String> libNameComparator = getLibNameComparator();
- for (DomainFile file : domainFolder.getFiles()) {
- String candidateName = file.getName();
- if (isOptionalLibraryFilenameExtensions() && noExtension) {
- candidateName = FilenameUtils.getBaseName(candidateName);
- }
- if (libNameComparator.compare(candidateName, libName) == 0) {
- return file;
- }
- }
-
- return null;
- }
-
- private static String appendPath(String... pathStrs) {
- StringBuilder sb = new StringBuilder();
- for (String pathEle : pathStrs) {
- if (pathEle == null || pathEle.isEmpty()) {
- continue;
- }
- boolean sbEndsWithSlash =
- sb.length() > 0 && "/\\".indexOf(sb.charAt(sb.length() - 1)) != -1;
- boolean eleStartsWithSlash = "/\\".indexOf(pathEle.charAt(0)) != -1;
-
- if (!sbEndsWithSlash && !eleStartsWithSlash && sb.length() > 0) {
- sb.append("/");
- }
- else if (eleStartsWithSlash && sbEndsWithSlash) {
- pathEle = pathEle.substring(1);
- }
- sb.append(pathEle);
- }
-
- return sb.toString();
- }
+ private record UnprocessedLibrary(String name, int depth) {/**/}
/**
- * Searches the local filesystem for the specified library file, returning a List
- * of possible candidate files.
- * <p>
- * Each importPath directory will be searched for the library file in order.
- * <p>
- * If the library file specifies a path, it is treated as a relative subdirectory of
- * each importPath directory that is searched, and if not found, the filename part of
- * the library is used to search just the importPath directory.
- * <p>
- * If the library specifies a path, its native path is searched on the local filesystem.
- * <p>
- * @param libPathFilename - either a path_and_filename, or just a filename of a library
- * that should be searched for.
- * @param importPaths - list of filesystem paths on the local computer that will be
- * searched.
- * @return a List of Files (possibly empty, never null) that match the requested filename.
- */
- private List<File> findLibraryFileToImport(String libPathFilename, List<String> importPaths) {
-
- String libName = FilenameUtils.getName(libPathFilename);
- List<File> results = new ArrayList<>();
-
- for (String importPath : importPaths) {
-
- // ignore garbage importPath entries: relative, non-existent, not directory
- importPath = FilenameUtils.normalizeNoEndSeparator(importPath);
- if (importPath == null || importPath.isEmpty()) {
- continue;
- }
- File importPathDir = new File(importPath);
- if (!importPathDir.isAbsolute() || !importPathDir.isDirectory()) {
- continue;
- }
-
- // 1) Try as possible subpath under the importPath
- String candidatePath =
- FilenameUtils.separatorsToSystem(appendPath(importPath, libPathFilename));
- File f = resolveLibraryFile(new File(candidatePath));
- if (f == null || !f.isFile()) {
- // 2) Fall back to looking for the library in the user specified importPath, sans any
- // subpath built into the library string.
- f = resolveLibraryFile(new File(importPathDir, libName));
- }
- if (f != null && f.isFile() && !results.contains(f)) {
- results.add(f);
- }
- }
-
- boolean searchLocalFileSystemAlso = true;
- boolean libSpecifiesPath = FilenameUtils.getPrefixLength(libPathFilename) > 0;
- if (searchLocalFileSystemAlso && libSpecifiesPath) {
- // 3) Search the local filesystem (as if the importPath list contained "/")
- // if the specified library string specifies a path.
- File f = resolveLibraryFile(new File(libPathFilename));
- if (f != null && f.isAbsolute() && f.isFile() && !results.contains(f)) {
- results.add(f);
- }
- }
-
- return results;
- }
-
- /**
- * Imports a library file into a ghidra project.
+ * Creates a new {@link Queue} of {@link UnprocessedLibrary}s, initialized filled with the
+ * library names in the given list
*
- * @param libName the name of the library to import
- * @param libFolder the library folder
- * @param libFile the library file to load
- * @param loadSpec the {@link LoadSpec}
- * @param options the load options
- * @param log the message log
- * @param consumer consumer object for the {@link Program} generated
- * @param unprocessedLibs queue of libraries that need to be loaded
- * @param programList list of programs to add the imported library to
- * @param monitor the task monitor
- * @return true if the load was successful
- * @throws CancelledException if the user cancelled the load operation
- * @throws IOException if there was an error during the load
+ * @param libraryNames A {@link List} of unprocessed library names
+ * @param depth The initial load depth of each library
+ * @return A {@link Queue} of {@link UnprocessedLibrary}s
*/
- protected boolean importLibrary(String libName, DomainFolder libFolder, File libFile,
- LoadSpec loadSpec, List<Option> options, MessageLog log, Object consumer,
- Queue<String> unprocessedLibs, List<Program> programList, TaskMonitor monitor)
- throws CancelledException, IOException {
-
- if (!libFile.isFile()) {
- return false;
- }
-
- try (RandomAccessByteProvider provider = new RandomAccessByteProvider(libFile)) {
- return importLibrary(libName, libFolder, libFile, provider, loadSpec, options, log,
- consumer, unprocessedLibs, programList, monitor);
- }
+ private Queue<UnprocessedLibrary> createUnprocessedQueue(List<String> libraryNames, int depth) {
+ return libraryNames.stream()
+ .map(name -> new UnprocessedLibrary(name, depth))
+ .collect(Collectors.toCollection(LinkedList::new));
}
/**
- * Imports a library file into a ghidra project. Use this method if you already have
- * a {@link ByteProvider} available.
+ * Gets a {@link List} of priority-ordered paths used to search for libraries
*
- * @param libName the name of the library to import
- * @param libFolder the library folder
- * @param libFile the library file to load
- * @param provider the byte provider
- * @param loadSpec the {@link LoadSpec}
- * @param options the load options
- * @param log the message log
- * @param consumer consumer object for the {@link Program} generated
- * @param unprocessedLibs queue of libraries that need to be loaded
- * @param programList list of programs to add the imported library to
- * @param monitor the task monitor
- * @return true if the load was successful
- * @throws CancelledException if the user cancelled the load operation
- * @throws IOException if there was an error during the load
+ * @param provider The {@link ByteProvider} of the program being loaded
+ * @param options The options
+ * @return A {@link List} of priority-ordered paths used to search for libraries
*/
- protected boolean importLibrary(String libName, DomainFolder libFolder, File libFile,
- ByteProvider provider, LoadSpec loadSpec, List<Option> options, MessageLog log,
- Object consumer, Queue<String> unprocessedLibs, List<Program> programList,
- TaskMonitor monitor) throws CancelledException, IOException {
-
- Program lib = null;
- int size = loadSpec.getLanguageCompilerSpec().getLanguageDescription().getSize();
-
- LoadSpec libLoadSpec = getLoadSpec(loadSpec, provider);
- if (libLoadSpec == null) {
- log.appendMsg("Skipping library which is the wrong architecture: " + libFile);
- return false;
+ private List<String> getLibrarySearchPaths(ByteProvider provider, List<Option> options) {
+ String parent = getProviderFilePath(provider);
+ List<String> paths = new ArrayList<>();
+ if (shouldSearchAllPaths() || isLoadLocalLibraries(options) && parent != null) {
+ paths.add(parent);
}
- if (!isLoadLibraries(options)) {
- // TODO: LibraryLookupTable support currently assumes Windows for x86 (32 or 64 bit).
- // Need to investigate adding support for other architectures
- if (LibraryLookupTable.hasFileAndPathAndTimeStampMatch(libFile, size)) {
- return true;// no need to really import it
- }
- else if (LibraryLookupTable.libraryLookupTableFileExists(libName, size)) {
- log.appendMsg("WARNING! Using existing exports file for " + libName +
- " which may not be an exact match");
- return true;// pretend it was imported to prevent it from giving up the related imports
- }
+ if (shouldSearchAllPaths() || isLoadSystemLibraries(options)) {
+ paths.addAll(LibrarySearchPathManager.getLibraryPathsList());
}
-
- lib = doLoad(provider, libName, libFolder, libLoadSpec, options, log, consumer, monitor,
- unprocessedLibs);
-
- if (lib == null) {
- log.appendMsg("Library " + libFile + " failed to load for some reason");
- return false;
- }
-
- createExportsFile(libName, libFile, log, monitor, size, lib);
-
- if (isLoadLibraries(options)) {
- programList.add(lib);
- }
- else {
- lib.release(consumer);
- }
-
- return true;
-
+ return paths;
}
/**
- * Creates the library exports file, if necessary
- *
- * @param libName the name of the library
- * @param libFile the library file
- * @param log the message log
- * @param monitor the task monitor
- * @param size the language size
- * @param program the loaded library program
- * @throws CancelledException thrown is task cancelled
+ * Looks up a library in the given {@link Program} map using the appropriate case comparisons
*
+ * @param programsByName The map to search
+ * @param libraryName The library name to lookup
+ * @return A {@link Program} that matches the given library name using appropriate case
+ * comparisons, or null if one was not found
*/
- protected void createExportsFile(String libName, File libFile, MessageLog log,
- TaskMonitor monitor, int size, Program program) throws CancelledException {
-
- if (!LibraryLookupTable.libraryLookupTableFileExists(libName, size) ||
- !LibraryLookupTable.hasFileAndPathAndTimeStampMatch(libFile, size)) {
- try {
- // Need to write correct library exports file (LibrarySymbolTable)
- // for use with related imports
- LibraryLookupTable.createFile(program, true, monitor);
- }
- catch (IOException e) {
- log.appendMsg("Unable to create exports file for " + libFile);
- Msg.error(this, "Unable to create exports file for " + libFile, e);
- }
- }
- }
-
- protected LoadSpec getLoadSpec(LoadSpec loadSpec, ByteProvider provider) throws IOException {
- LanguageCompilerSpecPair pair = loadSpec.getLanguageCompilerSpec();
- Collection<LoadSpec> loadSpecs = findSupportedLoadSpecs(provider);
- if (loadSpecs != null) { // shouldn't be null, but protect against rogue loaders
- for (LoadSpec ls : loadSpecs) {
- if (pair.equals(ls.getLanguageCompilerSpec())) {
- return ls;
- }
+ private Program findLibraryWithCaseCorrectSearch(Map<String, Program> programsByName,
+ String libraryName) {
+ Comparator<String> comparator = getLibraryNameComparator();
+ for (String s : programsByName.keySet()) {
+ if (comparator.compare(libraryName, s) == 0) {
+ return programsByName.get(s);
}
}
return null;
}
/**
- * Applies the library symbol table to the {@link Program} being loaded. For example, if you
- * load "mfc42.dll", it will create the named symbols along with the ordinals.
- *
- * @param program The program being loaded.
- * @param log The message log.
- * @param monitor A cancelable task monitor.
- * @throws CancelledException if the user cancelled the load.
+ * Appends the given path elements to form a single path
+ *
+ * @param pathElements The path elements to append to one another
+ * @return A single path consisting of the given path elements appended together
*/
- private void applyLibrarySymbols(Program program, MessageLog log, TaskMonitor monitor)
- throws CancelledException {
- monitor.setMessage("Applying information..." + program.getName());
-
- // Check based on the original program name, not on the name I gave this program
- int size = program.getLanguage().getLanguageDescription().getSize();
-
- LibrarySymbolTable symtab = LibraryLookupTable.getSymbolTable(
- new File(program.getExecutablePath()).getName(), size);
- if (symtab == null) {
- // now try based on the name given to the program
- symtab = LibraryLookupTable.getSymbolTable(program.getName(), size);
- if (symtab == null) {
- return;
- }
- }
- if (!isVersionMatch(program, symtab, log)) {
- return;
- }
-
- SymbolIterator iter =
- program.getSymbolTable().getSymbolIterator(SymbolUtilities.ORDINAL_PREFIX + "*", true);
- while (iter.hasNext()) {
- monitor.checkCanceled();
- Symbol ordSym = iter.next();
- if (!ordSym.getAddress().isMemoryAddress()) {
- continue;
- }
- if (!ordSym.getParentNamespace().equals(program.getGlobalNamespace())) {
- continue;
- }
- int ordinal = SymbolUtilities.getOrdinalValue(ordSym.getName());
- LibraryExportedSymbol les = symtab.getSymbol(ordinal);
- if (les == null || les.getName() == null) {
+ private String appendPath(String... pathElements) {
+ StringBuilder sb = new StringBuilder();
+ for (String pathElement : pathElements) {
+ if (pathElement == null || pathElement.isEmpty()) {
continue;
}
- try {
- Symbol nameSym =
- program.getSymbolTable().getGlobalSymbol(les.getName(), ordSym.getAddress());
- if (nameSym == null) {
- String name = les.getName();
- Symbol s = program.getSymbolTable()
- .createLabel(ordSym.getAddress(), name,
- program.getGlobalNamespace(), SourceType.IMPORTED);
- s.setPrimary();
- }
+ boolean sbEndsWithSlash =
+ sb.length() > 0 && "/\\".indexOf(sb.charAt(sb.length() - 1)) != -1;
+ boolean elementStartsWithSlash = "/\\".indexOf(pathElement.charAt(0)) != -1;
+
+ if (!sbEndsWithSlash && !elementStartsWithSlash && sb.length() > 0) {
+ sb.append("/");
}
- catch (InvalidInputException e) {
- log.appendMsg("Error creating label named " + les.getName() + " at address " +
- ordSym.getAddress() + ": " + e.getMessage());
+ else if (elementStartsWithSlash && sbEndsWithSlash) {
+ pathElement = pathElement.substring(1);
}
+ sb.append(pathElement);
}
+
+ return sb.toString();
}
/**
- * Applies the library symbol table to the imported symbols of the specified
- * {@link Program}. Symbols may also be demangled (although this could be a mistake).
+ * Ensures the given {@link LoadSpec} matches one supported by the loader
*
- * @param program The {@link Program} whose imports should be resolved.
- * @param log import message log
- * @param monitor task monitor, if cancelled partial results may exist
+ * @param desiredLoadSpec The desired {@link LoadSpec}
+ * @param provider The provider
+ * @return A supported {@link LoadSpec} that matches the desired one, or null of none matched
+ * @throws IOException if there was an IO-related error
*/
- private void applyImports(Program program, MessageLog log, TaskMonitor monitor) {
- monitor.setMessage("Applying imports..." + program.getName());
-
- ExternalManager em = program.getExternalManager();
-
- String[] libs = em.getExternalLibraryNames();
-
- for (String lib : libs) {
- if (monitor.isCancelled()) {
- return;
- }
-
- int size = program.getLanguage().getLanguageDescription().getSize();
-
- LibrarySymbolTable symtab = LibraryLookupTable.getSymbolTable(lib, size);
-
- Iterator<ExternalLocation> iter = em.getExternalLocations(lib);
- while (iter.hasNext()) {
- if (monitor.isCancelled()) {
- return;
- }
-
- ExternalLocation extLoc = iter.next();
-
- String symName = extLoc.getLabel();
-
- // this check belongs here, because we want to demangled even
- // if we do not have a symbol table...
- if (symtab == null) {
- continue;
+ protected LoadSpec matchSupportedLoadSpec(LoadSpec desiredLoadSpec, ByteProvider provider)
+ throws IOException {
+ LanguageCompilerSpecPair desiredPair = desiredLoadSpec.getLanguageCompilerSpec();
+ Collection<LoadSpec> supportedLoadSpecs = findSupportedLoadSpecs(provider);
+ if (supportedLoadSpecs != null) { // shouldn't be null, but protect against rogue loaders
+ for (LoadSpec supportedLoadSpec : supportedLoadSpecs) {
+ if (desiredPair.equals(supportedLoadSpec.getLanguageCompilerSpec())) {
+ return supportedLoadSpec;
}
-
- // if symbol is imported by ordinal, then see if the
- // library contains a name for that ordinal. if so,
- // then rename the symbol
-
- LibraryExportedSymbol expSym = symtab.getSymbol(symName);
- if (expSym == null) {
- try {
- int ord = SymbolUtilities.getOrdinalValue(symName);
- if (ord == -1) {
- continue;
- }
-
- expSym = symtab.getSymbol(ord);
-
- if (expSym == null) {
- log.appendMsg("Unable to locate symbol [" + symName + "] in [" +
- LibraryLookupTable.getExistingExportsFile(lib, size) +
- "]. Please verify the version is correct.");
- continue;
- }
-
- extLoc.setLocation(expSym.getName(), extLoc.getAddress(),
- SourceType.IMPORTED);
- }
- catch (DuplicateNameException | InvalidInputException e) {
- log.appendMsg("Error creating label: ", e.getMessage());
- }
- }
-
- int purgeSize = expSym.getPurge();
- // no purge size for 64-bit programs
- boolean isNot32Bit = size > 32;
- if ((purgeSize == -1 || purgeSize < -1024 || purgeSize > 1024) || isNot32Bit) {
- continue;
- }
-
- // Create or get external function
- Function extFunc = extLoc.createFunction();
-
- extFunc.setStackPurgeSize(purgeSize);
- if (expSym.hasNoReturn()) {
- extFunc.setNoReturn(true);
- }
-// TODO: This should not be done at time of import and should be done
-// by a late running analyzer (e.g., stack analyzer) if no signature
-// has been established
-// int stackShift = program.getCompilerSpec().getDefaultCallingConvention().getStackshift();
-// if (stackShift == -1) {
-// stackShift = 0;
-// }
-
-// int numParams = expSym.getPurge() / 4;
-// if (numParams > 0) {
-// // HACK: assumes specific stack-based x86 convention
-// try {
-// Parameter[] params = new Parameter[numParams];
-// for (int ind = 0; ind < numParams; ind++) {
-// params[ind] = new ParameterImpl(null, Undefined.getUndefinedDataType(4),
-// ind * 4 + stackShift, p);
-// }
-// extFunc.replaceParameters(FunctionUpdateType.DYNAMIC_STORAGE_ALL_PARAMS,
-// false, SourceType.ANALYSIS, params);
-// }
-// catch (InvalidInputException | DuplicateNameException e) {
-// log.appendMsg("Error creating label: ", e.getMessage());
-// }
-// }
-
}
}
- }
-
- private static String getRidOfVersionAlias(String version) {
- if (version == null) {
- return null;
- }
-
- int aliasOpenParenPosition = version.indexOf('(');
-
- if (aliasOpenParenPosition == -1) {
- return version.trim();
- }
-
- return version.substring(0, aliasOpenParenPosition).trim();
- }
-
- private boolean isVersionMatch(DomainObject p, LibrarySymbolTable symtab, MessageLog log) {
- String version = getRidOfVersionAlias(symtab.getVersion());
-
- Options options = p.getOptions(Program.PROGRAM_INFO);
- String programVersion =
- getRidOfVersionAlias(options.getString("ProductVersion", (String) null));
-
- if (programVersion == null) {
- return false;
- }
-
- boolean match = programVersion.equalsIgnoreCase(version);
-
- if (!match) {
- log.appendMsg("Library version mismatch in .exports file for " + p.getName());
- log.appendMsg(" expected " + programVersion + " but was " + version);
- }
- return match;
+ return null;
}
/**
@@ -1021,26 +889,26 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
* have relaxed requirements on what counts as a valid library filename match. For example,
* case-insensitive lookup may be allowed, and filename extensions may be optional.
*
- * @param libFile The library file to resolve
+ * @param libraryFile The library file to resolve
* @return The library file resolved to an existing {@link File} on disk, or null if it did not
* resolve
*/
- private File resolveLibraryFile(File libFile) {
- File ret = libFile;
+ private File resolveLibraryFile(File libraryFile) {
+ File ret = libraryFile;
if (isCaseInsensitiveLibraryFilenames()) {
- ret = FileUtilities.resolveFileCaseInsensitive(libFile);
+ ret = FileUtilities.resolveFileCaseInsensitive(libraryFile);
}
if (ret.exists()) {
return ret;
}
if (isOptionalLibraryFilenameExtensions() &&
- FilenameUtils.getExtension(libFile.toString()).equals("")) {
- File[] files = libFile.getParentFile().listFiles();
+ FilenameUtils.getExtension(libraryFile.toString()).equals("")) {
+ File[] files = libraryFile.getParentFile().listFiles();
if (files != null) {
- Comparator<String> libNameComparator = getLibNameComparator();
+ Comparator<String> libNameComparator = getLibraryNameComparator();
for (File file : files) {
String baseName = FilenameUtils.getBaseName(file.toString());
- if (libNameComparator.compare(libFile.getName(), baseName) == 0) {
+ if (libNameComparator.compare(libraryFile.getName(), baseName) == 0) {
return file;
}
}
@@ -1048,4 +916,33 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
return null;
}
+
+ /**
+ * Returns the path the loaded {@link ByteProvider} is located in.
+ * <p>
+ * Special case when the ByteProvider specifies a {@link FSRL}, try to get the 'real'
+ * path on the local filesystem, otherwise return null.
+ *
+ * @param provider The {@link ByteProvider}.
+ * @return The path the loaded {@link ByteProvider} is located in.
+ */
+ private String getProviderFilePath(ByteProvider provider) {
+ FSRL fsrl = provider.getFSRL();
+ if ((fsrl != null) && !fsrl.getFS().hasContainer()) {
+ return FilenameUtils.getFullPathNoEndSeparator(fsrl.getPath());
+ }
+ File f = provider.getFile();
+ return (f != null) ? f.getParent() : null;
+ }
+
+ /**
+ * Gets a {@link Comparator} for comparing library filenames
+ *
+ * @return A {@link Comparator} for comparing library filenames
+ */
+ private Comparator<String> getLibraryNameComparator() {
+ return isCaseInsensitiveLibraryFilenames()
+ ? String.CASE_INSENSITIVE_ORDER
+ : (s1, s2) -> s1.compareTo(s2);
+ }
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractOrdinalSupportLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractOrdinalSupportLoader.java
new file mode 100644
index 0000000000..c2b9a11241
--- /dev/null
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractOrdinalSupportLoader.java
@@ -0,0 +1,382 @@
+/* ###
+ * IP: GHIDRA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package ghidra.app.util.opinion;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import ghidra.app.util.Option;
+import ghidra.app.util.bin.ByteProvider;
+import ghidra.app.util.importer.MessageLog;
+import ghidra.framework.model.DomainFolder;
+import ghidra.framework.model.DomainObject;
+import ghidra.framework.options.Options;
+import ghidra.program.model.listing.Function;
+import ghidra.program.model.listing.Program;
+import ghidra.program.model.symbol.*;
+import ghidra.util.Msg;
+import ghidra.util.exception.*;
+import ghidra.util.task.TaskMonitor;
+
+/**
+ * An abstract {@link Loader} that provides support for programs that link to external libraries
+ * with an ordinal mechanism. Supports caching library lookup information to XML files.
+ */
+public abstract class AbstractOrdinalSupportLoader extends AbstractLibrarySupportLoader {
+
+ public static final String ORDINAL_LOOKUP_OPTION_NAME = "Perform Library Ordinal Lookup";
+ static final boolean ORDINAL_LOOKUP_OPTION_DEFAULT = true;
+
+ @Override
+ public List<Option> getDefaultOptions(ByteProvider provider, LoadSpec loadSpec,
+ DomainObject domainObject, boolean loadIntoProgram) {
+ List<Option> list =
+ super.getDefaultOptions(provider, loadSpec, domainObject, loadIntoProgram);
+ list.add(new Option(ORDINAL_LOOKUP_OPTION_NAME, ORDINAL_LOOKUP_OPTION_DEFAULT,
+ Boolean.class, Loader.COMMAND_LINE_ARG_PREFIX + "-ordinalLookup"));
+ return list;
+ }
+
+ @Override
+ public String validateOptions(ByteProvider provider, LoadSpec loadSpec, List<Option> options,
+ Program program) {
+ if (options != null) {
+ for (Option option : options) {
+ String name = option.getName();
+ if (name.equals(ORDINAL_LOOKUP_OPTION_NAME)) {
+ if (!Boolean.class.isAssignableFrom(option.getValueClass())) {
+ return "Invalid type for option: " + name + " - " + option.getValueClass();
+ }
+ }
+ }
+ }
+ return super.validateOptions(provider, loadSpec, options, program);
+ }
+
+ @Override
+ protected boolean shouldLoadLibraries(List<Option> options) {
+ return shouldPerformOrdinalLookup(options) || super.shouldLoadLibraries(options);
+ }
+
+ @Override
+ protected boolean shouldSearchAllPaths() {
+ return true;
+ }
+
+ @Override
+ protected boolean shouldLoadLibrary(String libName, File libFile,
+ ByteProvider provider, LoadSpec loadSpec, MessageLog log) throws IOException {
+
+ if (!super.shouldLoadLibrary(libName, libFile, provider, loadSpec, log)) {
+ return false;
+ }
+
+ int size = loadSpec.getLanguageCompilerSpec().getLanguageDescription().getSize();
+
+ if (!LibraryLookupTable.hasFileAndPathAndTimeStampMatch(libFile, size) &&
+ LibraryLookupTable.libraryLookupTableFileExists(libName, size)) {
+ log.appendMsg("WARNING! Using existing exports file for " + libName +
+ " which may not be an exact match");
+ }
+
+ return true;
+ }
+
+ @Override
+ protected boolean processLibrary(Program lib, String libName, File libFile,
+ ByteProvider provider, LoadSpec loadSpec, List<Option> options, MessageLog log,
+ TaskMonitor monitor)
+ throws IOException, CancelledException {
+ int size = loadSpec.getLanguageCompilerSpec().getLanguageDescription().getSize();
+
+ // Create exports file
+ if (!LibraryLookupTable.libraryLookupTableFileExists(libName, size) ||
+ !LibraryLookupTable.hasFileAndPathAndTimeStampMatch(libFile, size)) {
+ try {
+ // Need to write correct library exports file (LibrarySymbolTable)
+ // for use with related imports
+ LibraryLookupTable.createFile(lib, true, monitor);
+ }
+ catch (IOException e) {
+ log.appendMsg("Unable to create exports file for " + libFile);
+ Msg.error(this, "Unable to create exports file for " + libFile, e);
+ }
+ }
+
+ return isLoadLocalLibraries(options) || isLoadSystemLibraries(options);
+ }
+
+ @Override
+ protected void postLoadProgramFixups(List<Program> loadedPrograms, DomainFolder folder,
+ List<Option> options, MessageLog messageLog, TaskMonitor monitor)
+ throws CancelledException, IOException {
+ monitor.initialize(loadedPrograms.size());
+
+ if (shouldPerformOrdinalLookup(options)) {
+ for (Program p : loadedPrograms) {
+ monitor.checkCanceled();
+
+ int id = p.startTransaction("Ordinal fixups");
+ boolean success = false;
+ try {
+ applyLibrarySymbols(p, messageLog, monitor);
+ applyImports(p, messageLog, monitor);
+ success = true;
+ }
+ finally {
+ p.endTransaction(id, success);
+ if (p.canSave() && p.isChanged()) {
+ p.save("Ordinal fixups", monitor);
+ }
+ }
+ }
+ }
+ LibraryLookupTable.cleanup();
+
+ super.postLoadProgramFixups(loadedPrograms, folder, options, messageLog, monitor);
+ }
+
+ /**
+ * Checks to see if ordinal lookup should be performed
+ *
+ * @param options a {@link List} of {@link Option}s
+ * @return True if ordinal lookup should be performed; otherwise, false
+ */
+ private boolean shouldPerformOrdinalLookup(List<Option> options) {
+ boolean performOrdinalLookup = ORDINAL_LOOKUP_OPTION_DEFAULT;
+ if (options != null) {
+ for (Option option : options) {
+ String optName = option.getName();
+ if (optName.equals(ORDINAL_LOOKUP_OPTION_NAME)) {
+ performOrdinalLookup = (Boolean) option.getValue();
+ }
+ }
+ }
+ return performOrdinalLookup;
+ }
+
+ /**
+ * Applies the library symbol table to the {@link Program} being loaded. For example, if you
+ * load "mfc42.dll", it will create the named symbols along with the ordinals.
+ *
+ * @param program The program being loaded.
+ * @param log The message log.
+ * @param monitor A cancelable task monitor.
+ * @throws CancelledException if the user cancelled the load.
+ */
+ private void applyLibrarySymbols(Program program, MessageLog log, TaskMonitor monitor)
+ throws CancelledException {
+ monitor.setMessage("Applying information..." + program.getName());
+
+ // Check based on the original program name, not on the name I gave this program
+ int size = program.getLanguage().getLanguageDescription().getSize();
+
+ LibrarySymbolTable symtab = LibraryLookupTable.getSymbolTable(
+ new File(program.getExecutablePath()).getName(), size, log);
+ if (symtab == null) {
+ // now try based on the name given to the program
+ symtab = LibraryLookupTable.getSymbolTable(program.getName(), size, log);
+ if (symtab == null) {
+ return;
+ }
+ }
+ if (!isVersionMatch(program, symtab, log)) {
+ return;
+ }
+
+ SymbolIterator iter =
+ program.getSymbolTable().getSymbolIterator(SymbolUtilities.ORDINAL_PREFIX + "*", true);
+ while (iter.hasNext()) {
+ monitor.checkCanceled();
+ Symbol ordSym = iter.next();
+ if (!ordSym.getAddress().isMemoryAddress()) {
+ continue;
+ }
+ if (!ordSym.getParentNamespace().equals(program.getGlobalNamespace())) {
+ continue;
+ }
+ int ordinal = SymbolUtilities.getOrdinalValue(ordSym.getName());
+ LibraryExportedSymbol les = symtab.getSymbol(ordinal);
+ if (les == null || les.getName() == null) {
+ continue;
+ }
+ try {
+ Symbol nameSym =
+ program.getSymbolTable().getGlobalSymbol(les.getName(), ordSym.getAddress());
+ if (nameSym == null) {
+ String name = les.getName();
+ Symbol s = program.getSymbolTable()
+ .createLabel(ordSym.getAddress(), name,
+ program.getGlobalNamespace(), SourceType.IMPORTED);
+ s.setPrimary();
+ }
+ }
+ catch (InvalidInputException e) {
+ log.appendMsg("Error creating label named " + les.getName() + " at address " +
+ ordSym.getAddress() + ": " + e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * Applies the library symbol table to the imported symbols of the specified
+ * {@link Program}. Symbols may also be demangled (although this could be a mistake).
+ *
+ * @param program The {@link Program} whose imports should be resolved.
+ * @param log import message log
+ * @param monitor task monitor, if cancelled partial results may exist
+ */
+ private void applyImports(Program program, MessageLog log, TaskMonitor monitor) {
+ monitor.setMessage("Applying imports..." + program.getName());
+
+ ExternalManager em = program.getExternalManager();
+
+ String[] libs = em.getExternalLibraryNames();
+
+ for (String lib : libs) {
+ if (monitor.isCancelled()) {
+ return;
+ }
+
+ int size = program.getLanguage().getLanguageDescription().getSize();
+
+ LibrarySymbolTable symtab = LibraryLookupTable.getSymbolTable(lib, size, log);
+
+ Iterator<ExternalLocation> iter = em.getExternalLocations(lib);
+ while (iter.hasNext()) {
+ if (monitor.isCancelled()) {
+ return;
+ }
+
+ ExternalLocation extLoc = iter.next();
+
+ String symName = extLoc.getLabel();
+
+ // this check belongs here, because we want to demangled even
+ // if we do not have a symbol table...
+ if (symtab == null) {
+ continue;
+ }
+
+ // if symbol is imported by ordinal, then see if the
+ // library contains a name for that ordinal. if so,
+ // then rename the symbol
+
+ LibraryExportedSymbol expSym = symtab.getSymbol(symName);
+ if (expSym == null) {
+ try {
+ int ord = SymbolUtilities.getOrdinalValue(symName);
+ if (ord == -1) {
+ continue;
+ }
+
+ expSym = symtab.getSymbol(ord);
+
+ if (expSym == null) {
+ log.appendMsg("Unable to locate symbol [" + symName + "] in [" +
+ LibraryLookupTable.getExistingExportsFile(lib, size) +
+ "]. Please verify the version is correct.");
+ continue;
+ }
+
+ extLoc.setLocation(expSym.getName(), extLoc.getAddress(),
+ SourceType.IMPORTED);
+ }
+ catch (DuplicateNameException | InvalidInputException e) {
+ log.appendMsg("Error creating label: ", e.getMessage());
+ }
+ }
+
+ int purgeSize = expSym.getPurge();
+ // no purge size for 64-bit programs
+ boolean isNot32Bit = size > 32;
+ if ((purgeSize == -1 || purgeSize < -1024 || purgeSize > 1024) || isNot32Bit) {
+ continue;
+ }
+
+ // Create or get external function
+ Function extFunc = extLoc.createFunction();
+
+ extFunc.setStackPurgeSize(purgeSize);
+ if (expSym.hasNoReturn()) {
+ extFunc.setNoReturn(true);
+ }
+// TODO: This should not be done at time of import and should be done
+// by a late running analyzer (e.g., stack analyzer) if no signature
+// has been established
+// int stackShift = program.getCompilerSpec().getDefaultCallingConvention().getStackshift();
+// if (stackShift == -1) {
+// stackShift = 0;
+// }
+
+// int numParams = expSym.getPurge() / 4;
+// if (numParams > 0) {
+// // HACK: assumes specific stack-based x86 convention
+// try {
+// Parameter[] params = new Parameter[numParams];
+// for (int ind = 0; ind < numParams; ind++) {
+// params[ind] = new ParameterImpl(null, Undefined.getUndefinedDataType(4),
+// ind * 4 + stackShift, p);
+// }
+// extFunc.replaceParameters(FunctionUpdateType.DYNAMIC_STORAGE_ALL_PARAMS,
+// false, SourceType.ANALYSIS, params);
+// }
+// catch (InvalidInputException | DuplicateNameException e) {
+// log.appendMsg("Error creating label: ", e.getMessage());
+// }
+// }
+
+ }
+ }
+ }
+
+ private boolean isVersionMatch(DomainObject p, LibrarySymbolTable symtab, MessageLog log) {
+ String version = getRidOfVersionAlias(symtab.getVersion());
+
+ Options options = p.getOptions(Program.PROGRAM_INFO);
+ String programVersion =
+ getRidOfVersionAlias(options.getString("ProductVersion", (String) null));
+
+ if (programVersion == null) {
+ return false;
+ }
+
+ boolean match = programVersion.equalsIgnoreCase(version);
+
+ if (!match) {
+ log.appendMsg("Library version mismatch in .exports file for " + p.getName());
+ log.appendMsg(" expected " + programVersion + " but was " + version);
+ }
+ return match;
+ }
+
+ private static String getRidOfVersionAlias(String version) {
+ if (version == null) {
+ return null;
+ }
+
+ int aliasOpenParenPosition = version.indexOf('(');
+
+ if (aliasOpenParenPosition == -1) {
+ return version.trim();
+ }
+
+ return version.substring(0, aliasOpenParenPosition).trim();
+ }
+
+}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractPeDebugLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractPeDebugLoader.java
index ac966d7847..54475d9f04 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractPeDebugLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractPeDebugLoader.java
@@ -35,7 +35,7 @@ import ghidra.util.Msg;
import ghidra.util.exception.InvalidInputException;
import ghidra.util.task.TaskMonitor;
-abstract class AbstractPeDebugLoader extends AbstractLibrarySupportLoader {
+abstract class AbstractPeDebugLoader extends AbstractOrdinalSupportLoader {
private HashMap<Address, StringBuffer> plateCommentMap = new HashMap<>();
private HashMap<Address, StringBuffer> preCommentMap = new HashMap<>();
private HashMap<Address, StringBuffer> postCommentMap = new HashMap<>();
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoader.java
index ffb45e43a1..70edb50251 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoader.java
@@ -19,7 +19,6 @@ import java.io.IOException;
import java.util.*;
import ghidra.app.util.Option;
-import ghidra.app.util.OptionUtils;
import ghidra.app.util.bin.ByteProvider;
import ghidra.app.util.bin.format.elf.ElfException;
import ghidra.app.util.bin.format.elf.ElfHeader;
@@ -159,13 +158,9 @@ public class ElfLoader extends AbstractLibrarySupportLoader {
throws CancelledException, IOException {
super.postLoadProgramFixups(importedPrograms, importFolder, options, messageLog, monitor);
- if (OptionUtils.getBooleanOptionValue(
- ElfLoaderOptionsFactory.RESOLVE_EXTERNAL_SYMBOLS_OPTION_NAME, options,
- ElfLoaderOptionsFactory.RESOLVE_EXTERNAL_SYMBOLS_DEFAULT)) {
- for (Program importedProgram : importedPrograms) {
- ELFExternalSymbolResolver.fixUnresolvedExternalSymbols(importedProgram, true,
- messageLog, monitor);
- }
+ for (Program importedProgram : importedPrograms) {
+ ELFExternalSymbolResolver.fixUnresolvedExternalSymbols(importedProgram, true,
+ messageLog, monitor);
}
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoaderOptionsFactory.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoaderOptionsFactory.java
index 76b30326f1..0d8dd66d08 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoaderOptionsFactory.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/ElfLoaderOptionsFactory.java
@@ -47,10 +47,6 @@ public class ElfLoaderOptionsFactory {
public static final String INCLUDE_OTHER_BLOCKS = "Import Non-Loaded Data";// as OTHER overlay blocks
static final boolean INCLUDE_OTHER_BLOCKS_DEFAULT = true;
- public static final String RESOLVE_EXTERNAL_SYMBOLS_OPTION_NAME =
- "Fixup Unresolved External Symbols";
- public static final boolean RESOLVE_EXTERNAL_SYMBOLS_DEFAULT = true;
-
private ElfLoaderOptionsFactory() {
}
@@ -86,10 +82,6 @@ public class ElfLoaderOptionsFactory {
options.add(new Option(INCLUDE_OTHER_BLOCKS, INCLUDE_OTHER_BLOCKS_DEFAULT, Boolean.class,
Loader.COMMAND_LINE_ARG_PREFIX + "-includeOtherBlocks"));
- options.add(
- new Option(RESOLVE_EXTERNAL_SYMBOLS_OPTION_NAME, RESOLVE_EXTERNAL_SYMBOLS_DEFAULT,
- Boolean.class, Loader.COMMAND_LINE_ARG_PREFIX + "-resolveExternalSymbols"));
-
ElfLoadAdapter extensionAdapter = ElfExtensionFactory.getLoadAdapter(elf);
if (extensionAdapter != null) {
extensionAdapter.addLoadOptions(elf, options);
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/LibraryLookupTable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/LibraryLookupTable.java
index f480b4cf19..0ec7670934 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/LibraryLookupTable.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/LibraryLookupTable.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.util.*;
import generic.jar.ResourceFile;
+import ghidra.app.util.importer.MessageLog;
import ghidra.framework.Application;
import ghidra.framework.options.Options;
import ghidra.program.model.listing.Program;
@@ -41,7 +42,12 @@ public class LibraryLookupTable {
private static List<ResourceFile> filesToDeleteList = new ArrayList<>();
private static String getMemorySizePath(int size) {
- return (size <= 32) ? "win32" : "win64";
+ return switch (size) {
+ case 64 -> "win64";
+ case 32 -> "win32";
+ case 16 -> "win16";
+ default -> "win_unsupported";
+ };
}
private static ResourceFile createUserResourceDir(int size) {
@@ -70,8 +76,8 @@ public class LibraryLookupTable {
"symbols/" + getMemorySizePath(size));
}
catch (Exception e) {
- Msg.error(LibraryLookupTable.class,
- "couldn't find symbols/win directory in module data directory", e);
+ Msg.warn(LibraryLookupTable.class,
+ "Couldn't find symbols/win directory in module data directory." + e.getMessage());
}
return null;
}
@@ -140,10 +146,12 @@ public class LibraryLookupTable {
cacheMap.put(symTab.getCacheKey(), symTab);
Options props = program.getOptions(Program.PROGRAM_INFO);
+ String format = program.getExecutableFormat();
String company = props.getString("CompanyName", "");
String version = props.getString("FileVersion", "");
- boolean save = company != null && company.toLowerCase().indexOf("microsoft") >= 0;
+ boolean save =
+ !format.equals(PeLoader.PE_NAME) || company.toLowerCase().contains("microsoft");
if (!save) {
filesToDeleteList.add(file);
}
@@ -170,6 +178,18 @@ public class LibraryLookupTable {
return file;
}
+ /**
+ * Get the symbol table associated with the DLL name
+ *
+ * @param dllName The DLL name (including extension)
+ * @param size The architecture size of the DLL (e.g., 32 or 64).
+ * @return LibrarySymbolTable associated with dllName
+ * @see #getSymbolTable(String, int, MessageLog)
+ */
+ synchronized static LibrarySymbolTable getSymbolTable(String dllName, int size) {
+ return getSymbolTable(dllName, size, null);
+ }
+
/**
* Get the symbol table associated with the DLL name. If not previously
* generated for the given dllName, it will be constructed from a .exports
@@ -191,9 +211,11 @@ public class LibraryLookupTable {
*
* @param dllName The DLL name (including extension)
* @param size The architecture size of the DLL (e.g., 32 or 64).
+ * @param log The message log
* @return LibrarySymbolTable associated with dllName
*/
- synchronized static LibrarySymbolTable getSymbolTable(String dllName, int size) {
+ synchronized static LibrarySymbolTable getSymbolTable(String dllName, int size,
+ MessageLog log) {
String cacheKey = LibrarySymbolTable.getCacheKey(dllName, size);
LibrarySymbolTable symTab = cacheMap.get(cacheKey);
if (symTab != null) {
@@ -203,6 +225,9 @@ public class LibraryLookupTable {
// look in resources of pre-parsed .dll's
ResourceFile file = getExistingExportsFile(dllName, size);
if (file != null) {
+ if (log != null) {
+ log.appendMsg("Applying " + file);
+ }
try {
symTab = new LibrarySymbolTable(file, size);
cacheMap.put(symTab.getCacheKey(), symTab);
@@ -216,6 +241,9 @@ public class LibraryLookupTable {
ResourceFile existingOrdinalFile = getExistingOrdinalFile(dllName, size);
if (existingOrdinalFile != null) {
+ if (log != null) {
+ log.appendMsg("Applying " + file);
+ }
symTab = new LibrarySymbolTable(dllName, size);
symTab.applyOrdinalFile(existingOrdinalFile, true);
cacheMap.put(symTab.getCacheKey(), symTab);
@@ -283,24 +311,33 @@ public class LibraryLookupTable {
stripPossibleExtensionFromFilename(dllName).toLowerCase() + extension;
String extensionFilename = dllName.toLowerCase() + extension;
- ResourceFile[] userFiles = createUserResourceDir(size).listFiles();
- ResourceFile[] systemFiles = getSystemResourceDir(size).listFiles();
-
- for (ResourceFile currFile : userFiles) {
- String currFileName = currFile.getName();
-
- if (currFileName.equalsIgnoreCase(strippedExtensionFilename) ||
- currFileName.equalsIgnoreCase(extensionFilename)) {
- return currFile;
+ ResourceFile userDir = createUserResourceDir(size);
+ if (userDir != null) {
+ ResourceFile[] userFiles = userDir.listFiles();
+ if (userFiles != null) {
+ for (ResourceFile currFile : userFiles) {
+ String currFileName = currFile.getName();
+
+ if (currFileName.equalsIgnoreCase(strippedExtensionFilename) ||
+ currFileName.equalsIgnoreCase(extensionFilename)) {
+ return currFile;
+ }
+ }
}
}
- for (ResourceFile currFile : systemFiles) {
- String currFileName = currFile.getName();
-
- if (currFileName.equalsIgnoreCase(strippedExtensionFilename) ||
- currFileName.equalsIgnoreCase(extensionFilename)) {
- return currFile;
+ ResourceFile systemDir = getSystemResourceDir(size);
+ if (systemDir != null) {
+ ResourceFile[] systemFiles = systemDir.listFiles();
+ if (systemFiles != null) {
+ for (ResourceFile currFile : systemFiles) {
+ String currFileName = currFile.getName();
+
+ if (currFileName.equalsIgnoreCase(strippedExtensionFilename) ||
+ currFileName.equalsIgnoreCase(extensionFilename)) {
+ return currFile;
+ }
+ }
}
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoLoader.java
index b0a4905f15..e145ef1eaf 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoLoader.java
@@ -25,7 +25,7 @@ import ghidra.app.util.bin.*;
import ghidra.app.util.bin.format.macho.*;
import ghidra.app.util.bin.format.ubi.*;
import ghidra.app.util.importer.MessageLog;
-import ghidra.framework.model.DomainFolder;
+import ghidra.formats.gfilesystem.FileSystemService;
import ghidra.framework.model.DomainObject;
import ghidra.program.database.mem.FileBytes;
import ghidra.program.model.listing.Program;
@@ -144,23 +144,23 @@ public class MachoLoader extends AbstractLibrarySupportLoader {
* import method will be invoked.
*/
@Override
- protected boolean importLibrary(String libName, DomainFolder libFolder, File libFile,
- LoadSpec loadSpec, List<Option> options, MessageLog log, Object consumer,
- Queue<String> unprocessedLibs, List<Program> programList, TaskMonitor monitor)
- throws CancelledException, IOException {
+ protected ByteProvider createLibraryByteProvider(File libFile, LoadSpec loadSpec, MessageLog log)
+ throws IOException {
if (!libFile.isFile()) {
- return false;
+ return null;
}
- try (ByteProvider provider = new FileByteProvider(libFile, null, AccessMode.READ)) {
+ ByteProvider provider = new FileByteProvider(libFile,
+ FileSystemService.getInstance().getLocalFSRL(libFile), AccessMode.READ);
+ try {
FatHeader header = new FatHeader(provider);
List<FatArch> architectures = header.getArchitectures();
if (architectures.isEmpty()) {
log.appendMsg("WARNING! No archives found in the UBI: " + libFile);
- return false;
+ return null;
}
for (FatArch architecture : architectures) {
@@ -179,12 +179,10 @@ public class MachoLoader extends AbstractLibrarySupportLoader {
// input stream provider (you can't read the same bytes over again) and will throw
// an exception. To avoid that, just create the provider from the original file
// provider, and not from the FatArch input stream.
- try (ByteProvider bp = new ByteProviderWrapper(provider, architecture.getOffset(),
- architecture.getSize())) {
- if (super.importLibrary(libName, libFolder, libFile, bp, loadSpec, options, log,
- consumer, unprocessedLibs, programList, monitor)) {
- return true;
- }
+ ByteProvider bp = new ByteProviderWrapper(provider, architecture.getOffset(), architecture.getSize());
+ LoadSpec libLoadSpec = matchSupportedLoadSpec(loadSpec, provider);
+ if (libLoadSpec != null) {
+ return bp;
}
}
}
@@ -193,7 +191,6 @@ public class MachoLoader extends AbstractLibrarySupportLoader {
// not an error condition so no need to log.
}
- return super.importLibrary(libName, libFolder, libFile, loadSpec, options, log, consumer,
- unprocessedLibs, programList, monitor);
+ return provider;
}
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/NeLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/NeLoader.java
index e176a3d0f5..cedba7491d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/NeLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/NeLoader.java
@@ -46,7 +46,7 @@ import ghidra.util.task.TaskMonitor;
/**
* A {@link Loader} for processing Microsoft New Executable (NE) files.
*/
-public class NeLoader extends AbstractLibrarySupportLoader {
+public class NeLoader extends AbstractOrdinalSupportLoader {
public final static String NE_NAME = "New Executable (NE)";
private static final String TAB = " ";
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java b/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java
index 14a46ad8d6..c5190dfd39 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java
@@ -21,9 +21,9 @@ import java.nio.channels.OverlappingFileLockException;
import java.util.*;
import ghidra.app.plugin.core.analysis.AutoAnalysisManager;
-import ghidra.app.util.Option;
import ghidra.app.util.importer.*;
-import ghidra.app.util.opinion.*;
+import ghidra.app.util.opinion.Loader;
+import ghidra.app.util.opinion.LoaderService;
import ghidra.framework.Application;
import ghidra.framework.client.*;
import ghidra.framework.cmd.Command;
@@ -688,17 +688,11 @@ public class GhidraProject {
MessageLog messageLog = new MessageLog();
- OptionChooser EMPTY_OPTIONS = (optionChoices, addressFactory) -> {
- Option option = new Option(AbstractLibrarySupportLoader.SYM_OPTION_NAME, false);
- ArrayList<Option> arrayList = new ArrayList<>();
- arrayList.add(option);
- return arrayList;
- };
-
String programNameOverride = null;
List<Program> programs = AutoImporter.importFresh(file, null, this, messageLog, MONITOR,
LoaderService.ACCEPT_ALL, LoadSpecChooser.CHOOSE_THE_FIRST_PREFERRED,
- programNameOverride, EMPTY_OPTIONS, MultipleProgramsStrategy.ONE_PROGRAM_OR_NULL);
+ programNameOverride, OptionChooser.DEFAULT_OPTIONS,
+ MultipleProgramsStrategy.ONE_PROGRAM_OR_NULL);
if (programs != null && programs.size() == 1) {
return programs.get(0);
}
diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/DexLoader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/DexLoader.java
index 156ace8323..f80a40e013 100644
--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/DexLoader.java
+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/DexLoader.java
@@ -17,23 +17,14 @@ package ghidra.app.util.opinion;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
import ghidra.app.util.Option;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.ByteProvider;
import ghidra.app.util.importer.MessageLog;
import ghidra.file.formats.android.dex.DexHeaderFactory;
-import ghidra.file.formats.android.dex.format.ClassDataItem;
-import ghidra.file.formats.android.dex.format.ClassDefItem;
-import ghidra.file.formats.android.dex.format.CodeItem;
-import ghidra.file.formats.android.dex.format.DexConstants;
-import ghidra.file.formats.android.dex.format.DexHeader;
-import ghidra.file.formats.android.dex.format.EncodedMethod;
-import ghidra.file.formats.android.dex.format.MethodIDItem;
+import ghidra.file.formats.android.dex.format.*;
import ghidra.file.formats.android.dex.util.DexUtil;
import ghidra.framework.model.DomainObject;
import ghidra.program.model.address.Address;
@@ -41,10 +32,7 @@ import ghidra.program.model.data.PointerDataType;
import ghidra.program.model.listing.CodeUnit;
import ghidra.program.model.listing.Program;
import ghidra.program.model.mem.MemoryBlock;
-import ghidra.program.model.symbol.Namespace;
-import ghidra.program.model.symbol.RefType;
-import ghidra.program.model.symbol.SourceType;
-import ghidra.program.model.symbol.Symbol;
+import ghidra.program.model.symbol.*;
import ghidra.util.exception.InvalidInputException;
import ghidra.util.task.TaskMonitor;
@@ -270,14 +258,14 @@ public class DexLoader extends AbstractLibrarySupportLoader {
Program program) {
return null;
}
-
+
@Override
- protected boolean isCreateExportSymbolFiles(List<Option> options) {
+ protected boolean isLoadLocalLibraries(List<Option> options) {
return false;
}
@Override
- protected boolean isLoadLibraries(List<Option> options) {
+ protected boolean isLoadSystemLibraries(List<Option> options) {
return false;
}
}
diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
index ad7e346ef4..3cd5a394bf 100644
--- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
@@ -202,6 +202,9 @@ public enum Platform {
if (operatingSystem == OperatingSystem.LINUX) {
paths.add("/bin");
paths.add("/lib");
+ paths.add("/lib64");
+ paths.add("/lib/x86_64-linux-gnu");
+ paths.add("/lib/aarch64-linux-gnu");
paths.add("/usr/bin");
paths.add("/usr/lib");
paths.add("/usr/X11R6/bin");
diff --git a/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.html b/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.html
index a209c98104..41c4af1f65 100644
--- a/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.html
+++ b/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.html
@@ -590,28 +590,32 @@ The Headless Analyzer uses the command-line parameters discussed below. See <a h
<UL>
<LI><typewriter>-loader-applyLabels &lt;true|false&gt;</typewriter></LI>
<LI><typewriter>-loader-anchorLabels &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-createExportSymbolFiles &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-loadExternalLibs &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadLocalLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadSystemLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-libraryLoadDepth &lt;depth&gt;</typewriter></LI>
<LI><typewriter>-loader-applyRelocations &lt;true|false&gt;</typewriter></LI>
<LI><typewriter>-loader-imagebase &lt;imagebase<sup>3</sup>&gt;</typewriter></LI>
<LI><typewriter>-loader-dataImageBase &lt;dataImageBase<sup>4</sup>&gt;</typewriter></LI>
<LI><typewriter>-loader-includeOtherBlocks &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-resolveExternalSymbols &lt;true|false&gt;</typewriter></LI>
</UL>
<LI><typewriter>-loader PeLoader<typewriter></LI>
<UL>
<LI><typewriter>-loader-applyLabels &lt;true|false&gt;</typewriter></LI>
<LI><typewriter>-loader-anchorLabels &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-createExportSymbolFiles &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-loadExternalLibs &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadLocalLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadSystemLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-libraryLoadDepth &lt;depth&gt;</typewriter></LI>
+ <LI><typewriter>-loader-ordinalLookup &lt;true|false&gt;</typewriter></LI>
<LI><typewriter>-loader-parseCliHeaders &lt;true|false&gt;</typewriter></LI>
</UL>
<LI><typewriter>-loader MachoLoader<typewriter></LI>
<UL>
<LI><typewriter>-loader-applyLabels &lt;true|false&gt;</typewriter></LI>
<LI><typewriter>-loader-anchorLabels &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-createExportSymbolFiles &lt;true|false&gt;</typewriter></LI>
- <LI><typewriter>-loader-loadExternalLibs &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadLocalLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-loadSystemLibraries &lt;true|false&gt;</typewriter></LI>
+ <LI><typewriter>-loader-libraryLoadDepth &lt;depth&gt;</typewriter></LI>
+ <LI><typewriter>-loader-addChainedFixupsRelocations &lt;true|false&gt;</typewriter></LI>
</UL>
</UL>
<br>