I agree with User_Russian -- if it's not required, if it's not used, i'd prefer it not be included.

An asm-level code optimiser with garbage removal would be a great future addition.
In the case of his demo which simply creates an empty window gdiplus.dll is not used at all. Intermodular Calls shows there isn't a single call made into the DLL, but just to be sure in case of dynamics i set a breakpoint on every gdiplus.dll export, but none were triggered, not even during process termination/cleanup
the gdiplus.dll functions that are imported are: GdipDeleteFont, GdipDeleteGraphics, GdipDeleteMatrix, GdipDeletePath, GdipDeletePen, GdipDeleteStringFormat, GdipFree, GdipGetDpiX, GdipGetDpiY.
Ironically nearly all cleanup functions

- so I can understand from that POV why they might be included, but there are no actual calls made to any of them.
ps. I tried Danilo's DeadProcedureRemover that c4s linked above, very handy addition to the Tools menu!

but as it does its work at PB-source-level (not fasm-source-level) it's not applicable to issues like this
Here are the extern's included in User_Russians empty window demo:
Code: Select all
extrn _PB_EndAlphaImage@0
extrn _PB_EndVectorDrawing@0
extrn _PB_Event_Free@0
extrn _PB_Event_Init@0
extrn _PB_FreeFonts@0
extrn _PB_FreeGadgets@0
extrn _PB_FreeImages@0
extrn _PB_FreeMemorys@0
extrn _PB_FreeWindows@0
extrn _PB_Init2DDrawing@0
extrn _PB_InitAlphaImage@0
extrn _PB_InitBMPImagePlugin@0
extrn _PB_InitFont@0
extrn _PB_InitGadget@0
extrn _PB_InitImage@0
extrn _PB_InitImageDecoder@0
extrn _PB_InitMap@0
extrn _PB_InitMemory@0
extrn _PB_InitVectorDrawing@0
extrn _PB_InitWindow@0
extrn _PB_OpenWindow2@28
extrn _PB_WaitWindowEvent@0
extrn _ExitProcess@4
extrn _GetModuleHandleA@4
extrn _HeapCreate@12
extrn _HeapDestroy@4
extrn _memset
extrn PB_StringBase
extrn _SYS_InitString@0
extrn _SYS_FreeStrings@0
extrn _PB_StringBasePosition
In this case if we take the unrequired VectorDrawing for example, the code (not shown here) shows that _PB_InitVectorDrawing and _PB_EndVectorDrawing are both CALL'ed (so in that sense the lib is required), but we then need to scan for all the other calls to functions within the vector lib to detect if we can remove the Init/End calls, which sounds tricky without a function name list for each lib.
But if we have such function name lists for each lib then it seems doable? reading the names part seems simple enough except for the part where it has parameter info of variable length, but i
think ive figured it out and putting together some code now because well it just sounds fun loL
[edit]
Done

btw a case-insensitive unicode+ascii search for 'gdiplus' shows it only exists in two files:
\PureLibraries\VectorDrawing
\PureLibraries\Windows\Libraries\gdiplus.lib