diff options
author | Paul Smith <psmith@gnu.org> | 2013-05-17 01:20:39 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-05-17 01:20:39 -0400 |
commit | 173fd48b743a6eb85271d62dae0be1ca025d5d76 (patch) | |
tree | 9ca4f2aae6b0f5d8669c7990f3b2f50f22cd1780 /commands.c | |
parent | b7041cbb385e9a35a6ba2da69bf9cffbce678eee (diff) | |
download | make-173fd48b743a6eb85271d62dae0be1ca025d5d76.tar.gz |
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.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -471,10 +471,9 @@ execute_file_commands (struct file *file) set_file_variables (file); /* If this is a loaded dynamic object, unload it before remaking. - Some systems don't allow to overwrite a loaded shared - library. */ - if (file->dlopen_ptr) - dlclose (file->dlopen_ptr); + Some systems don't support overwriting a loaded object. */ + if (file->loaded) + unload_file (file->name); /* Start the commands running. */ new_job (file); |