From b730fbc6b86d777e80856e997ddc56fc4a851769 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 17 May 2013 01:20:39 -0400 Subject: Remove the dlopen() pointer from struct filedef. This pointer is almost never needed, and it increases the size of the filedef struct for all files (of which there are a huge number for large builds). Instead keep a bit field marking whether the file is a loaded object and if so call a new function to unload it. In load.c we keep a simple linked list of loaded objects (of which there will be very few typically) and their dlopen() pointers. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index c317594..d9c3167 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2013-05-17 Paul Smith + + * makeint.h: Prototype new unload_file() function. + * load.c (unload_file): Create a function to unload a file. + (struct load_list): Type to remember loaded objects. + (loaded_syms): Global variable of remembered loaded objects so we + can unload them later. We don't have to remove from the list + because the only time we unload is if we're about to re-exec. + (load_object): Remove unneeded extra DLP argument. + (load_file): Remove unneeded extra DLP argument. + * filedef.h (struct file): Remove the DLP pointer and add the + LOADED bit flag. Saves 32/64 bytes per file, as this pointer is + almost never needed. + * read.c (eval): Set the new LOADED bit flag on the file. + * file.c (rehash_file): Merge the loaded bitfield. + * commands.c (execute_file_commands): Call unload_file() instead + of dlclose() directly. + 2013-05-14 Paul Smith * doc/make.texi (Loaded Object API): Document the requirement for -- cgit v1.2.3