Libraries (box_lib, buf2d, libimg, tinygl): optimize function import #231
5 Participants
Notifications
Due Date
No due date set.
Blocks
#241 WIP: Info3ds: added resizing of the window with the figure
KolibriOS/kolibrios
#242 CtrlDemo: code cleaning, library import optimization
KolibriOS/kolibrios
Reference: KolibriOS/kolibrios#231
Reference in New Issue
Block a user
No description provided.
Delete Branch "libraries-import-optimize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Libraries (box_lib, buf2d, libimg, tinygl): optimize function import
Рrograms updated:
Do I understand correctly that only those functions that are used in the code are imported?
That's right, only those functions that are used in the program are imported. That's why some programs have become smaller than they were.
We already have the shared /programs/dll.inc file included in some programs to help them with loading of dynamic libraries. Can we expand that single file instead of introducing two more files per each library? This is not a requirement, just a question if it's possible to avoid adding many similar files. I once cleaned some semi-duplicates, I'm afraid we can end up in a similar place with these import.inc and export.inc
2c778124e3
The dll.inc file has a different format for describing the export table, not the same as in load_lib.mac. That's why I added two additional files, one with a list of functions and the other with the formation of the export table. At first I wanted to make a macro for forming the export table, and in that case the second file would not be needed. But I couldn't write such a macro because it requires a macro inside another macro.
a8675404e7
to1a2e3e7938
@@ -435,3 +435,2 @@
;--------------------------------------------------
align 4
import_tinygl:
sz_lib_init db 'lib_init',0
Let's try adding this to import.inc...
moved declaration of
sz_lib_init
to file load_lib.mac9f858e0265
to5623b3510c
5623b3510c
to14c2c965c5
14c2c965c5
to21658ef74c